Skip to content

Commit

Permalink
[chassis/multi-asic] Enable Sending BGP Community over internal neigh…
Browse files Browse the repository at this point in the history
…bors over iBGP Session (sonic-net#16705)

What I did:
Enable Sending BGP Community over internal neighbors over iBGP Session

Microsoft ADO: 25268695

Why I did:
Without this change BGP community send by e-BGP Peers are not carry-forward to other e-BGP peers.


str2-xxxx-lc1-2# show bgp ipv6  20c0:a801::/64
BGP routing table entry for 20c0:a801::/64, version 52141
Paths: (1 available, best #1, table default)
  Not advertised to any peer
  65000 65500
    2603:10e2:400::6 from 2603:10e2:400::6 (3.3.3.6)
      Origin IGP, localpref 100, valid, internal, best (First path received)
      Last update: Tue Sep 26 16:08:26 2023
str2-xxxx-lc1-2# show ip bgp 192.168.35.128/25
BGP routing table entry for 192.168.35.128/25, version 52688
Paths: (1 available, best #1, table default)
  Not advertised to any peer
  65000 65502
    3.3.3.6 from 3.3.3.6 (3.3.3.6)
      Origin IGP, localpref 100, valid, internal, best (First path received)
      Last update: Tue Sep 26 15:45:51 2023

After the change

str2-xxxx-lc2-2(config)# router bgp 65100
str2-xxxx-lc2-2(config-router)# address-family ipv4
str2-xxxx-lc2-2(config-router-af)# neighbor INTERNAL_PEER_V4 send-community
str2-xxxx-lc2-2(config-router-af)# exit
str2-xxxx-lc2-2(config-router)# address-family ipv6
str2-xxxx-lc2-2(config-router-af)# neighbor INTERNAL_PEER_V6 send-community
str2-xxxx-lc1-2# show bgp ipv6  20c0:a801::/64
BGP routing table entry for 20c0:a801::/64, version 52400
Paths: (1 available, best #1, table default)
  Not advertised to any peer
  65000 65500
    2603:10e2:400::6 from 2603:10e2:400::6 (3.3.3.6)
      Origin IGP, localpref 100, valid, internal, best (First path received)
      **Community: 1111:1111**
      Last update: Tue Sep 26 16:10:19 2023
str2-xxxx-lc1-2# show ip bgp 192.168.35.128/25
BGP routing table entry for 192.168.35.128/25, version 52947
Paths: (1 available, best #1, table default)
  Not advertised to any peer
  65000 65502
    3.3.3.6 from 3.3.3.6 (3.3.3.6)
      Origin IGP, localpref 100, valid, internal, best (First path received)
      **Community: 1111:1111**
      Last update: Tue Sep 26 16:10:09 2023

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
  • Loading branch information
abdosi authored and mssonicbld committed Oct 20, 2023
1 parent 0874208 commit 366d558
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
neighbor INTERNAL_PEER_V4 allowas-in 1
neighbor INTERNAL_PEER_V4 route-map FROM_BGP_INTERNAL_PEER_V4 in
neighbor INTERNAL_PEER_V4 route-map TO_BGP_INTERNAL_PEER_V4 out
neighbor INTERNAL_PEER_V4 send-community
exit-address-family
address-family ipv6
{% if CONFIG_DB__DEVICE_METADATA['localhost']['switch_type'] == 'chassis-packet' %}
Expand All @@ -25,6 +26,7 @@
neighbor INTERNAL_PEER_V6 allowas-in 1
neighbor INTERNAL_PEER_V6 route-map FROM_BGP_INTERNAL_PEER_V6 in
neighbor INTERNAL_PEER_V6 route-map TO_BGP_INTERNAL_PEER_V6 out
neighbor INTERNAL_PEER_V6 send-community
exit-address-family
!
! end of template: bgpd/templates/internal/peer-group.conf.j2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
neighbor VOQ_CHASSIS_V4_PEER soft-reconfiguration inbound
neighbor VOQ_CHASSIS_V4_PEER route-map FROM_VOQ_CHASSIS_V4_PEER in
neighbor VOQ_CHASSIS_V4_PEER route-map TO_VOQ_CHASSIS_V4_PEER out
neighbor VOQ_CHASSIS_V4_PEER send-community
exit-address-family
address-family ipv6
{% if CONFIG_DB__DEVICE_METADATA['localhost']['type'] == 'ToRRouter' %}
Expand All @@ -22,6 +23,7 @@
neighbor VOQ_CHASSIS_V6_PEER soft-reconfiguration inbound
neighbor VOQ_CHASSIS_V6_PEER route-map FROM_VOQ_CHASSIS_V6_PEER in
neighbor VOQ_CHASSIS_V6_PEER route-map TO_VOQ_CHASSIS_V6_PEER out
neighbor VOQ_CHASSIS_V6_PEER send-community
exit-address-family
!
! end of template: bgpd/templates/voq_chassis/peer-group.conf.j2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
neighbor INTERNAL_PEER_V4 allowas-in 1
neighbor INTERNAL_PEER_V4 route-map FROM_BGP_INTERNAL_PEER_V4 in
neighbor INTERNAL_PEER_V4 route-map TO_BGP_INTERNAL_PEER_V4 out
neighbor INTERNAL_PEER_V4 send-community
exit-address-family
address-family ipv6
neighbor INTERNAL_PEER_V6 route-reflector-client
neighbor INTERNAL_PEER_V6 soft-reconfiguration inbound
neighbor INTERNAL_PEER_V6 allowas-in 1
neighbor INTERNAL_PEER_V6 route-map FROM_BGP_INTERNAL_PEER_V6 in
neighbor INTERNAL_PEER_V6 route-map TO_BGP_INTERNAL_PEER_V6 out
neighbor INTERNAL_PEER_V6 send-community
exit-address-family
!
! end of template: bgpd/templates/internal/peer-group.conf.j2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
neighbor INTERNAL_PEER_V4 allowas-in 1
neighbor INTERNAL_PEER_V4 route-map FROM_BGP_INTERNAL_PEER_V4 in
neighbor INTERNAL_PEER_V4 route-map TO_BGP_INTERNAL_PEER_V4 out
neighbor INTERNAL_PEER_V4 send-community
exit-address-family
address-family ipv6
neighbor INTERNAL_PEER_V6 update-source Loopback4096
neighbor INTERNAL_PEER_V6 soft-reconfiguration inbound
neighbor INTERNAL_PEER_V6 allowas-in 1
neighbor INTERNAL_PEER_V6 route-map FROM_BGP_INTERNAL_PEER_V6 in
neighbor INTERNAL_PEER_V6 route-map TO_BGP_INTERNAL_PEER_V6 out
neighbor INTERNAL_PEER_V6 send-community
exit-address-family
!
! end of template: bgpd/templates/internal/peer-group.conf.j2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
neighbor INTERNAL_PEER_V4 allowas-in 1
neighbor INTERNAL_PEER_V4 route-map FROM_BGP_INTERNAL_PEER_V4 in
neighbor INTERNAL_PEER_V4 route-map TO_BGP_INTERNAL_PEER_V4 out
neighbor INTERNAL_PEER_V4 send-community
exit-address-family
address-family ipv6
neighbor INTERNAL_PEER_V6 soft-reconfiguration inbound
neighbor INTERNAL_PEER_V6 allowas-in 1
neighbor INTERNAL_PEER_V6 route-map FROM_BGP_INTERNAL_PEER_V6 in
neighbor INTERNAL_PEER_V6 route-map TO_BGP_INTERNAL_PEER_V6 out
neighbor INTERNAL_PEER_V6 send-community
exit-address-family
!
! end of template: bgpd/templates/internal/peer-group.conf.j2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
neighbor VOQ_CHASSIS_V4_PEER soft-reconfiguration inbound
neighbor VOQ_CHASSIS_V4_PEER route-map FROM_VOQ_CHASSIS_V4_PEER in
neighbor VOQ_CHASSIS_V4_PEER route-map TO_VOQ_CHASSIS_V4_PEER out
neighbor VOQ_CHASSIS_V4_PEER send-community
exit-address-family
address-family ipv6
neighbor VOQ_CHASSIS_V6_PEER allowas-in 1
Expand All @@ -18,6 +19,7 @@
neighbor VOQ_CHASSIS_V6_PEER soft-reconfiguration inbound
neighbor VOQ_CHASSIS_V6_PEER route-map FROM_VOQ_CHASSIS_V6_PEER in
neighbor VOQ_CHASSIS_V6_PEER route-map TO_VOQ_CHASSIS_V6_PEER out
neighbor VOQ_CHASSIS_V6_PEER send-community
exit-address-family
!
! end of template: bgpd/templates/voq_chassis/peer-group.conf.j2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
neighbor VOQ_CHASSIS_V4_PEER soft-reconfiguration inbound
neighbor VOQ_CHASSIS_V4_PEER route-map FROM_VOQ_CHASSIS_V4_PEER in
neighbor VOQ_CHASSIS_V4_PEER route-map TO_VOQ_CHASSIS_V4_PEER out
neighbor VOQ_CHASSIS_V4_PEER send-community
exit-address-family
address-family ipv6
neighbor VOQ_CHASSIS_V6_PEER activate
neighbor VOQ_CHASSIS_V6_PEER addpath-tx-all-paths
neighbor VOQ_CHASSIS_V6_PEER soft-reconfiguration inbound
neighbor VOQ_CHASSIS_V6_PEER route-map FROM_VOQ_CHASSIS_V6_PEER in
neighbor VOQ_CHASSIS_V6_PEER route-map TO_VOQ_CHASSIS_V6_PEER out
neighbor VOQ_CHASSIS_V6_PEER send-community
exit-address-family
!
! end of template: bgpd/templates/voq_chassis/peer-group.conf.j2
Expand Down

0 comments on commit 366d558

Please sign in to comment.