sonic-net / sonic-buildimage

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

Conflicting router between mgmt and copp, which will cause to transfer data failed. #3165

Open Harrison-SH opened 5 years ago

Harrison-SH commented 5 years ago

BUG REPORT INFORMATION

Description MGMT router of eth0 had been added into copp router table. Which will cause to conflict between MGMT router and copp router. specially for default router.

Steps to reproduce the issue:

  1. Config eth0 normally
  2. Add default router for copp
  3. MGMT and copp's router will conflict.
  4. Which will cause to transfer packets failed on the default router occasionally

Describe the results you received: admin@sonic:~$ show ip route Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP, T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP, F - PBR, f - OpenFabric,

  • selected route, * - FIB route

S> 0.0.0.0/0 [200/0] via 10.251.0.1, eth0, 00:02:51 C> 10.1.0.1/32 is directly connected, lo, 00:02:51 C>* 10.251.0.0/24 is directly connected, eth0, 00:02:51 admin@sonic:~$ docker exec -it bgp bash root@sonic:/# ip route default via 10.251.0.1 dev eth0 proto 196 metric 20

prsunny commented 5 years ago

defaultroute via eth0 is in "default" route table and not in the main table.

Harrison-SH commented 5 years ago

Maybe the implementation has some potential problem. This issue is not easy to reproduce. Just very occasionally happens. I have debugged it. We have following default route within bgp container,: root@cel-seastone-01:/# ip route|more default proto 186 src 10.1.0.32 metric 20 nexthop via 10.0.0.57 dev PortChannel0001 weight 1 nexthop via 10.0.0.59 dev PortChannel0002 weight 1 nexthop via 10.0.0.61 dev PortChannel0003 weight 1 nexthop via 10.0.0.63 dev PortChannel0004 weight 1 But Relevant packets couldn't follow this router to transfer very occasionally. I have done the action of deleting the router of "0.0.0.0/0". It will trigger the router to work well. the relevant packets will be transfer to the defined channel.