Skip to content

Commit 2fd97fe

Browse files
authored
[chassis-packet] Allow Fallback Route to get programmed on Downstream LC (sonic-net#21833)
What/Why I did: Initially I made the change that Fallback Route [routes from AH on Upstream LC] not to get programmed [mark them as deny] on Downstream LC's as reasoning was that on Downstream LC's can forward them based on Default-route. However that assumption is correct for example we have topology like this: RH is connected to ASIC0 of Upstream LC AH is connected to ASIC1 of Upstream LC Downstream LC will learn route from RH [including default-route] and will only forward to ASIC0 of upstream LC . Above assumption was fine if we always have AH and RH connected to same ASIC of Upstream LC. How I verify: UT updated Manual Verification.
1 parent f2a76d5 commit 2fd97fe

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

dockers/docker-fpm-frr/frr/bgpd/templates/internal/policies.conf.j2

+4-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@ route-map FROM_BGP_INTERNAL_PEER_V4 permit 2
3939
on-match next
4040
!
4141
{% if CONFIG_DB__DEVICE_METADATA['localhost']['subtype'] == 'DownstreamLC' %}
42-
route-map FROM_BGP_INTERNAL_PEER_V4 deny 3
42+
route-map FROM_BGP_INTERNAL_PEER_V4 permit 3
4343
match community DEVICE_INTERNAL_FALLBACK_COMMUNITY
44+
set comm-list DEVICE_INTERNAL_FALLBACK_COMMUNITY delete
4445
{% else %}
4546
route-map FROM_BGP_INTERNAL_PEER_V4 permit 3
4647
match community DEVICE_INTERNAL_FALLBACK_COMMUNITY
@@ -63,8 +64,9 @@ route-map FROM_BGP_INTERNAL_PEER_V6 permit 3
6364
on-match next
6465
!
6566
{% if CONFIG_DB__DEVICE_METADATA['localhost']['subtype'] == 'DownstreamLC' %}
66-
route-map FROM_BGP_INTERNAL_PEER_V6 deny 4
67+
route-map FROM_BGP_INTERNAL_PEER_V6 permit 4
6768
match community DEVICE_INTERNAL_FALLBACK_COMMUNITY
69+
set comm-list DEVICE_INTERNAL_FALLBACK_COMMUNITY delete
6870
{% else %}
6971
route-map FROM_BGP_INTERNAL_PEER_V6 permit 4
7072
match community DEVICE_INTERNAL_FALLBACK_COMMUNITY

src/sonic-bgpcfgd/tests/data/internal/policies.conf/result_chasiss_packet.conf

+4-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ route-map FROM_BGP_INTERNAL_PEER_V4 permit 2
1515
set local-preference 80
1616
on-match next
1717
!
18-
route-map FROM_BGP_INTERNAL_PEER_V4 deny 3
18+
route-map FROM_BGP_INTERNAL_PEER_V4 permit 3
1919
match community DEVICE_INTERNAL_FALLBACK_COMMUNITY
20+
set comm-list DEVICE_INTERNAL_FALLBACK_COMMUNITY delete
2021
!
2122
route-map FROM_BGP_INTERNAL_PEER_V6 permit 1
2223
set ipv6 next-hop prefer-global
@@ -32,8 +33,9 @@ route-map FROM_BGP_INTERNAL_PEER_V6 permit 3
3233
set local-preference 80
3334
on-match next
3435
!
35-
route-map FROM_BGP_INTERNAL_PEER_V6 deny 4
36+
route-map FROM_BGP_INTERNAL_PEER_V6 permit 4
3637
match community DEVICE_INTERNAL_FALLBACK_COMMUNITY
38+
set comm-list DEVICE_INTERNAL_FALLBACK_COMMUNITY delete
3739
!
3840
route-map TO_BGP_INTERNAL_PEER_V4 permit 1
3941
match ip address prefix-list PL_LoopbackV4

0 commit comments

Comments
 (0)