|
<!--[if !supportLists]-->第五章 <!--[endif]-->IP路由
5.1. 查找路由条目
提问 在路由表中查找特定的路由条目
回答
Router>show ip route 172.25.100.15
Routing entry for 172.25.100.0/24
Known via "ospf 55", distance 110, metric 11, type inter area
Redistributing via ospf 55
Last update from 172.25.1.1 on Ethernet0, 2d12h ago
Routing Descriptor Blocks:
* 172.25.1.1, from 172.25.1.1, 2d12h ago, via Ethernet0
Route metric is 11, traffic share count is 1
注释 路由器在路由表中查找路由条目的原则是最长匹配,所以例子中虽然查找的是172.25.200.15但是由于没有这条特定的路由,显示的结果是最长匹配的172.15.100.0/24。如果没有任何一条匹配只能使用缺省路由,会出现下面信息
Router> show ip route 172.15.101.5
% Network not in table
注意的是这里都是无类路由,如果有类的就不一样了
5.2. 查找特定类型的路由条目
提问 在路由表中查找相同类型的路由条目
回答
Router>show ip route static
192.168.1.0/32 is subnetted, 1 subnets
S 192.168.1.1 [1/0] via 172.25.1.4
还有一个更有用的命令
Router>show ip route summary
IP routing table name is Default-IP-Routing-Table(0)
Route Source Networks Subnets Overhead Memory (bytes)
上一篇:Cisco IOS Cookbook 中文精简版第四章TACAS+
下一篇:Cisco IOS Cookbook 中文精简版第六章RIP
|