国产区h_又爽又黄禁片1000视频vr_91完整版_91视频看_久久精品国产一区二区三_成人app网址

返回顶部

思科CCNA中文教程--第五章IP路由(上)

第五章 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.024。如果没有任何一条匹配只能使用缺省路由,会出现下面信息

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)

connected 0 3 328 432

static 1 0 64 144

ospf 55 1 3 256 576

Intra-area:1 Inter-area:2 External-1:1 External-2:0

NSSA External-l:0 NSSA External-2:0

internal 2 2328

Total 4 6 648 3480

注释 通过显示路由表的统计情况来了解当前路由器的路由条目,也可以用来以后的比对

5.3 各种掩码的转换

注释 脚本略去,建议使用Boson提供的免费转换工具

5.4 使用静态路由

提问 配置静态路由

回答

Router#configure terminal

Enter configuration commands,one per line.End with CNTL/Z.

Router(config)#ip route 10.35.15.5 255.255.255.255 Ethernet0 (permanent选项可以使此条目一直存在于路由表中,而不管下一跳的可达性)

Router(config)#ip route 172.16.0.0 255.255.0.0 10.35.6.1 2(permanent)

Router(config)#end

Router#

也可以给路由条目打上标签

Router#configure terminal

Enter configuration commands,one per line.End with CNTL/Z.

Router(config)#ip route 172.16.0.0 255.255.0.0 10.35.6.1 2 tag 36291

Router(config)#end

Router#

注释 在类似以太网这种多路访问的网络中建议使用下一跳为地址而不是接口。正常情况下路由器对静态路由的下一跳有效的检查是一分钟,在12.3(10)以后增加了下面的命令可以对此时间进行调整Router(congfig)#ip route static adjust-time 30.对静态路由打tag用于路由再发布时的区分

5.5 浮动静态路由

提问 当动态路由出问题的时候使用静态路由作为备份

回答

Router#configure terminal

Enter configuration commands,one per line.End with CNTL/Z.

Router(congif)#ip route 10.0.0.0 255.0.0.0 172.16.1.1 190(下一跳也可以触发一个拨号接口)

Router(config)#end

Router#

注释 通过调整管理距离的方式来进行路由备份,不过要注意的是管理距离只适合在相同路由的情况下,路由条目的最长匹配是第一位的。另外在不同厂商设备互联的时候,调整管理距离一定要设置合理。

5.6 基于源地址的策略路由

提问 根据地址的不同选择不同的路径

回答

Router#configure terminal

Enter configuration commands,one per line.End with CNTL/Z.

Router(config)#access-list 1 permit 10.15.35.0 0.0.0.255

Router(config)#access-list 2 permit 10.15.36.0 0.0.0.255

Router(config)#interface Ethernet0

Router(config-if)#ip address 10.15.22.7 255.255.255.0

Router(config-if)#ip policy route-map Engineers

Router(config-if)#ip route-cache policy

Router(config-if)#exit

Router(config)#route-map Engineers permit 10

Router(config-route-map)#match ip address 1

Router(config-route-map)#set ip next-hop 10.15.27.1

Router(config-route-map)#exit

Router(config)#route-map Engineers permit 20

Router(config-route-map)#match ip address 2

Router(config-route-map)#set interface Ethernet1

Router(config-route-map)#end

Router#

注释 缺省情况下route map 的最后一句都是deny all,这样不符合route map规则的数据包都会按照正常的路由表进行转发。set ip next-hop verify-availability命令提供了对下一跳的验证,不过是基于CDP的,所以如果使用此命令需要打开CDP,最好同时调整时长,毕竟缺省是180秒。在使用策略路由时会在排错时增加难度,因为缺省对于本路由器发出的数据包可以绕过route map这样造成错觉。

5.7基于应用的策略路由

提问 根据不同的应用来选择不同的路径

回答

Router#configure terminal

Enter configuration commands,one per line.End with CNTL/Z

Router(config)#access-list 101 deny tcp 10.15.25.0 0.0.0.255 any eq www

Router(config)#access-list 101 permit tcp any any eq www

Router(config)#interface Ethernet0

Router(config-if)#ip address 10.15.22.7 255.255.255.0

Router(config-if)#ip policy route-map Websurfers

Router(config-if)#ip route-cache policy

Router(config-if)#exit

Router(config)#route-map Websurfers permit 10

Router(config-route-map)#match ip address 101

Router(config-route-map)#set ip next-hop 10.15.27.1

Router(config-route-map)#exit

Router(config)#route-map Websurfers permit 20

Router(config-route-map)#set ip default next-hop 10.15.26.1

Router(config-route-map)#end

Router#

对于本设备的发出的数据包也使用策略路由

Router#configure terminal

Enter configuration commands,one per line.End with CNTL/Z.

Router(config)#ip local policy route-map dlswtraffic

Router(config)#access-list 103 permit tcp any any eq 2065

Router(config)#access-list 103 permit tcp any eq 2065 any

Router(config)#route-map dlswtraffic permit 10

Router(config-route-map)#match ip address 103

Router(config-route-map)#set ip next-hop 10.15.27.3

Router(config-route-map)#end

Router#

注释 正常情况下如果所有定义的下一跳都不存在的情况下会使用路由表来查询,如果路由表没有此定义会使用缺省路由,这时候你可以使用set ip default next-hop来定义一个不同的缺省路由



400-0806-056
主站蜘蛛池模板: 久久综合图区亚洲综合图区 | 有色视频在线观看 | 美女被免网站在线视频 | 免费看a级片 | 久久蜜月| 午夜影院a | 免费观看一级欧美大 | 大学生一一级毛片在线播放 | 青草娱乐极品免费视频 | 自拍偷拍欧美视频 | 国产亚洲精品久久久久久 | 黄色一级片免费 | 极品日韩 | 日本网站在线 | 亚洲视频男人的天堂 | 国内国外日产一区二区 | 国内精品久久久久激情影院 | 精品午夜福利1000在线观看 | 亚洲欧美四级在线播放 | 高清欧美一区二区三区 | www日韩精品 | 亚洲a级大片 | 国产午夜亚洲精品不卡 | 午夜精品一区二区三区在线视 | 91精品成人福利在线播放 | 成 人免费va视频 | 亚洲 欧美 日韩 小说 另类 | 三级国产三级在线 | 国产成人h片视频在线观看 国产成人h综合亚洲欧美在线 | 国产美女精品视频免费观看 | 久久久久久久久免费视频 | 天天摸夜夜添狠狠添高潮出水 | 一级片aaaaaa| 国产精品成人不卡在线观看 | 亚洲国产精久久小蝌蚪 | 美女露出奶头扒开尿口免费网站 | 国产亚洲精品拍拍拍拍拍 | 国产一区二区三区免费播放 | 日本人护士一级毛片 | 日韩一区二区三区射精 | www噜噜偷拍在线视频 |