Open samKDas opened 4 years ago
I don't see the logs where route 81.1.1.0
is added. NH Group is created when orchagent
gets the route update. can you get the output from APP_DB route table for 81.1.1.0
?
Hi , Below are the logs. root@sonic:/home/admin# 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, q - queued route, r - rejected route
S> 0.0.0.0/0 [200/0] via 10.28.32.1, eth0, 00:20:57 C> 10.1.1.0/24 is directly connected, Vlan1007, 00:19:39 C> 10.28.32.0/23 is directly connected, eth0, 00:20:59 C> 20.1.1.0/24 is directly connected, Vlan1007, 00:19:39 C> 30.1.1.0/24 is directly connected, Vlan1007, 00:19:38 C> 50.1.1.0/24 is directly connected, Ethernet11, 00:19:36 S>* 81.1.1.0/24 [1/0] via 10.1.1.2, Vlan1007, 00:19:03 via 20.1.1.2, Vlan1007, 00:19:03 via 30.1.1.2, Vlan1007, 00:19:03 root@sonic:/home/admin# root@sonic:/home/admin# tail -n200 -f /var/log/syslog | grep swss Jan 20 05:10:16.798078 sonic NOTICE swss#orchagent: :- addRouterIntfs: Create router interface Vlan1007 MTU 9100 Jan 20 05:10:16.811304 sonic NOTICE swss#orchagent: :- addIp2MeRoute: Create IP2me route ip:10.1.1.1 Jan 20 05:10:16.811547 sonic NOTICE swss#orchagent: :- addDirectedBroadcast: Add broadcast route for ip:10.1.1.255 Jan 20 05:10:17.362035 sonic NOTICE swss#orchagent: :- addIp2MeRoute: Create IP2me route ip:20.1.1.1 Jan 20 05:10:17.362845 sonic NOTICE swss#orchagent: :- addDirectedBroadcast: Add broadcast route for ip:20.1.1.255 Jan 20 05:10:17.877059 sonic NOTICE swss#orchagent: :- addIp2MeRoute: Create IP2me route ip:30.1.1.1 Jan 20 05:10:17.877411 sonic NOTICE swss#orchagent: :- addDirectedBroadcast: Add broadcast route for ip:30.1.1.255 Jan 20 05:10:20.272123 sonic NOTICE swss#orchagent: :- addRouterIntfs: Create router interface Ethernet11 MTU 9100 Jan 20 05:10:20.280903 sonic NOTICE swss#orchagent: :- addIp2MeRoute: Create IP2me route ip:50.1.1.1 Jan 20 05:12:46.520263 sonic INFO swss#supervisord 2017-01-20 05:12:44,594 INFO exited: enable_counters (exit status 0; expected) Jan 20 05:14:13.801914 sonic NOTICE swss#orchagent: :- addNeighbor: Created neighbor 00:00:08:26:e0:b9 on Vlan1007 Jan 20 05:14:13.802803 sonic NOTICE swss#orchagent: :- addNextHop: Created next hop 10.1.1.2 on Vlan1007 Jan 20 05:14:27.068828 sonic NOTICE swss#orchagent: :- addNeighbor: Created neighbor 00:00:08:27:67:4e on Vlan1007 Jan 20 05:14:27.069333 sonic NOTICE swss#orchagent: :- addNextHop: Created next hop 20.1.1.2 on Vlan1007 Jan 20 05:14:48.964548 sonic NOTICE swss#orchagent: :- addNeighbor: Created neighbor 00:00:08:28:11:69 on Ethernet11 Jan 20 05:14:48.965131 sonic NOTICE swss#orchagent: :- addNextHop: Created next hop 50.1.1.2 on Ethernet11
^C root@sonic:/home/admin# root@sonic:/home/admin# redis-cli -n 0 KEYS ROUTE 1) "ROUTE_TABLE:20.1.1.0/24" 2) "ROUTE_TABLE:fe80::/64" 3) "ROUTE_TABLE:0.0.0.0/0" 4) "ROUTE_TABLE:81.1.1.0/24" 5) "ROUTE_TABLE:10.1.1.0/24" 6) "ROUTE_TABLE:10.28.32.0/23" 7) "ROUTE_TABLE:30.1.1.0/24" 8) "ROUTE_TABLE:50.1.1.0/24" root@sonic:/home/admin# root@sonic:/home/admin# root@sonic:/home/admin#
One more point which was noticed is the nextHop Group gets created only when the 3rd next Hop 30.1.1.2 is arp gets resolved. When all the next hops to a destination network are resolved , then only the nextHop Group gets created.
Regards Sambit
Hi , In our test scenario , a vlan interface is created and 3 ips are added to the Vlan Interface. 3 nexthop ips for a destination network (81.1.1.0/24)are added which are in the same respective subnets of the above Vlan interface ips. We resolved arp for only two next hops. Even though we have 2 valid next hops for the same destination network, sonic doesn't create a NextHopGroup. The following are the logs .
root@sonic:/home/admin# config vlan add 1007 root@sonic:/home/admin# config vlan member add 1007 Ethernet8 root@sonic:/home/admin# config vlan member add 1007 Ethernet9 root@sonic:/home/admin# config vlan member add 1007 Ethernet10 root@sonic:/home/admin# root@sonic:/home/admin# root@sonic:/home/admin# show vlan brief +-----------+--------------+------------+----------------+-----------------------+ | VLAN ID | IP Address | Ports | Port Tagging | DHCP Helper Address | +===========+==============+============+================+=======================+ | 1007 | | Ethernet8 | tagged | | | | | Ethernet9 | tagged | | | | | Ethernet10 | tagged | | +-----------+--------------+------------+----------------+-----------------------+ root@sonic:/home/admin# root@sonic:/home/admin# root@sonic:/home/admin# config interface ip add Vlan1007 10.1.1.1/24 root@sonic:/home/admin# config interface ip add Vlan1007 20.1.1.1/24 root@sonic:/home/admin# config interface ip add Vlan1007 30.1.1.1/24 root@sonic:/home/admin# root@sonic:/home/admin# root@sonic:/home/admin# vtysh
Hello, this is FRRouting (version 7.2-sonic). Copyright 1996-2005 Kunihiro Ishiguro, et al.
sonic# sonic# sonic# conf t sonic(config)# config interface ip add Vlan1007 10.1.1.1/24 % Unknown command: config interface ip add Vlan1007 10.1.1.1/24 sonic(config)# config interface ip add Vlan1007 20.1.1.1/24 % Unknown command: config interface ip add Vlan1007 20.1.1.1/24 sonic(config)# config interface ip add Vlan1007 30.1.1.1/24 % Unknown command: config interface ip add Vlan1007 30.1.1.1/24 sonic(config)# sonic(config)# sonic(config)# ip route 81.1.1.0 255.255.255.0 10.1.1.2 sonic(config)# ip route 81.1.1.0 255.255.255.0 20.1.1.2 sonic(config)# ip route 81.1.1.0 255.255.255.0 30.1.1.2 sonic(config)# sonic(config)# sonic(config)# exit sonic# exit root@sonic:/home/admin# 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,
S> 0.0.0.0/0 [200/0] via 10.28.32.1, eth0, 00:03:56 C> 10.1.1.0/24 is directly connected, Vlan1007, 00:01:58 C> 10.28.32.0/23 is directly connected, eth0, 00:03:57 C> 20.1.1.0/24 is directly connected, Vlan1007, 00:01:57 C> 30.1.1.0/24 is directly connected, Vlan1007, 00:01:55 S> 81.1.1.0/24 [1/0] via 10.1.1.2, Vlan1007, 00:00:21 via 20.1.1.2, Vlan1007, 00:00:21 via 30.1.1.2, Vlan1007, 00:00:21 root@sonic:/home/admin# root@sonic:/home/admin# root@sonic:/home/admin# root@sonic:/home/admin# tail -n200 -f /var/log/syslog | grep swss Jan 19 19:36:35.535319 sonic NOTICE swss#orchagent: :- addVlan: Create an empty VLAN Vlan1007 vid:1007 Jan 19 19:36:36.081641 sonic NOTICE swss#orchagent: :- setHostIntfsStripTag: Set SAI_HOSTIF_VLAN_TAG_KEEP to host interface: Ethernet8 Jan 19 19:36:36.081844 sonic NOTICE swss#orchagent: :- addBridgePort: Add bridge port Ethernet8 to default 1Q bridge Jan 19 19:36:36.084313 sonic NOTICE swss#orchagent: :- addVlanMember: Add member Ethernet8 to VLAN Vlan1007 vid:1007 pid1000000000009 Jan 19 19:36:36.615909 sonic NOTICE swss#orchagent: :- setHostIntfsStripTag: Set SAI_HOSTIF_VLAN_TAG_KEEP to host interface: Ethernet9 Jan 19 19:36:36.616063 sonic NOTICE swss#orchagent: :- addBridgePort: Add bridge port Ethernet9 to default 1Q bridge Jan 19 19:36:36.616928 sonic NOTICE swss#orchagent: :- addVlanMember: Add member Ethernet9 to VLAN Vlan1007 vid:1007 pid100000000000a Jan 19 19:36:38.187778 sonic NOTICE swss#orchagent: :- setHostIntfsStripTag: Set SAI_HOSTIF_VLAN_TAG_KEEP to host interface: Ethernet10 Jan 19 19:36:38.187778 sonic NOTICE swss#orchagent: :- addBridgePort: Add bridge port Ethernet10 to default 1Q bridge Jan 19 19:36:38.188237 sonic NOTICE swss#orchagent: :- addVlanMember: Add member Ethernet10 to VLAN Vlan1007 vid:1007 pid100000000000b Jan 19 19:37:10.547675 sonic NOTICE swss#orchagent: :- addRouterIntfs: Create router interface Vlan1007 MTU 9100 Jan 19 19:37:10.556585 sonic NOTICE swss#orchagent: :- addIp2MeRoute: Create IP2me route ip:10.1.1.1 Jan 19 19:37:10.556585 sonic NOTICE swss#orchagent: :- addDirectedBroadcast: Add broadcast route for ip:10.1.1.255 Jan 19 19:37:11.151159 sonic NOTICE swss#orchagent: :- addIp2MeRoute: Create IP2me route ip:20.1.1.1 Jan 19 19:37:11.151419 sonic NOTICE swss#orchagent: :- addDirectedBroadcast: Add broadcast route for ip:20.1.1.255 Jan 19 19:37:12.728041 sonic NOTICE swss#orchagent: :- addIp2MeRoute: Create IP2me route ip:30.1.1.1 Jan 19 19:37:12.728750 sonic NOTICE swss#orchagent: :- addDirectedBroadcast: Add broadcast route for ip:30.1.1.255 Jan 19 19:39:02.864777 sonic INFO swss#supervisord 2017-01-19 19:38:59,901 INFO exited: enable_counters (exit status 0; expected)
Jan 19 19:40:04.725942 sonic NOTICE swss#orchagent: :- addNeighbor: Created neighbor 00:00:01:56:fe:07 on Vlan1007 Jan 19 19:40:04.726474 sonic NOTICE swss#orchagent: :- addNextHop: Created next hop 10.1.1.2 on Vlan1007 Jan 19 19:40:06.897371 sonic NOTICE swss#orchagent: :- addNeighbor: Created neighbor 00:00:01:57:aa:d2 on Vlan1007 Jan 19 19:40:06.898138 sonic NOTICE swss#orchagent: :- addNextHop: Created next hop 20.1.1.2 on Vlan1007 root@sonic:/home/admin# show arp Address MacAddress Iface Vlan --------- + -------------- +--------- +------ 10.1.1.2 00:00:01:56:fe:07 Ethernet8 1007 10.28.32.16 00:19:99:e0:c3:a1 eth0 - 20.1.1.2 00:00:01:57:aa:d2 Ethernet9 1007 Total number of entries 3 root@sonic:/home/admin# root@sonic:/home/admin# redis-cli -n 1 keys NEXT 1) "ASIC_STATE:SAI_OBJECT_TYPE_NEXT_HOP:oid:0x400000000034c" 2) "ASIC_STATE:SAI_OBJECT_TYPE_NEXT_HOP:oid:0x400000000034d" root@sonic:/home/admin# root@sonic:/home/admin# root@sonic:/home/admin#
From the above swss logs we see that no NextHopGroup is created even though we have two valid next hops resolved.
Regards Sambit