forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged PR 8443959: 8111 Ares BGP template support
BGP Neighbor relationship in Ares. • BackEndToRRouter <-> ToRRouter • BackEndToRRouter <-> BackEndLeafRouter Support both IPv4 and IPv6 BGP templates Add test code for each modified test cases Review Doc: https://microsoftapc-my.sharepoint.com/:w:/g/personal/jcai_microsoft_com/EewqtGRC28tPoL01AqV-u24BVKtTnl8ytUMHkBqGXfgeCQ?e=pYctIc
- Loading branch information
1 parent
c5de9bb
commit 08792d9
Showing
61 changed files
with
1,003 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v4.leaf.ai.backend/instance.conf.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
! | ||
! template: bgpd/templates/msft.general/v4.leaf.ai.backend/instance.conf.j2 | ||
! | ||
neighbor {{ neighbor_addr }} remote-as {{ bgp_session['asn'] }} | ||
neighbor {{ neighbor_addr }} description {{ bgp_session['name'] }} | ||
neighbor {{ neighbor_addr }} peer-group BE_TIER0_V4 | ||
! | ||
{% if need_to_set_timers %} | ||
{# neighbor {{ neighbor_addr }} timers {{ bgp_session['keepalive'] }} {{ bgp_session['holdtime'] }} #} | ||
{% endif %} | ||
! | ||
{% if need_to_shutdown %} | ||
neighbor {{ neighbor_addr }} shutdown | ||
{% endif %} | ||
! | ||
! end of template: bgpd/templates/msft.general/v4.leaf.ai.backend/instance.conf.j2 | ||
! |
15 changes: 15 additions & 0 deletions
15
dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v4.leaf.ai.backend/peer-group.conf.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
! | ||
! template: bgpd/templates/msft.general/v4.leaf.ai.backend/peer-group.conf.j2 | ||
! | ||
neighbor BE_TIER0_V4 peer-group | ||
address-family ipv4 unicast | ||
neighbor BE_TIER0_V4 activate | ||
neighbor BE_TIER0_V4 soft-reconfiguration inbound | ||
neighbor BE_TIER0_V4 route-map FROM_BE_TIER0_V4 in | ||
neighbor BE_TIER0_V4 route-map TO_BE_TIER0_V4 out | ||
neighbor BE_TIER0_V4 send-community | ||
neighbor BE_TIER0_V4 maximum-prefix 12000 90 warning-only | ||
exit-address-family | ||
! | ||
! end of template: bgpd/templates/msft.general/v4.leaf.ai.backend/peer-group.conf.j2 | ||
! |
9 changes: 9 additions & 0 deletions
9
dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v4.leaf.ai.backend/policy.conf.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
! | ||
! template: bgpd/templates/msft.general/v4.leaf.ai.backend/policy.conf.j2 | ||
! | ||
route-map TO_BE_TIER0_V4 permit 10 | ||
! | ||
route-map FROM_BE_TIER0_V4 permit 10 | ||
! | ||
! end of template: bgpd/templates/msft.general/v4.leaf.ai.backend/policy.conf.j2 | ||
! |
17 changes: 17 additions & 0 deletions
17
dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v4.tor.ai.backend/instance.conf.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
! | ||
! template: bgpd/templates/msft.general/v4.tor.ai.backend/instance.conf.j2 | ||
! | ||
neighbor {{ neighbor_addr }} remote-as {{ bgp_session['asn'] }} | ||
neighbor {{ neighbor_addr }} description {{ bgp_session['name'] }} | ||
neighbor {{ neighbor_addr }} peer-group BE_TIER1_V4 | ||
! | ||
{% if need_to_set_timers %} | ||
{# neighbor {{ neighbor_addr }} timers {{ bgp_session['keepalive'] }} {{ bgp_session['holdtime'] }} #} | ||
{% endif %} | ||
! | ||
{% if need_to_shutdown %} | ||
neighbor {{ neighbor_addr }} shutdown | ||
{% endif %} | ||
! | ||
! end of template: bgpd/templates/msft.general/v4.tor.ai.backend/instance.conf.j2 | ||
! |
15 changes: 15 additions & 0 deletions
15
dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v4.tor.ai.backend/peer-group.conf.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
! | ||
! template: bgpd/templates/msft.general/v4.tor.ai.backend/peer-group.conf.j2 | ||
! | ||
neighbor BE_TIER1_V4 peer-group | ||
address-family ipv4 unicast | ||
neighbor BE_TIER1_V4 activate | ||
neighbor BE_TIER1_V4 soft-reconfiguration inbound | ||
neighbor BE_TIER1_V4 route-map FROM_BE_TIER1_V4 in | ||
neighbor BE_TIER1_V4 route-map TO_BE_TIER1_V4 out | ||
neighbor BE_TIER1_V4 send-community | ||
neighbor BE_TIER1_V4 maximum-prefix 12000 90 warning-only | ||
exit-address-family | ||
! | ||
! end of template: bgpd/templates/msft.general/v4.tor.ai.backend/peer-group.conf.j2 | ||
! |
9 changes: 9 additions & 0 deletions
9
dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v4.tor.ai.backend/policy.conf.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
! | ||
! template: bgpd/templates/msft.general/v4.tor.ai.backend/policy.conf.j2 | ||
! | ||
route-map TO_BE_TIER1_V4 permit 10 | ||
! | ||
route-map FROM_BE_TIER1_V4 permit 10 | ||
! | ||
! end of template: bgpd/templates/msft.general/v4.tor.ai.backend/policy.conf.j2 | ||
! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.leaf.ai.backend/instance.conf.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
! | ||
! template: bgpd/templates/msft.general/v6.leaf.ai.backend/instance.conf.j2 | ||
! | ||
neighbor {{ neighbor_addr }} remote-as {{ bgp_session['asn'] }} | ||
neighbor {{ neighbor_addr }} description {{ bgp_session['name'] }} | ||
neighbor {{ neighbor_addr }} peer-group BE_TIER0_V6 | ||
! | ||
{% if need_to_set_timers %} | ||
{# neighbor {{ neighbor_addr }} timers {{ bgp_session['keepalive'] }} {{ bgp_session['holdtime'] }} #} | ||
{% endif %} | ||
! | ||
{% if need_to_shutdown %} | ||
neighbor {{ neighbor_addr }} shutdown | ||
{% endif %} | ||
! | ||
! end of template: bgpd/templates/msft.general/v6.leaf.ai.backend/instance.conf.j2 | ||
! |
15 changes: 15 additions & 0 deletions
15
dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.leaf.ai.backend/peer-group.conf.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
! | ||
! template: bgpd/templates/msft.general/v6.leaf.ai.backend/peer-group.conf.j2 | ||
! | ||
neighbor BE_TIER0_V6 peer-group | ||
address-family ipv6 unicast | ||
neighbor BE_TIER0_V6 activate | ||
neighbor BE_TIER0_V6 soft-reconfiguration inbound | ||
neighbor BE_TIER0_V6 route-map FROM_BE_TIER0_V6 in | ||
neighbor BE_TIER0_V6 route-map TO_BE_TIER0_V6 out | ||
neighbor BE_TIER0_V6 send-community | ||
neighbor BE_TIER0_V6 maximum-prefix 12000 90 warning-only | ||
exit-address-family | ||
! | ||
! end of template: bgpd/templates/msft.general/v6.leaf.ai.backend/peer-group.conf.j2 | ||
! |
9 changes: 9 additions & 0 deletions
9
dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.leaf.ai.backend/policy.conf.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
! | ||
! template: bgpd/templates/msft.general/v6.leaf.ai.backend/policy.conf.j2 | ||
! | ||
route-map TO_BE_TIER0_V6 permit 10 | ||
! | ||
route-map FROM_BE_TIER0_V6 permit 10 | ||
! | ||
! end of template: bgpd/templates/msft.general/v6.leaf.ai.backend/policy.conf.j2 | ||
! |
17 changes: 17 additions & 0 deletions
17
dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.tor.ai.backend/instance.conf.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
! | ||
! template: bgpd/templates/msft.general/v6.tor.ai.backend/instance.conf.j2 | ||
! | ||
neighbor {{ neighbor_addr }} remote-as {{ bgp_session['asn'] }} | ||
neighbor {{ neighbor_addr }} description {{ bgp_session['name'] }} | ||
neighbor {{ neighbor_addr }} peer-group BE_TIER1_V6 | ||
! | ||
{% if need_to_set_timers %} | ||
{# neighbor {{ neighbor_addr }} timers {{ bgp_session['keepalive'] }} {{ bgp_session['holdtime'] }} #} | ||
{% endif %} | ||
! | ||
{% if need_to_shutdown %} | ||
neighbor {{ neighbor_addr }} shutdown | ||
{% endif %} | ||
! | ||
! end of template: bgpd/templates/msft.general/v6.tor.ai.backend/instance.conf.j2 | ||
! |
15 changes: 15 additions & 0 deletions
15
dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.tor.ai.backend/peer-group.conf.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
! | ||
! template: bgpd/templates/msft.general/v6.tor.ai.backend/peer-group.conf.j2 | ||
! | ||
neighbor BE_TIER1_V6 peer-group | ||
address-family ipv6 unicast | ||
neighbor BE_TIER1_V6 activate | ||
neighbor BE_TIER1_V6 soft-reconfiguration inbound | ||
neighbor BE_TIER1_V6 route-map FROM_BE_TIER1_V6 in | ||
neighbor BE_TIER1_V6 route-map TO_BE_TIER1_V6 out | ||
neighbor BE_TIER1_V6 send-community | ||
neighbor BE_TIER1_V6 maximum-prefix 12000 90 warning-only | ||
exit-address-family | ||
! | ||
! end of template: bgpd/templates/msft.general/v6.tor.ai.backend/peer-group.conf.j2 | ||
! |
9 changes: 9 additions & 0 deletions
9
dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.tor.ai.backend/policy.conf.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
! | ||
! template: bgpd/templates/msft.general/v6.tor.ai.backend/policy.conf.j2 | ||
! | ||
route-map TO_BE_TIER1_V6 permit 10 | ||
! | ||
route-map FROM_BE_TIER1_V6 permit 10 | ||
! | ||
! end of template: bgpd/templates/msft.general/v6.tor.ai.backend/policy.conf.j2 | ||
! |
17 changes: 17 additions & 0 deletions
17
dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.tor.backend/instance.conf.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
! | ||
! template: bgpd/templates/msft.general/v6.tor.backend/instance.conf.j2 | ||
! | ||
neighbor {{ neighbor_addr }} remote-as {{ bgp_session['asn'] }} | ||
neighbor {{ neighbor_addr }} description {{ bgp_session['name'] }} | ||
neighbor {{ neighbor_addr }} peer-group FE_TIER0_V6 | ||
! | ||
{% if need_to_set_timers %} | ||
{# neighbor {{ neighbor_addr }} timers {{ bgp_session['keepalive'] }} {{ bgp_session['holdtime'] }} #} | ||
{% endif %} | ||
! | ||
{% if need_to_shutdown %} | ||
neighbor {{ neighbor_addr }} shutdown | ||
{% endif %} | ||
! | ||
! end of template: bgpd/templates/msft.general/v6.tor.backend/instance.conf.j2 | ||
! |
15 changes: 15 additions & 0 deletions
15
dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.tor.backend/peer-group.conf.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
! | ||
! template: bgpd/templates/msft.general/v6.tor.backend/peer-group.conf.j2 | ||
! | ||
neighbor FE_TIER0_V6 peer-group | ||
address-family ipv6 unicast | ||
neighbor FE_TIER0_V6 activate | ||
neighbor FE_TIER0_V6 soft-reconfiguration inbound | ||
neighbor FE_TIER0_V6 route-map FROM_FE_TIER0_V6 in | ||
neighbor FE_TIER0_V6 route-map TO_FE_TIER0_V6 out | ||
neighbor FE_TIER0_V6 send-community | ||
neighbor FE_TIER0_V6 maximum-prefix 12000 90 warning-only | ||
exit-address-family | ||
! | ||
! end of template: bgpd/templates/msft.general/v6.tor.backend/peer-group.conf.j2 | ||
! |
19 changes: 19 additions & 0 deletions
19
dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.tor.backend/policy.conf.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
! | ||
! template: bgpd/templates/msft.general/v6.tor.backend/policy.conf.j2 | ||
! | ||
ipv6 prefix-list DEFAULT_IPV6 permit any | ||
ipv6 prefix-list BE_LOOPBACKS_V6 seq 5 deny ::1/128 | ||
ipv6 prefix-list BE_LOOPBACKS_V6 seq 15 permit ::/0 ge 128 | ||
! | ||
route-map FROM_FE_TIER0_V6 permit 10 | ||
match ipv6 address prefix-list DEFAULT_IPV6 | ||
! | ||
route-map FROM_FE_TIER0_V6 deny 100 | ||
! | ||
route-map TO_FE_TIER0_V6 permit 10 | ||
match ipv6 address prefix-list BE_LOOPBACKS_V6 | ||
! | ||
route-map TO_FE_TIER0_V6 deny 100 | ||
! | ||
! end of template: bgpd/templates/msft.general/v6.tor.backend/policy.conf.j2 | ||
! |
17 changes: 17 additions & 0 deletions
17
dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.tor.frontend/instance.conf.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
! | ||
! template: bgpd/templates/msft.general/v6.tor.frontend/instance.conf.j2 | ||
! | ||
neighbor {{ neighbor_addr }} remote-as {{ bgp_session['asn'] }} | ||
neighbor {{ neighbor_addr }} description {{ bgp_session['name'] }} | ||
neighbor {{ neighbor_addr }} peer-group BE_TIER0_V6 | ||
! | ||
{% if need_to_set_timers %} | ||
{# neighbor {{ neighbor_addr }} timers {{ bgp_session['keepalive'] }} {{ bgp_session['holdtime'] }} #} | ||
{% endif %} | ||
! | ||
{% if need_to_shutdown %} | ||
neighbor {{ neighbor_addr }} shutdown | ||
{% endif %} | ||
! | ||
! end of template: bgpd/templates/msft.general/v6.tor.frontend/instance.conf.j2 | ||
! |
15 changes: 15 additions & 0 deletions
15
dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.tor.frontend/peer-group.conf.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
! | ||
! template: bgpd/templates/msft.general/v6.tor.frontend/peer-group.conf.j2 | ||
! | ||
neighbor BE_TIER0_V6 peer-group | ||
address-family ipv6 unicast | ||
neighbor BE_TIER0_V6 activate | ||
neighbor BE_TIER0_V6 soft-reconfiguration inbound | ||
neighbor BE_TIER0_V6 route-map FROM_BE_TIER0_V6 in | ||
neighbor BE_TIER0_V6 route-map TO_BE_TIER0_V6 out | ||
neighbor BE_TIER0_V6 send-community | ||
neighbor BE_TIER0_V6 maximum-prefix 12000 90 warning-only | ||
exit-address-family | ||
! | ||
! end of template: bgpd/templates/msft.general/v6.tor.frontend/peer-group.conf.j2 | ||
! |
19 changes: 19 additions & 0 deletions
19
dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.tor.frontend/policy.conf.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
! | ||
! template: bgpd/templates/msft.general/v6.tor.frontend/policy.conf.j2 | ||
! | ||
ipv6 prefix-list DEFAULT_IPV6 permit any | ||
ipv6 prefix-list BE_LOOPBACKS_V6 seq 5 deny ::1/128 | ||
ipv6 prefix-list BE_LOOPBACKS_V6 seq 15 permit ::/0 ge 128 | ||
! | ||
route-map TO_BE_TIER0_V6 permit 10 | ||
match ipv6 address prefix-list DEFAULT_IPV6 | ||
! | ||
route-map TO_BE_TIER0_V6 deny 100 | ||
! | ||
route-map FROM_BE_TIER0_V6 permit 10 | ||
match ipv6 address prefix-list BE_LOOPBACKS_V6 | ||
! | ||
route-map FROM_BE_TIER0_V6 deny 100 | ||
! | ||
! end of template: bgpd/templates/msft.general/v6.tor.frontend/policy.conf.j2 | ||
! |
19 changes: 19 additions & 0 deletions
19
src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/param_v4.leaf.ai.backend.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"CONFIG_DB__DEVICE_METADATA": { | ||
"localhost": { | ||
"type": "BackEndLeafRouter", | ||
"ai_device": "true" | ||
} | ||
}, | ||
"CONFIG_DB__DEVICE_NEIGHBOR_METADATA": { | ||
"neig_device": { | ||
"type": "BackEndToRRouter" | ||
} | ||
}, | ||
"bgp_session": { | ||
"asn": "11111", | ||
"name": "neig_device", | ||
"admin_status": "down" | ||
}, | ||
"neighbor_addr": "11.11.11.11" | ||
} |
Oops, something went wrong.