第五章IP 路由 5
查找路由条目 提问 在路由表中查找特定的路由条目 回答 Router>show ip route 172
15 Routing entry for 172
0/24 Known via "ospf 55", distance 110, metric 11, type inter area Redistributing via ospf 55 Last update from 172
1 on Ethernet0, 2d12h ago Routing Descriptor Blocks: * 172
1, from 172
1, 2d12h ago, via Ethernet0 Route metric is 11, traffic share count is 1 注释 路由器在路由表中查找路由条目的原则是最长匹配,所以例子中虽然查找的是172
15 但是由于没有这条特定的路由,显示的结果是最长匹配的172
如果没有任何一条匹配只能使用缺省路由,会出现下面信息 Router> show ip route 172
5 % Network not in table 注意的是这里都是无类路由,如果有类的就不一样了 5
查找特定类型的路由条目 提问 在路由表中查找相同类型的路由条目 回答 Router>show ip route static 192
0/32 is subnetted, 1 subnets S 192
1 [1/0] via 172
4 还有一个更有用的命令 Router>show ip route summary IP routing table name is Default-IP-R