Catalyst 交换机未知静态路由排错分享

前言

本篇文章主要用于排查为何交换机没有配置静态路由,但是在show ip route中会发现未知的静态路由条目。

 

故障描述

目前未知的路由可能出现在全局路由表,以及管理VRF路由表中。

未知路由出现在全局路由表

Show ip route
Extended Host Mode is enabled
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, m - OMP
n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA
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
H - NHRP, G - NHRP registered, g - NHRP registration summary
o - ODR, P - periodic downloaded static route, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is aaa.bbb.ccc.ddd to network 0.0.0.0

S* 0.0.0.0/0 [0/0] via aaa.bbb.ccc.ddd
aaa.bbb.ccc.ddd/8 is variably subnetted, 3 subnets, 2 masks

      未知路由出现在VRF路由表

#sh ip route vrf management
Routing Table: management
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 aaa.bbb.ccc.ddd to network 0.0.0.0

S* 0.0.0.0/0 [254/0] via aaa.bbb.ccc.ddd
aaa.bbb.ccc.ddd/8 is variably subnetted, 3 subnets, 2 masks

故障排查方法

在上述任意一种类型故障中都非常建议根据如下命令进行基本配置进行排查,从而验证该问题是否由于配置导致。

show running-config
show cdp neighbor
show ip cef
show ip route or show ip route vrf xxx

在针对于全局路由表出现未知静态路由时,其中大概率造成的原因为收到了重定向流量从而导致了路由条目的更新,可以根据如下命令进行检查是否存在重定向流量,如果存在重定向流量,可以通过如下debug命令进行验证未知路由生成原因,参考输出如下。

#show ip redirects 
Default gateway is x.x.x.x

Host           Gateway         Last Use       Total       Uses Interface
x.x.x.x        x.x.x.x         0:14            0          Vlan xxx

Try debug find more detail about route entry learn status

Debug ip routing 
Debug ip icmp

example
Dec 7 16:40:32.093: ICMP: redirect rcvd from aaa.bbb.ccc.ddd-- for aaa.bbb.ccc.ddd use gw aaa.bbb.ccc.ddd        <-- icmp redirect
Dec 7 16:40:32.093: RT: updating static aaa.bbb.ccc.ddd/32 (0x0) [local lbl/ctx:1048577/0x0] omp-tag:0 : via aaa.bbb.ccc.ddd Vl17 0 1048578 0x100001 <-- routing
Dec 7 16:40:32.094: RT: add aaa.bbb.ccc.ddd/32 via aaa.bbb.ccc.ddd, static metric [0/0] <--- static route

 针对于管理VRF出现未知路由,上述的基本信息检查依然适用,但是通常在重定向的命令并不会存在类似的输出,通过如下实验环境进行测试后如有下发现。

C6807(management port)---C2960x(DHCP rely)---C9500(DHCP server)

 当Catalyst交换机管理口通过DHCP中继的方式获取DHCP地址时,设备会自动生成一条静态路由条目,其目的为了帮忙寻找DHCP server。

该现象可以通过如下方式进行验证,具体案例如下。

Debug ip routing static detail 
Debug ip routing static event
Debug dhcp detail

example
*Aug 18 02:59:58.346: Adding route to DHCP server aaa.bbb.ccc.ddd via mgmt0 aaa.bbb.ccc.ddd
*Aug 18 12:02:58.687: IP-ST(management, unicast,  	 aaa.bbb.ccc.ddd/32 [254], mgmt0 Path = 1, add succeed, active state

结论

一般来说设备突然出现未知静态路由通常是由于配置,或者相关功能开启导致问题发生,可以通过以上方法进行排查。

 

 

https://community.cisco.com/t5/%E7%BD%91%E7%BB%9C%E6%96%87%E6%A1%A3/tac%E5%88%86%E4%BA%AB-catalyst-%E4%BA%A4%E6%8D%A2%E6%9C%BA%E6%9C%AA%E7%9F%A5%E9%9D%99%E6%80%81%E8%B7%AF%E7%94%B1%E6%8E%92%E9%94%99%E5%88%86%E4%BA%AB/ta-p/4798545

版权声明:
作者:SE_Zhang
链接:https://www.cnesa.cn/1284.html
来源:CNESA
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
打赏
海报
Catalyst 交换机未知静态路由排错分享
前言 本篇文章主要用于排查为何交换机没有配置静态路由,但是在show ip route中会发现未知的静态路由条目。   故障描述 目前未知的路由可能出现在全局路由表,以及管理VRF路由表中。 未知路由出现在全局路由表 Show ip route Extended Host Mode is enabled 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, m - OMP n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA 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 H - NHRP, G - NHRP registered, g - NHRP registration summary o - ODR, P - periodic downloaded static route, l - LISP a - application route + - replicated route, % - next hop override, p - overrides from PfR Gateway of last resort is aaa.bbb.ccc.ddd to network 0.0.0.0 S* 0.0.0.0/0 [0/0] via aaa.bbb.ccc.ddd aaa.bbb.ccc.ddd/8 is variably subnetted, 3 subnets, 2 masks       未知路由出现在VRF路由表 #sh ip route vrf management Routing Table: management 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-……
<<上一篇
下一篇>>