Monday 18 February 2019

CEF Forwarding Decisions

Sometimes it's useful to know which interface a packet will be forwarded out of when there's more than one path to the destination, e.g. troubleshooting asymmetric routing when there's firewalls in the path.
The show ip cef exact-route command provides this information - you pass it the source & destination IP address, plus optionally the source & destination port for platforms where CEF hashes using the ports also. Note that not all platforms support this, but most current Cisco devices do such as the 3850, 4331, Sup8E, etc.
The example below is a 3850 switch with 2 equal cost default routes via 2 different SVIs:

ufs1#sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is 10.83.240.244 to network 0.0.0.0

O*E2  0.0.0.0/0 [110/1] via 10.83.240.244, 2d14h, Vlan12
                [110/1] via 10.83.240.242, 2d14h, Vlan11


ufs1#show ip cef exact-route 10.84.190.1 10.83.232.10
10.84.190.1 -> 10.83.232.10 =>IP adj out of Vlan11, addr 10.83.240.242

ufs1#show ip cef exact-route 10.84.190.1 10.83.251.1
10.84.190.1 -> 10.83.251.1 =>IP adj out of Vlan12, addr 10.83.240.244

No comments:

Post a Comment