Skip to content

Commit

Permalink
[muti-asic] Updated BGP community for Internal routes (sonic-net#7617)
Browse files Browse the repository at this point in the history
Following changes are done:

Internal routes are tagged with no-export instead of local-AS
Option to add User Define BGP community on top of no-export
  • Loading branch information
abdosi authored and Carl Keene committed Aug 7, 2021
1 parent c6e9b1c commit 08a4d1e
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 9 deletions.
7 changes: 6 additions & 1 deletion dockers/docker-fpm-frr/frr/bgpd/bgpd.main.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ ipv6 prefix-list LOCAL_VLAN_IPV6_PREFIX seq {{ loop.index * 5 }} permit {{ prefi
!
{% if DEVICE_METADATA['localhost']['sub_role'] == 'FrontEnd' or DEVICE_METADATA['localhost']['sub_role'] == 'BackEnd' %}
route-map HIDE_INTERNAL permit 10
set community local-AS
set community no-export
{% if constants.bgp.peers is defined and constants.bgp.peers.internal is defined and constants.bgp.peers.internal.community is defined %}
on-match next
route-map HIDE_INTERNAL permit 20
set community {{ constants.bgp.peers.internal.community }} additive
{% endif %}
{% set multi_asic = True %}
!
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ ip prefix-list LOCAL_VLAN_IPV4_PREFIX seq 5 permit 10.10.10.0/24
ipv6 prefix-list LOCAL_VLAN_IPV6_PREFIX seq 10 permit fc01::/64
!
route-map HIDE_INTERNAL permit 10
set community local-AS
set community no-export
on-match next
route-map HIDE_INTERNAL permit 20
set community 1234:5678 additive
!
!
router bgp 55555
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
"enabled": true,
"ipv4": 32,
"ipv6": 32
},
"peers": {
"internal": {
"community": "1234:5678"
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ ip prefix-list LOCAL_VLAN_IPV4_PREFIX seq 5 permit 10.10.10.0/24
ipv6 prefix-list LOCAL_VLAN_IPV6_PREFIX seq 10 permit fc01::/64
!
route-map HIDE_INTERNAL permit 10
set community local-AS
set community no-export
!
!
router bgp 55555
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ ip prefix-list LOCAL_VLAN_IPV4_PREFIX seq 5 permit 10.10.10.0/24
ipv6 prefix-list LOCAL_VLAN_IPV6_PREFIX seq 10 permit fc01::/64
!
route-map HIDE_INTERNAL permit 10
set community local-AS
set community no-export
!
!
router bgp 55555
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ ip prefix-list LOCAL_VLAN_IPV4_PREFIX seq 5 permit 10.10.10.0/24
ipv6 prefix-list LOCAL_VLAN_IPV6_PREFIX seq 10 permit fc01::/64
!
route-map HIDE_INTERNAL permit 10
set community local-AS
set community no-export
!
router bgp 55555
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ ipv6 prefix-list PL_LoopbackV6 permit fc00:1::/64
!
!
route-map HIDE_INTERNAL permit 10
set community local-AS
set community no-export
!
!
router bgp 65100
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ ipv6 prefix-list PL_LoopbackV6 permit fc00:1::/64
!
!
route-map HIDE_INTERNAL permit 10
set community local-AS
set community no-export
!
!
router bgp 65100
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ ipv6 prefix-list PL_LoopbackV6 permit fc00:1::/64
!
!
route-map HIDE_INTERNAL permit 10
set community local-AS
set community no-export
!
!
router bgp 65100
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ ipv6 prefix-list PL_LoopbackV6 permit fc00:1::/64
!
!
route-map HIDE_INTERNAL permit 10
set community local-AS
set community no-export
!
!
router bgp 65100
Expand Down

0 comments on commit 08a4d1e

Please sign in to comment.