[muti-asic] Updated BGP community for Internal routes (#7617)

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
This commit is contained in:
abdosi 2021-05-16 19:44:06 -07:00 committed by Abhishek Dosi
parent 3dd3093ddc
commit 57e5077032
8 changed files with 23 additions and 7 deletions

View File

@ -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' %} {% if DEVICE_METADATA['localhost']['sub_role'] == 'FrontEnd' or DEVICE_METADATA['localhost']['sub_role'] == 'BackEnd' %}
route-map HIDE_INTERNAL permit 10 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 %} {% set multi_asic = True %}
! !
{% endif %} {% endif %}

View File

@ -39,7 +39,11 @@ ipv6 prefix-list LOCAL_VLAN_IPV6_PREFIX seq 5 permit fc01::1/64
! !
! !
route-map HIDE_INTERNAL permit 10 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 router bgp 55555

View File

@ -29,6 +29,11 @@
"enabled": true, "enabled": true,
"ipv4": 32, "ipv4": 32,
"ipv6": 32 "ipv6": 32
},
"peers": {
"internal": {
"community": "1234:5678"
}
} }
} }
} }

View File

@ -17,7 +17,8 @@ ipv6 prefix-list LOCAL_VLAN_IPV6_PREFIX seq 15 permit fc01::1/64
! !
! !
route-map HIDE_INTERNAL permit 10 route-map HIDE_INTERNAL permit 10
set community local-AS set community no-export
!
! !
! !
router bgp 55555 router bgp 55555

View File

@ -17,7 +17,8 @@ ipv6 prefix-list LOCAL_VLAN_IPV6_PREFIX seq 15 permit fc01::1/64
! !
! !
route-map HIDE_INTERNAL permit 10 route-map HIDE_INTERNAL permit 10
set community local-AS set community no-export
!
! !
! !
router bgp 55555 router bgp 55555

View File

@ -53,7 +53,7 @@ ip prefix-list LOCAL_VLAN_IPV4_PREFIX seq 10 permit 10.10.10.1/24
ipv6 prefix-list LOCAL_VLAN_IPV6_PREFIX seq 5 permit fc01::1/64 ipv6 prefix-list LOCAL_VLAN_IPV6_PREFIX seq 5 permit fc01::1/64
! !
route-map HIDE_INTERNAL permit 10 route-map HIDE_INTERNAL permit 10
set community local-AS set community no-export
! !
router bgp 55555 router bgp 55555
! !

View File

@ -35,7 +35,7 @@ ipv6 prefix-list PL_LoopbackV6 permit fc00:1::/64
! !
! !
route-map HIDE_INTERNAL permit 10 route-map HIDE_INTERNAL permit 10
set community local-AS set community no-export
! !
! !
router bgp 65100 router bgp 65100

View File

@ -35,7 +35,7 @@ ipv6 prefix-list PL_LoopbackV6 permit fc00:1::/64
! !
! !
route-map HIDE_INTERNAL permit 10 route-map HIDE_INTERNAL permit 10
set community local-AS set community no-export
! !
! !
router bgp 65100 router bgp 65100