diff --git a/host_vars/routeur-daniel.adm.crans.org/bird.yml b/host_vars/routeur-daniel.adm.crans.org/bird.yml index e4cce20ee4dbd1435e9714afa4b623e6478254e5..588b8f23bb217cec0b20c55bed340f8a455944f3 100644 --- a/host_vars/routeur-daniel.adm.crans.org/bird.yml +++ b/host_vars/routeur-daniel.adm.crans.org/bird.yml @@ -9,7 +9,9 @@ loc_bird: bgps: - name: aurore allow_local_as: 1 - local_as: 204515 + local: + as: 204515 + address: 185.230.79.253 remote: as: 43619 address: 185.230.79.254 @@ -22,7 +24,9 @@ loc_bird: bgps: - name: aurore allow_local_as: 1 - local_as: 204515 + local: + as: 204515 + address: 2a0c:700:28::1 remote: as: 43619 address: 2a0c:700:28::2 diff --git a/host_vars/routeur-gulp.cachan-adm.crans.org/bird.yml b/host_vars/routeur-gulp.cachan-adm.crans.org/bird.yml index 4242bade686e02af818fe027432d7c6381bcac4e..389a67a989b5073f7e2cef37815cdbe95fa1a4c8 100644 --- a/host_vars/routeur-gulp.cachan-adm.crans.org/bird.yml +++ b/host_vars/routeur-gulp.cachan-adm.crans.org/bird.yml @@ -9,7 +9,8 @@ loc_bird: bgps: - name: zayo allow_local_as: 1 - local_as: 204515 + local: + as: 204515 remote: as: 8218 address: 158.255.113.72 @@ -22,7 +23,8 @@ loc_bird: bgps: - name: zayo allow_local_as: 1 - local_as: 204515 + local: + as: 204515 remote: as: 8218 address: 2001:1b48:2:103::bb:1 diff --git a/host_vars/routeur-jack.adm.crans.org/bird.yml b/host_vars/routeur-jack.adm.crans.org/bird.yml index e4cce20ee4dbd1435e9714afa4b623e6478254e5..588b8f23bb217cec0b20c55bed340f8a455944f3 100644 --- a/host_vars/routeur-jack.adm.crans.org/bird.yml +++ b/host_vars/routeur-jack.adm.crans.org/bird.yml @@ -9,7 +9,9 @@ loc_bird: bgps: - name: aurore allow_local_as: 1 - local_as: 204515 + local: + as: 204515 + address: 185.230.79.253 remote: as: 43619 address: 185.230.79.254 @@ -22,7 +24,9 @@ loc_bird: bgps: - name: aurore allow_local_as: 1 - local_as: 204515 + local: + as: 204515 + address: 2a0c:700:28::1 remote: as: 43619 address: 2a0c:700:28::2 diff --git a/host_vars/routeur-sam.adm.crans.org/bird.yml b/host_vars/routeur-sam.adm.crans.org/bird.yml index e4cce20ee4dbd1435e9714afa4b623e6478254e5..588b8f23bb217cec0b20c55bed340f8a455944f3 100644 --- a/host_vars/routeur-sam.adm.crans.org/bird.yml +++ b/host_vars/routeur-sam.adm.crans.org/bird.yml @@ -9,7 +9,9 @@ loc_bird: bgps: - name: aurore allow_local_as: 1 - local_as: 204515 + local: + as: 204515 + address: 185.230.79.253 remote: as: 43619 address: 185.230.79.254 @@ -22,7 +24,9 @@ loc_bird: bgps: - name: aurore allow_local_as: 1 - local_as: 204515 + local: + as: 204515 + address: 2a0c:700:28::1 remote: as: 43619 address: 2a0c:700:28::2 diff --git a/roles/bird/templates/bird/bird.conf.j2 b/roles/bird/templates/bird/bird.conf.j2 index 295cc21fe9c6c214c7d24ccb9a890f5c56f48872..c046180f49b7998440496a8f9bf60dea0829f26c 100644 --- a/roles/bird/templates/bird/bird.conf.j2 +++ b/roles/bird/templates/bird/bird.conf.j2 @@ -41,7 +41,11 @@ protocol static { {% for bgp in bird.ipv4.bgps %} protocol bgp {{ bgp.name }} { - local as {{ bgp.local_as }}; +{% if bgp.local.address is defined %} + local {{ bgp.local.address }} as {{ bgp.local.as }}; +{% else %} + local as {{ bgp.local.as }}; +{% endif %} {% if bgp.allow_local_as is defined %} allow local as {{ bgp.allow_local_as }}; {% endif %} diff --git a/roles/bird/templates/bird/bird6.conf.j2 b/roles/bird/templates/bird/bird6.conf.j2 index 4d1cea0e766d89b5538bd2e2551627af44627ed4..22e276d8560c31efbcc4bd925a3497d00e999829 100644 --- a/roles/bird/templates/bird/bird6.conf.j2 +++ b/roles/bird/templates/bird/bird6.conf.j2 @@ -40,7 +40,11 @@ protocol static { {%for bgp in bird.ipv6.bgps %} protocol bgp {{ bgp.name }} { - local as {{ bgp.local_as }}; +{% if bgp.local.address is defined %} + local {{ bgp.local.address }} as {{ bgp.local.as }}; +{% else %} + local as {{ bgp.local.as }}; +{% endif %} {% if bgp.allow_local_as is defined %} allow local as {{ bgp.allow_local_as }}; {% endif %}