migrate edge routers (routeur-aurore.adm -> edge-{1,2}.rtr)

This commit is contained in:
jeltz 2023-03-26 17:06:34 +02:00
parent 67f0e4ccbc
commit eb8368b2e6
Signed by: jeltz
GPG key ID: 800882B66C0C3326
4 changed files with 149 additions and 115 deletions

View file

@ -190,19 +190,27 @@
- ff00::/8
bird__router_id: "{{ bird__router_ids[inventory_hostname] }}"
bird__bgp_addresses:
edge-1.rtr.infra.auro.re:
- 2a09:6840:203:1:1::1
- 10.203.1.1
edge-2.rtr.infra.auro.re:
- 2a09:6840:203:1:2::1
- 10.203.1.2
edge:
edge-1.rtr.infra.auro.re:
- 2a09:6840:203:1:1::1
- 10.203.1.1
edge-2.rtr.infra.auro.re:
- 2a09:6840:203:1:2::1
- 10.203.1.2
legacy:
edge-1.rtr.infra.auro.re:
- 2a09:6840:129::10:2
- 10.129.10.2
edge-2.rtr.infra.auro.re:
- 2a09:6840:129::10:102
- 10.129.10.102
bird__bgp_sessions:
- name: edge
local:
address: "{{ bird__bgp_addresses[inventory_hostname] }}"
address: "{{ bird__bgp_addresses.edge[inventory_hostname] }}"
as: "{{ bird__asn.aurore }}"
remote:
address: "{{ bird__bgp_addresses
address: "{{ bird__bgp_addresses.edge
| dict2items
| selectattr('key', '!=', inventory_hostname)
| map(attribute='value')
@ -211,79 +219,100 @@
import:
- accept: true
export:
- accept: true
- name: infra1
- local_pref: 75
accept: true
- name: legacy
next_hop_self: true
local:
address: "{{ bird__bgp_addresses[inventory_hostname] }}"
address: "{{ bird__bgp_addresses.legacy[inventory_hostname] }}"
as: "{{ bird__asn.aurore }}"
remote:
address:
- 2a09:6840:203:1:3::1
- 10.203.1.3
- 2a09:6840:129::240
- 10.129.0.240
as: "{{ bird__asn.aurore }}"
import:
- prefix: "{{ bird__orig_prefixes.aurore }}"
sub: true
accept: true
- accept: false
export:
- bgp_proto:
- crans
- viarezo
- zayo
accept: true
- accept: false
- name: infra2
local:
address: "{{ bird__bgp_addresses[inventory_hostname] }}"
as: "{{ bird__asn.aurore }}"
remote:
address:
- 2a09:6840:203:1:4::1
- 10.203.1.4
as: "{{ bird__asn.aurore }}"
import:
- accept: false
export:
- bgp_proto:
- crans
- viarezo
- zayo
accept: true
- accept: false
- name: isp1
local:
address: "{{ bird__bgp_addresses[inventory_hostname] }}"
as: "{{ bird__asn.aurore }}"
remote:
address:
- 2a09:6840:203:1:5::1
- 10.203.1.5
as: "{{ bird__asn.aurore }}"
import:
- accept: false
export:
- bgp_proto:
- crans
- viarezo
- zayo
accept: true
- accept: false
- name: isp2
local:
address: "{{ bird__bgp_addresses[inventory_hostname] }}"
as: "{{ bird__asn.aurore }}"
remote:
address:
- 2a09:6840:203:1:6::1
- 10.203.1.6
as: "{{ bird__asn.aurore }}"
import:
- accept: false
export:
- bgp_proto:
- crans
- viarezo
- zayo
accept: true
- accept: false
# - name: infra1
# local:
# address: "{{ bird__bgp_addresses[inventory_hostname] }}"
# as: "{{ bird__asn.aurore }}"
# remote:
# address:
# - 2a09:6840:203:1:3::1
# - 10.203.1.3
# as: "{{ bird__asn.aurore }}"
# import:
# - accept: false
# export:
# - bgp_proto:
# - crans
# - viarezo
# - zayo
# accept: true
# - accept: false
# - name: infra2
# local:
# address: "{{ bird__bgp_addresses[inventory_hostname] }}"
# as: "{{ bird__asn.aurore }}"
# remote:
# address:
# - 2a09:6840:203:1:4::1
# - 10.203.1.4
# as: "{{ bird__asn.aurore }}"
# import:
# - accept: false
# export:
# - bgp_proto:
# - crans
# - viarezo
# - zayo
# accept: true
# - accept: false
# - name: isp1
# local:
# address: "{{ bird__bgp_addresses[inventory_hostname] }}"
# as: "{{ bird__asn.aurore }}"
# remote:
# address:
# - 2a09:6840:203:1:5::1
# - 10.203.1.5
# as: "{{ bird__asn.aurore }}"
# import:
# - accept: false
# export:
# - bgp_proto:
# - crans
# - viarezo
# - zayo
# accept: true
# - accept: false
# - name: isp2
# local:
# address: "{{ bird__bgp_addresses[inventory_hostname] }}"
# as: "{{ bird__asn.aurore }}"
# remote:
# address:
# - 2a09:6840:203:1:6::1
# - 10.203.1.6
# as: "{{ bird__asn.aurore }}"
# import:
# - accept: false
# export:
# - bgp_proto:
# - crans
# - viarezo
# - zayo
# accept: true
# - accept: false
- name: zayo
local:
address:
@ -297,6 +326,7 @@
as: "{{ bird__asn.zayo }}"
import:
- prefix: "{{ bird__orig_prefixes.martians }}"
sub: true
accept: false
- accept: true
export:
@ -318,53 +348,51 @@
- 2a0c:700:28::1
as: "{{ bird__asn.crans }}"
import:
- prefix: "{{ bird__orig_prefixes.martians }}"
accept: false
- prefix: "{{ bird__orig_prefixes.crans }}"
sub: true
accept: true
- accept: false
export:
- bgp_proto:
- viarezo
- zayo
accept: true
- prefix: "{{ bird__orig_prefixes.aurore }}"
sub: true
accept: true
- accept: false
- name: viarezo
local:
address:
- 192.159.121.134
- 2a0c:b641:2ff::6
as: "{{ bird__asn.aurore }}"
remote:
address:
- 192.159.121.133
- 2a0c:b641:2ff::5
as: "{{ bird__asn.viarezo }}"
import:
- prefix: "{{ bird__orig_prefixes.martians }}"
accept: false
- prefix: "{{ bird__orig_prefixes.viarezo }}"
sub: true
negate: true
local_pref: 50
- accept: true
export:
- prefix: "{{ bird__orig_prefixes.aurore }}"
as_prepend:
asn: "{{ bird__asn.aurore }}"
size: 5
- bgp_proto:
- crans
# - viarezo
- zayo
accept: true
- prefix: "{{ bird__orig_prefixes.aurore }}"
sub: true
accept: true
- accept: false
# - name: viarezo
# local:
# address:
# - 192.159.121.134
# - 2a0c:b641:2ff::6
# as: "{{ bird__asn.aurore }}"
# remote:
# address:
# - 192.159.121.133
# - 2a0c:b641:2ff::5
# as: "{{ bird__asn.viarezo }}"
# import:
# - prefix: "{{ bird__orig_prefixes.martians }}"
# accept: false
# - prefix: "{{ bird__orig_prefixes.viarezo }}"
# sub: true
# negate: true
# local_pref: 50
# - accept: true
# export:
# - prefix: "{{ bird__orig_prefixes.aurore }}"
# as_prepend:
# asn: "{{ bird__asn.aurore }}"
# size: 5
# - bgp_proto:
# - crans
# - zayo
# accept: true
# - prefix: "{{ bird__orig_prefixes.aurore }}"
# sub: true
# accept: true
# - accept: false
bird__ospf_broadcast_interfaces:
ens22: null
bird__ospf_stub_interfaces:

View file

@ -17,7 +17,6 @@
addresses:
- 2a09:6840:128::10:2/56
- 10.128.10.2/16
gateways: "{{ ifupdown2__gateways.adm }}"
ens19:
ipv6_addrgen: false
forward: true
@ -32,18 +31,22 @@
- 2a09:6840:203:1:1::1/56
- 10.203.1.1/16
forward: true
ens23: null
ens23:
ipv6_addrgen: false
forward: true
enp2s1:
addresses:
- 2a09:6840:129::10:2/56
- 10.129.10.2/16
forward: true
enp2s2:
ipv6_addrgen: false
forward: true
edge-2.rtr.infra.auro.re:
ens18:
addresses:
- 2a09:6840:128::10:102/56
- 10.128.10.102/16
gateways: "{{ ifupdown2__gateways.adm }}"
ens19:
ipv6_addrgen: false
forward: true
@ -58,12 +61,17 @@
- 2a09:6840:203:1:2::1/56
- 10.203.1.2/16
forward: true
ens23: null
ens23:
ipv6_addrgen: false
forward: true
enp2s1:
addresses:
- 2a09:6840:129::10:102/56
- 10.129.10.102/16
forward: true
enp2s2:
ipv6_addrgen: false
forward: true
dns-1.int.infra.auro.re:
ens18:
addresses:

View file

@ -43,14 +43,9 @@
- 2a0c:700:28::2/64
- fe80::1/10
ens20:
# - 192.159.121.134/30
# - 2a0c:b641:2ff::6/126
- fe80::1/10
- 2001:1b48:2:103::d7:2/126
# ens21:
# - 83.167.52.69/31
# - 2001:1b48:2:103::d7:2/126
# - fe80::1/10
- 83.167.52.69/31
- fe80::1/10
keepalived__main: "{{ inventory_hostname_short == 'edge-1' }}"
roles:
- keepalived

View file

@ -180,6 +180,9 @@ protocol bgp bgp{{ version }}_{{ session.name }} {
{{ "ipv4" if version == 4 else "ipv6" }} {
{% if session.next_hop_self | default(False) %}
next hop self;
{% endif %}
{% if session.direct | default(False) %}
direct;
{% endif %}
import filter bgp{{ version }}_import_{{ session.name }};
export filter bgp{{ version }}_export_{{ session.name }};