Closed arlakshm closed 2 years ago
Hi @arlakshm,
I have started to fix the issue. I managed to reproduce it only after reboot:
admin@sonic:~$ redis-cli KEYS *0.0.0.0*
1) "INTF_TABLE:Ethernet0:10.0.0.0/31"
admin@sonic:~$ sudo ifconfig eth0 down
admin@sonic:~$ redis-cli KEYS *0.0.0.0*
1) "INTF_TABLE:Ethernet0:10.0.0.0/31"
sudo reboot
admin@sonic:~$ redis-cli KEYS *0.0.0.0*
(empty array)
admin@sonic:~$ sudo route add default gw 192.168.111.3 eth0
admin@sonic:~$ redis-cli KEYS *0.0.0.0*
1) "INTF_TABLE:Ethernet0:10.0.0.0/31"
Then I added
"MGMT_INTERFACE": {
"eth0|192.168.111.214/24": {
"gwaddr": "192.168.111.3"
}
}
to the /etc/sonic/config_db.json
and did "config load",
so I got
admin@sonic:~$ show management_interface address
Management IP address = 192.168.111.214/24
Management Network Default Gateway = 192.168.111.3
After it I cannot reproduce the issue even after reboot. (Immediately after reboot I get (empty array), but after several seconds it works normally.)
Also adding MGMT_INTERFACE fixed such an issue:
admin@sonic:~$ ip route show 0.0.0.0/0
default via 192.168.111.3 dev eth0
admin@sonic:~$ sudo ifconfig eth0 down
admin@sonic:~$ ip route show 0.0.0.0/0
admin@sonic:~$ sudo ifconfig eth0 up
admin@sonic:~$ ip route show 0.0.0.0/0
admin@sonic:~$
Platform is "mellanox".
Is it the decision? Do I understand everything right?
Best regards, Marat Gubaiev
Fixed by patch
Description
On making port
eth0
down the default route is removed fromAPP_DB
.Steps to reproduce the issue:
Describe the results you received:
The default route is removed from the APP_DB.
Describe the results you expected:
The default route should not be removed from APP_DB. The default route is added back only after shutdown and startup of BGP session.
Output of
show version
:This issue is seen on Master, 20201231 and 202106 branches.
CLI output
eth0
and check the default route in Kernal and APP_DBadmin@sonic:~$ show ip bgp summary
IPv4 Unicast Summary: BGP router identifier 10.1.0.32, local AS number 65100 vrf-id 0 BGP table version 6428 RIB entries 12851, using 2467392 bytes of memory Peers 24, using 523584 KiB of memory Peer groups 4, using 256 bytes of memory
Neighbhor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd NeighborName
10.0.0.1 4 65200 3197 29 0 0 0 00:07:05 6370 ARISTA01T2 10.0.0.5 4 65200 3200 31 0 0 0 00:07:05 6370 ARISTA03T2 10.0.0.9 4 65200 3197 29 0 0 0 00:07:05 6370 ARISTA05T2 10.0.0.13 4 65200 3197 30 0 0 0 00:07:05 6370 ARISTA07T2 10.0.0.17 4 65200 3197 29 0 0 0 00:07:05 6370 ARISTA09T2 10.0.0.21 4 65200 3197 29 0 0 0 00:07:05 6370 ARISTA11T2 10.0.0.25 4 65200 3197 29 0 0 0 00:07:05 6370 ARISTA13T2 10.0.0.29 4 65200 3197 30 0 0 0 00:07:05 6370 ARISTA15T2 10.0.0.33 4 64001 14 3215 0 0 0 00:07:07 4 ARISTA01T0 10.0.0.35 4 64002 12 3213 0 0 0 00:06:24 3 ARISTA02T0 10.0.0.37 4 64003 13 3213 0 0 0 00:06:24 4 ARISTA03T0 10.0.0.39 4 64004 12 3213 0 0 0 00:06:24 3 ARISTA04T0 10.0.0.41 4 64005 12 3213 0 0 0 00:06:24 3 ARISTA05T0 10.0.0.43 4 64006 12 3213 0 0 0 00:06:24 3 ARISTA06T0 10.0.0.45 4 64007 12 3213 0 0 0 00:06:24 3 ARISTA07T0 10.0.0.47 4 64008 12 3213 0 0 0 00:06:20 3 ARISTA08T0 10.0.0.49 4 64009 12 3213 0 0 0 00:06:20 3 ARISTA09T0 10.0.0.51 4 64010 12 3213 0 0 0 00:06:20 3 ARISTA10T0 10.0.0.53 4 64011 12 3213 0 0 0 00:06:20 3 ARISTA11T0 10.0.0.55 4 64012 12 3213 0 0 0 00:06:20 3 ARISTA12T0 10.0.0.57 4 64013 12 3213 0 0 0 00:06:20 3 ARISTA13T0 10.0.0.59 4 64014 13 3215 0 0 0 00:07:06 3 ARISTA14T0 10.0.0.61 4 64015 13 3215 0 0 0 00:07:06 3 ARISTA15T0 10.0.0.63 4 64016 13 3215 0 0 0 00:07:05 3 ARISTA16T0
Total number of neighbors 24 admin@sonic:~$ show ip route 0.0.0.0/0 Routing entry for 0.0.0.0/0 Known via "static", distance 200, metric 0 Last update 00:00:49 ago 10.3.146.1 inactive, weight 1
Routing entry for 0.0.0.0/0 Known via "bgp", distance 20, metric 0, best Last update 00:07:15 ago
admin@sonic:~$ ip route show 0.0.0.0/0 default proto bgp src 10.1.0.32 metric 20 nexthop via 10.0.0.1 dev PortChannel0002 weight 1 nexthop via 10.0.0.5 dev PortChannel0005 weight 1 nexthop via 10.0.0.9 dev PortChannel0008 weight 1 nexthop via 10.0.0.13 dev PortChannel0011 weight 1 nexthop via 10.0.0.17 dev PortChannel0014 weight 1 nexthop via 10.0.0.21 dev PortChannel0017 weight 1 nexthop via 10.0.0.25 dev PortChannel0020 weight 1 nexthop via 10.0.0.29 dev PortChannel0023 weight 1 admin@sonic:~$ redis-cli KEYS 0.0.0.0/0 (empty array)
Additional information you deem important (e.g. issue happens only occasionally):