sonic-net / sonic-buildimage

Scripts which perform an installable binary image build for SONiC
Other
735 stars 1.42k forks source link

[IPv6 BGP] Unable to update routes to eBGP peer #5944

Open CLUDev opened 3 years ago

CLUDev commented 3 years ago

Description

Switch is unable to update its BGP routes to peer if its peer does not use FRR to config IPv6 BGP.

Steps to reproduce the issue:

  1. Config IPv6 BGP on DUT_FRR (ex. use 201911 branch)

    router bgp 901 bgp router-id 192.168.91.1 neighbor 2222::2 remote-as 222 neighbor 2222::2 timers 30 90 address-family ipv6 unicast network 2014:192:168:91::1/128 neighbor 2222::2 activate

  1. Config IPv6 BGP on DUT_Quagga (ex. use 201807 branch)

    router bgp 222 bgp router-id 2.2.2.2 neighbor 2222::1 remote-as 901 neighbor 2222::1 timers 30 90 address-family ipv6 network 2014:1111::2/128 neighbor 2222::1 activate

Describe the results you received: Check BGP Route on Both DUTs I. DUT_FRR can receive DUT_Quagga's BGP route

        # show ipv6 route
        Codes: K - kernel route, C - connected, S - static, R - RIPng,
        O - OSPFv3, I - IS-IS, B - BGP, N - NHRP, T - Table,
        v - VNC, V - VNC-Direct, A - Babel, D - SHARP, F - PBR,
        f - OpenFabric,
        > - selected route, * - FIB route, q - queued route, r - rejected route
        C>* 2014:182:123::/64 is directly connected, eth0, 01w3d04h
        C>* 2014:192:168:91::1/128 is directly connected, Loopback0, 01w3d04h
        B>* 2014:1111::2/128 [20/0] via fe80::3a68:ddff:fe06:b0b4, Ethernet47, 00:00:14
        C>* 2222::/64 is directly connected, Ethernet47, 01:12:21
        C * fe80::/64 is directly connected, Ethernet47, 01:12:21
        C * fe80::/64 is directly connected, Bridge, 01w3d04h
        C * fe80::/64 is directly connected, Ethernet0, 01w3d04h
        C * fe80::/64 is directly connected, Loopback0, 01w3d04h
        C>* fe80::/64 is directly connected, eth0, 01w3d04h

II. DUT_Quagga cannot receive DUT_FRR's BGP route

       SONiC-201807-28(config-router-af)# do show ipv6 route
       Codes: K - kernel route, C - connected, S - static, R - RIPng,
       O - OSPFv6, I - IS-IS, B - BGP, A - Babel,
       > - selected route, * - FIB route
       C>* ::1/128 is directly connected, lo
       C>* 2014:1111::2/128 is directly connected, lo
       C>* 2222::/64 is directly connected, Ethernet47
       C * fe80::/64 is directly connected, Ethernet47
       C * fe80::/64 is directly connected, Ethernet76
       C * fe80::/64 is directly connected, Ethernet1
       C * fe80::/64 is directly connected, Ethernet0
       C * fe80::/64 is directly connected, Bridge
       C>* fe80::/64 is directly connected, eth0

Describe the results you expected: DUT_FRR should be able to update its BGP routes to peer, and DUT_Quagga should receive UPDATE message, instead of NOTIFICATEION message

Additional information you deem important (e.g. issue happens only occasionally):

  1. ASIC: Broadcom Triden 3

  2. IPv6 eBGP can be connected and update BGP routes with the following setup 1.1 DUT_FRR_1 <-> DUT_FRR_2 1.2 DUT_Quagga_1 <-> DUT_Quagga_2

  3. DUT_Quagga sends "OPEN" message with a "Malformed Packet: BGP" Error

Open_Message_Malformed_Packet

4. When DUT_Quagga sends "UPDATE" message to DUT_FRR,
   DUT_FRR sends "NOTIFICATION" message to 

Notification_Message_From_FRR

Output of show version:

```
root@sonic# show version
SONiC Software Version: SONiC.sonic-brcm-ga-201911-1
Distribution: Debian 9.12
Kernel: 4.9.0-11-2-amd64
Build commit: 696be67f
Build date: Wed Jun 10 00:00:24 UTC 2020
Built by: inventec@Jupiter

Platform: x86_64-inventec_d6356-r0
HwSKU: INVENTEC-D6356
ASIC: broadcom
Serial Number: CKS7394Y00G
Uptime: 17:22:47 up 14 days, 22:41,  1 user,  load average: 3.89, 4.06, 4.08

Docker images:
REPOSITORY                    TAG                      IMAGE ID            SIZE
docker-syncd-brcm             latest                   6a8536eba40c        433MB
docker-syncd-brcm             sonic-brcm-ga-201911-1   6a8536eba40c        433MB
docker-router-advertiser      latest                   d36786a3f676        306MB
docker-router-advertiser      sonic-brcm-ga-201911-1   d36786a3f676        306MB
docker-platform-monitor       latest                   ec236ee5a097        357MB
docker-platform-monitor       sonic-brcm-ga-201911-1   ec236ee5a097        357MB
docker-fpm-frr                latest                   7135e9a04925        350MB
docker-fpm-frr                sonic-brcm-ga-201911-1   7135e9a04925        350MB
docker-sflow                  latest                   c7c55f30f476        330MB
docker-sflow                  sonic-brcm-ga-201911-1   c7c55f30f476        330MB
docker-sonic-mgmt-framework   latest                   d93b6ffabd3d        445MB
docker-sonic-mgmt-framework   sonic-brcm-ga-201911-1   d93b6ffabd3d        445MB
docker-lldp-sv2               latest                   e277f2366d37        327MB
docker-lldp-sv2               sonic-brcm-ga-201911-1   e277f2366d37        327MB
docker-dhcp-relay             latest                   fb180de5b5e1        316MB
docker-dhcp-relay             sonic-brcm-ga-201911-1   fb180de5b5e1        316MB
docker-database               latest                   323990982f08        306MB
docker-database               sonic-brcm-ga-201911-1   323990982f08        306MB
docker-snmp-sv2               latest                   4dc6fc11f44d        363MB
docker-snmp-sv2               sonic-brcm-ga-201911-1   4dc6fc11f44d        363MB
docker-orchagent              latest                   b1bbaf099949        348MB
docker-orchagent              sonic-brcm-ga-201911-1   b1bbaf099949        348MB
docker-teamd                  latest                   d6b78b56a791        330MB
docker-teamd                  sonic-brcm-ga-201911-1   d6b78b56a791        330MB
docker-nat                    latest                   c69740f70ce8        331MB
docker-nat                    sonic-brcm-ga-201911-1   c69740f70ce8        331MB
```

**Attach debug file `sudo generate_dump`:**

```
(paste your output here)
```
anshuv-mfst commented 3 years ago

@pavel-shirshov, @arlakshm - Can you please look into this issue. Thanks!

rlhui commented 3 years ago

@CLUDev - what's the image being used here, is it based on sonic community 201911 branch? Can you please attach "show tech" file as well?

pavel-shirshov commented 3 years ago

Hi @CLUDev

Can you please copy 'show run' from both SONiC and other device here?

Thanks

CLUDev commented 3 years ago

@rlhui @pavel-shirshov Thank you for checking this issue! The previous scenario could not be reproduced, I've updated a reproducible scenario with configurations listed below.

Please find SONiC 201911 "show tech" and "show run all" output here show_run_output.txt sonic_dump_Maple-201911_20201214_063352_show_tech.tar.gz

I. Update IPV6 BGP Config of SONiC & Other device

== Other Device (using Quagga) ==

interface 0/32
no auto-negotiate
no fec
service-policy in RDMA
no shutdown
routing
ipv6 address 1111::1/64
ipv6 enable
exit

router bgp 700
bgp router-id 7.7.1.4
maximum-paths 4
network 192.168.71.1 mask 255.255.255.255
neighbor 1111::2 remote-as 222
address-family vpnv4 unicast
exit
address-family ipv6
network 2014:192:168:71::1/128
neighbor 1111::2 activate
exit
== SONiC 201911 (using FRR) ==

router bgp 222
 bgp router-id 2.2.2.2
 bgp log-neighbor-changes
 no bgp default ipv4-unicast
 bgp graceful-restart restart-time 240
 bgp graceful-restart
 bgp graceful-restart preserve-fw-state
 bgp bestpath as-path multipath-relax
 neighbor PEER_V4 peer-group
 neighbor PEER_V4_INT peer-group
 neighbor PEER_V6 peer-group
 neighbor PEER_V6_INT peer-group
 neighbor 1111::1 remote-as 700
 neighbor 1111::1 peer-group PEER_V6
 neighbor 1111::1 description Redwood2
 neighbor 1111::1 timers 30 90
 !
 address-family ipv4 unicast
  network 2.2.2.2/32
  neighbor PEER_V4 soft-reconfiguration inbound
  neighbor PEER_V4 route-map FROM_BGP_PEER_V4 in
  neighbor PEER_V4 route-map TO_BGP_PEER_V4 out
  neighbor PEER_V4_INT soft-reconfiguration inbound
  neighbor PEER_V4_INT route-map FROM_BGP_PEER_V4 in
  neighbor PEER_V4_INT route-map TO_BGP_PEER_V4 out
  maximum-paths 64
 exit-address-family
 !
 address-family ipv6 unicast
  network 2020:2222::/64
  neighbor PEER_V6 soft-reconfiguration inbound
  neighbor PEER_V6 route-map FROM_BGP_PEER_V6 in
  neighbor PEER_V6 route-map TO_BGP_PEER_V6 out
  neighbor PEER_V6_INT soft-reconfiguration inbound
  neighbor PEER_V6_INT route-map FROM_BGP_PEER_V6 in
  neighbor PEER_V6_INT route-map TO_BGP_PEER_V6 out
  neighbor 1111::1 activate
  maximum-paths 64
 exit-address-family

II. Check BGP Summary from SONiC 201911 Unable to establish IPv6 BGP with other device

root@Maple-201911:/home/admin# show ipv6 bgp summary

IPv6 Unicast Summary:
BGP router identifier 2.2.2.2, local AS number 222 vrf-id 0
BGP table version 26261
RIB entries 1, using 184 bytes of memory
Peers 1, using 20 KiB of memory
Peer groups 4, using 256 bytes of memory

Neighbor        V         AS MsgRcvd MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   NeighborName
1111::1         4        700    6121    6067        0    0    0 00:00:00         Idle   Redwood2

Total number of neighbors 1
root@Maple-201911:/home/admin# show ipv6 bgp summary

IPv6 Unicast Summary:
BGP router identifier 2.2.2.2, local AS number 222 vrf-id 0
BGP table version 26261
RIB entries 1, using 184 bytes of memory
Peers 1, using 20 KiB of memory
Peer groups 4, using 256 bytes of memory

Neighbor        V         AS MsgRcvd MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   NeighborName
1111::1         4        700    6121    6068        0    0    0 00:00:02       Active   Redwood2

Total number of neighbors 1
root@Maple-201911:/home/admin# show ipv6 bgp summary

IPv6 Unicast Summary:
BGP router identifier 2.2.2.2, local AS number 222 vrf-id 0
BGP table version 26261
RIB entries 1, using 184 bytes of memory
Peers 1, using 20 KiB of memory
Peer groups 4, using 256 bytes of memory

Neighbor        V         AS MsgRcvd MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   NeighborName
1111::1         4        700    6123    6070        0    0    0 00:00:00            0   Redwood2

Total number of neighbors 1
root@Maple-201911:/home/admin# show ipv6 bgp summary

IPv6 Unicast Summary:
BGP router identifier 2.2.2.2, local AS number 222 vrf-id 0
BGP table version 26287
RIB entries 1, using 184 bytes of memory
Peers 1, using 20 KiB of memory
Peer groups 4, using 256 bytes of memory

Neighbor        V         AS MsgRcvd MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   NeighborName
1111::1         4        700    6127    6073        0    0    0 00:00:01         Idle   Redwood2

Total number of neighbors 1
CLUDev commented 3 years ago

@pavel-shirshov Any comments would be highly appreciated!