网络工程师-7-路由原理及实现.ppt

上传人:hyn****60 文档编号:70987189 上传时间:2023-01-31 格式:PPT 页数:53 大小:892.50KB
返回 下载 相关 举报
网络工程师-7-路由原理及实现.ppt_第1页
第1页 / 共53页
网络工程师-7-路由原理及实现.ppt_第2页
第2页 / 共53页
点击查看更多>>
资源描述

《网络工程师-7-路由原理及实现.ppt》由会员分享,可在线阅读,更多相关《网络工程师-7-路由原理及实现.ppt(53页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。

1、 1999,Cisco Systems,IICND9-1Chapter 7路由原理及实现路由原理及实现 1999,Cisco Systems,IICND9-2路由路由-路由器必须选择出到达目的网络的最优路径路由器必须选择出到达目的网络的最优路径路由器必须知道路由器必须知道:目的地址目的地址可能的路径、最优路径可能的路径、最优路径维护、验证路径信息维护、验证路径信息什么是路由什么是路由什么是路由什么是路由?172.16.1.010.120.2.0 1999,Cisco Systems,IICND9-3什么是路由什么是路由什么是路由什么是路由?NetworkProtocolDestinationN

2、etworkConnectedLearned10.120.2.0172.16.1.0Exit InterfaceE0S0Routed Protocol:IP路由器自动知道直连网络的路径路由器自动知道直连网络的路径路由器必须能学习到没有与其直接相连的目的地的路径路由器必须能学习到没有与其直接相连的目的地的路径172.16.1.010.120.2.0E0S0 1999,Cisco Systems,IICND9-4静态路由静态路由由网络管理员手工配置由网络管理员手工配置动态路由动态路由由路由协议自动生成,由路由协议自动生成,并根据网络拓扑变化动并根据网络拓扑变化动态调整。态调整。静态路由与动态路由静

3、态路由与动态路由静态路由与动态路由静态路由与动态路由 1999,Cisco Systems,IICND9-5172.16.2.1SO静态路由静态路由静态路由静态路由172.16.1.0B172.16.2.2NetworkA手工配置非直连网络的静态路由,使得通讯得以进行。手工配置非直连网络的静态路由,使得通讯得以进行。BStub Network 1999,Cisco Systems,IICND9-6定义到目的定义到目的 IP 子网的路径子网的路径Router(config)#ip route network mask address|interfacedistance permanent 静态路

4、由配置静态路由配置静态路由配置静态路由配置 1999,Cisco Systems,IICND9-7Stub Networkip route 172.16.1.0 255.255.255.0 172.16.2.1172.16.2.1SO静态路由实例静态路由实例静态路由实例静态路由实例172.16.1.0B172.16.2.2NetworkAB单向路由,单向路由,必须在对方路由器上配置返回路径。必须在对方路由器上配置返回路径。1999,Cisco Systems,IICND9-8Stub Networkip route 0.0.0.0 0.0.0.0 172.16.2.2缺省路由缺省路由缺省路由缺

5、省路由172.16.2.1SO172.16.1.0B172.16.2.2NetworkAB缺省路由缺省路由配置在末端网络路由器上。所有的目的网络都从路由器配置在末端网络路由器上。所有的目的网络都从路由器A的的s0端口发送。端口发送。1999,Cisco Systems,IICND9-9路由协议路由协议路由协议路由协议路由协议路由协议(Routing Protocol):是用于填充路由是用于填充路由表的协议。如:表的协议。如:RIP,IGRP 可路由协议可路由协议(routed protocol):利用路由表转发利用路由表转发数据包的协议。如:数据包的协议。如:IP,IPXNetworkProt

6、ocolDestinationNetworkConnectedRIPIGRP10.120.2.0172.16.2.0172.17.3.0Exit InterfaceE0S0S1Routed Protocol:IPRouting protocol:RIP,IGRP172.17.3.0172.16.1.010.120.2.0E0S0 1999,Cisco Systems,IICND9-10管理距离管理距离管理距离管理距离IGRPAdministrative Distance=100Router DRouter DRouter BRouter BRouter ARouter ARouter CRou

7、ter CRIPAdministrative Distance=120E EI need to send a packet to Network E.Both router B and C will get it there.Which route is best?1999,Cisco Systems,IICND9-11路由协议类型路由协议类型路由协议类型路由协议类型Distance VectorHybrid RoutingLink StateC CB BA AD DC CD DB BA A 1999,Cisco Systems,IICND9-12距离向量协议距离向量协议距离向量协议距离向量协

8、议阶段性地向临近路由器传递完整的路由表并计算距离向量阶段性地向临近路由器传递完整的路由表并计算距离向量C CD DB BA AC CB BA AD DRoutingTableRoutingTableRoutingTableRoutingTableDistanceHow farVectorIn which direction 1999,Cisco Systems,IICND9-13Routers discover the best path to destinations from each neighborA AB BC C10.1.0.010.2.0.010.3.0.010.4.0.0E0S

9、0S0S1S0E0Routing Table10.2.0.010.3.0.0 00S0S1Routing Table10.3.0.0S0010.4.0.0E00Routing Table10.1.0.010.2.0.0 E0S0 00距离向量协议工作机制距离向量协议工作机制距离向量协议工作机制距离向量协议工作机制 1999,Cisco Systems,IICND9-14Routers discover the best path to destinations from each neighborA AB BC C10.1.0.010.2.0.010.3.0.010.4.0.0E0S0S0S1

10、S0E0Routing Table10.1.0.010.2.0.010.3.0.0Routing Table10.2.0.010.3.0.010.4.0.010.1.0.00011S0S1S1S0Routing Table10.3.0.0S0010.4.0.0E0010.2.0.0S0 1E0S0S0100距离向量协议工作机制距离向量协议工作机制距离向量协议工作机制距离向量协议工作机制 1999,Cisco Systems,IICND9-15距离向量协议工作机制距离向量协议工作机制距离向量协议工作机制距离向量协议工作机制Routers discover the best path to des

11、tinations from each neighborA AB BC C10.1.0.010.2.0.010.3.0.010.4.0.0E0S0S0S1S0E0Routing Table10.1.0.010.2.0.010.3.0.010.4.0.0Routing Table10.2.0.010.3.0.010.4.0.010.1.0.00011S0S1S1S0Routing Table10.3.0.0S0010.4.0.0E0010.2.0.0S010.1.0.0S012E0S0S0S01200 1999,Cisco Systems,IICND9-16 距离向量距离向量距离向量距离向量:用

12、用用用MetricsMetrics选择最优路径选择最优路径选择最优路径选择最优路径Information used to select the best path for routing56T156T1Ticks,hop countBAHop countIPXRIPIGRPBandwidthDelayLoadReliabilityMTU 1999,Cisco Systems,IICND9-18距离向量距离向量距离向量距离向量维护路由信息维护路由信息维护路由信息维护路由信息Updates proceed step-by-step from router to routerA AProcess t

13、o update this routingtableTopologyTopologychange change causescausesroutingroutingtabletableupdateupdate 1999,Cisco Systems,IICND9-19距离向量距离向量距离向量距离向量维护路由信息维护路由信息维护路由信息维护路由信息Updates proceed step-by-step from router to routerA AProcess to update this routingtableRouter A sends out this updatedrouting

14、table after the next period expiresTopologychange causesroutingtableupdate 1999,Cisco Systems,IICND9-20距离向量距离向量距离向量距离向量维护路由信息维护路由信息维护路由信息维护路由信息Updates proceed step-by-step from router to routerA AB BProcess to update this routingtableProcess to update this routingtableTopologychange causesroutingtab

15、leupdateRouter A sends out this updatedrouting table after the next period expires 1999,Cisco Systems,IICND9-21路由环路问题路由环路问题路由环路问题路由环路问题Each node maintains the distance from itself to each possible destination networkA AB BC C10.1.0.010.2.0.010.3.0.010.4.0.0E0S0S0S1S0E0Routing Table10.3.0.0S0E0S0S012

16、10.1.0.010.2.0.010.4.0.000Routing Table10.1.0.0E0S0S0S01210.4.0.010.3.0.010.2.0.000Routing Table10.2.0.0S0S1S1S01110.1.0.010.4.0.010.3.0.000 1999,Cisco Systems,IICND9-22路由环路问题路由环路问题路由环路问题路由环路问题因为缓慢的汇聚产生了路由表的不一致因为缓慢的汇聚产生了路由表的不一致A AB BC C10.1.0.010.2.0.010.3.0.010.4.0.0E0S0S0S1S0E0XRouting Table10.3.0

17、.0S0E0S0S01210.1.0.010.2.0.010.4.0.00DownRouting Table10.1.0.0E0S0S0S01210.4.0.010.3.0.010.2.0.000Routing Table10.2.0.0S0S1S1S01110.1.0.010.4.0.010.3.0.000 1999,Cisco Systems,IICND9-23Router C 认为通过认为通过 Router B 可达到可达到 10.4.0.0路由环路问题路由环路问题路由环路问题路由环路问题A AB BC C10.1.0.010.2.0.010.3.0.010.4.0.0E0S0S0S1S

18、0E0XRouting Table10.3.0.0S0S0S0S01210.1.0.010.2.0.010.4.0.002Routing Table10.1.0.0E0S0S0S01210.4.0.010.3.0.010.2.0.000Routing Table10.2.0.0S0S1S1S11110.1.0.010.4.0.010.3.0.000 1999,Cisco Systems,IICND9-24Router A updates its table to reflect the new but erroneous hop count路由环路问题路由环路问题路由环路问题路由环路问题A A

19、B BC C10.1.0.010.2.0.010.3.0.010.4.0.0E0S0S0S1S0E0XRouting TableS0S0S0S01210.3.0.010.1.0.010.2.0.010.4.0.002Routing TableE0S0S0S01410.1.0.010.4.0.010.3.0.010.2.0.000Routing TableS0S1S1S03110.2.0.010.1.0.010.4.0.010.3.0.000 1999,Cisco Systems,IICND9-25Symptom:Counting to InfinitySymptom:Counting to I

20、nfinity发往发往 10.4.0.0 的数据包在的数据包在 routers A,B,C之间反弹之间反弹到到 10.4.0.0 网络的网络的Hop count 变得无限大变得无限大A AB BC C10.1.0.010.2.0.010.3.0.010.4.0.0E0S0S0S1S0E0XRouting Table10.3.0.0S0S0S0S01210.1.0.010.2.0.010.4.0.004Routing TableE0S0S0S01610.1.0.010.4.0.010.3.0.010.2.0.000Routing TableS0S1S1S05110.2.0.010.1.0.010

21、.4.0.010.3.0.000 1999,Cisco Systems,IICND9-26解决办法解决办法解决办法解决办法1:1:定义最大定义最大定义最大定义最大HopsHopsDefine a limit on the number of hops to prevent infinite loops-16HopsA AB BC C10.1.0.010.2.0.010.3.0.010.4.0.0E0S0S0S1S0E0XRouting Table10.3.0.0S0S0S0S01210.1.0.010.2.0.010.4.0.0016Routing TableE0S0S0S011610.1.0

22、.010.4.0.010.3.0.010.2.0.000Routing TableS0S1S1S016110.2.0.010.1.0.010.4.0.010.3.0.000 1999,Cisco Systems,IICND9-27解决办法解决办法解决办法解决办法2:2:水平分割水平分割水平分割水平分割如果如果RA从从RB得到某一原始路由信息,则得到某一原始路由信息,则RA不会不会RB 发送此发送此路由的更新信息。路由的更新信息。A AB BC C10.1.0.010.2.0.010.3.0.010.4.0.0E0S0S0S1S0E0XXXRouting Table10.3.0.0S0S0S0S

23、01210.1.0.010.2.0.010.4.0.000Routing TableE0S0S0S01210.1.0.010.4.0.010.3.0.010.2.0.000Routing TableS0S1S1E11210.2.0.010.1.0.010.4.0.010.3.0.000 1999,Cisco Systems,IICND9-28解决办法解决办法解决办法解决办法3:3:路由毒疫路由毒疫路由毒疫路由毒疫(Router Poisoning)Router Poisoning)Router直接设置已经断掉的链路为一无限大直接设置已经断掉的链路为一无限大HopsA AB BC C10.1.0

24、.010.2.0.010.3.0.010.4.0.0E0S0S0S1S0E0XRouting Table10.3.0.0S0S0S0S01210.1.0.010.2.0.010.4.0.00InfinityRouting Table10.1.0.0E0S0S0S01210.4.0.010.3.0.010.2.0.000Routing Table10.2.0.0S0S1S1E11210.1.0.010.4.0.010.3.0.000 1999,Cisco Systems,IICND9-29解决办法解决办法解决办法解决办法4:4:毒化反转毒化反转毒化反转毒化反转(Poison Reverse)Po

25、ison Reverse)Poison Reverse overrides split horizonA AB BC C10.1.0.010.2.0.010.3.0.010.4.0.0E0S0S0S1S0E0XRouting Table10.3.0.0S0S0S0S01210.1.0.010.2.0.010.4.0.00InfinityRouting Table10.1.0.0E0S0S0S01210.4.0.010.3.0.010.2.0.000Routing Table10.2.0.0S0S1S1E1PossiblyDown210.1.0.010.4.0.010.3.0.000Poison

26、Reverse 1999,Cisco Systems,IICND9-30解决办法解决办法解决办法解决办法5 5:保持计数器保持计数器保持计数器保持计数器(Hold-Down Timers)Hold-Down Timers)Router 保持一个记录保持一个记录-某个网络可能断开某个网络可能断开,为其它为其它Routers留留足够长的时间重新计算网络拓扑。足够长的时间重新计算网络拓扑。Network 10.4.0.0 is downthen back up then back downUpdate afterhold-down TimeNetwork 10.4.0.0is unreachable

27、A AB BC C10.1.0.010.2.0.010.3.0.010.4.0.0E0S0S0S1S0E0XUpdate afterhold-down Time 1999,Cisco Systems,IICND9-31解决办法解决办法解决办法解决办法6 6:触发更新触发更新触发更新触发更新Router sends updates when a change in its routing table occursA AB BC C10.2.0.010.3.0.010.4.0.0E0S0S0S1S0E0X XNetwork 10.4.0.0is unreachableNetwork 10.4.0.

28、0is unreachableNetwork 10.4.0.0is unreachable10.1.0.0 1999,Cisco Systems,IICND9-32Implementing Solutions in Implementing Solutions in Multiple RoutesMultiple RoutesD DB BE EA AX XC C10.4.0.0 1999,Cisco Systems,IICND9-33Implementing Solutions in Implementing Solutions in Multiple Routes(cont.)Multipl

29、e Routes(cont.)D DB BE EA AC CX X10.4.0.0HolddownHolddownHolddown 1999,Cisco Systems,IICND9-34Implementing Solutions in Implementing Solutions in Multiple Routes(cont.)Multiple Routes(cont.)D DB BE EA AC CX X10.4.0.0HolddownHolddownHolddownPoison ReversePoison ReversePoison ReversePoison Reverse 199

30、9,Cisco Systems,IICND9-35Implementing Solutions in Implementing Solutions in Multiple Routes(cont.)Multiple Routes(cont.)D DB BE EA AC CX X10.4.0.0HolddownHolddownHolddownPacket for Network 10.4.0.0Packet for Network 10.4.0.0 1999,Cisco Systems,IICND9-36Implementing Solutions in Implementing Solutio

31、ns in Multiple Routes(cont.)Multiple Routes(cont.)D DB BE EA AC CLink up!Link up!10.4.0.0 1999,Cisco Systems,IICND9-37Implementing Solutions in Implementing Solutions in Multiple Routes(cont.)Multiple Routes(cont.)D DB BE EA AC CLink up!10.4.0.0 1999,Cisco Systems,IICND9-38配置路由协议配置路由协议选择路由协议选择路由协议指定

32、网络或接口指定网络或接口Network160.89.0.0Network 172.30.0.0IGRP,RIPNetwork 172.16.0.0RIPRIPIGRP路由协议的配置路由协议的配置路由协议的配置路由协议的配置 1999,Cisco Systems,IICND9-39Defines an IP routing protocolRouter(config)#router protocol keyword Mandatory configuration command for each IP routing processIdentifies the physically connec

33、ted network that routing updates are forwarded toRouter(config-router)#network network-number动态路由协议配置动态路由协议配置动态路由协议配置动态路由协议配置 1999,Cisco Systems,IICND9-4019.2 kbpsT1T1T1依据跳数选择最优路径依据跳数选择最优路径每每 30 秒发送路由更新秒发送路由更新RIPRIP协议协议协议协议 1999,Cisco Systems,IICND9-41Starts the RIP routing processRouter(config)#rou

34、ter ripRouter(config-router)#network network-number指定网络地址指定网络地址Net ID 必须用标准的有类别的网络类型必须用标准的有类别的网络类型RIP RIP 配置配置配置配置 1999,Cisco Systems,IICND9-422.3.0.0router ripnetwork 172.16.0.0network 10.0.0.0RIP RIP 配置实例配置实例配置实例配置实例router ripnetwork 10.0.0.02.3.0.0router ripnetwork 192.168.1.0network 10.0.0.0172.

35、16.1.1S2E0S3192.168.1.110.1.1.110.2.2.210.1.1.2S2S310.2.2.3172.16.1.0ABC192.168.1.0 E0 1999,Cisco Systems,IICND9-43验证验证验证验证RIP RIP 配置配置配置配置RouterA#sh ip protocolsRouting Protocol is rip Sending updates every 30 seconds,next due in 0 seconds Invalid after 180 seconds,hold down 180,flushed after 240 O

36、utgoing update filter list for all interfaces is Incoming update filter list for all interfaces is Redistributing:rip Default version control:send version 1,receive any version Interface Send Recv Key-chain Ethernet0 1 1 2 Serial2 1 1 2 Routing for Networks:10.0.0.0 172.16.0.0 Routing Information So

37、urces:Gateway Distance Last Update 10.1.1.2 120 00:00:10 Distance:(default is 120)172.16.1.1S2E0S3192.168.1.110.1.1.110.2.2.210.1.1.2S2S310.2.2.3172.16.1.0ABC192.168.1.0 E0 1999,Cisco Systems,IICND9-44显示路由表显示路由表显示路由表显示路由表RouterA#sh ip routeCodes:C-connected,S-static,I-IGRP,R-RIP,M-mobile,B-BGP D-EIG

38、RP,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,E-EGP i-IS-IS,L1-IS-IS level-1,L2-IS-IS level-2,*-candidate default U-per-user static route,o-ODR T-traffic engineered routeGateway of last resort

39、is not set 172.16.0.0/24 is subnetted,1 subnetsC 172.16.1.0 is directly connected,Ethernet0 10.0.0.0/24 is subnetted,2 subnetsR 10.2.2.0 120/1 via 10.1.1.2,00:00:07,Serial2C 10.1.1.0 is directly connected,Serial2R 192.168.1.0/24 120/2 via 10.1.1.2,00:00:07,Serial2172.16.1.1S2E0S3192.168.1.110.1.1.11

40、0.2.2.210.1.1.2S2S310.2.2.3172.16.1.0ABC192.168.1.0 E0 1999,Cisco Systems,IICND9-45debug debug ip ip riprip 命令命令命令命令RouterA#debug ip ripRIP protocol debugging is onRouterA#00:06:24:RIP:received v1 update from 10.1.1.2 on Serial200:06:24:10.2.2.0 in 1 hops00:06:24:192.168.1.0 in 2 hops00:06:33:RIP:se

41、nding v1 update to 255.255.255.255 via Ethernet0(172.16.1.1)00:06:34:network 10.0.0.0,metric 100:06:34:network 192.168.1.0,metric 300:06:34:RIP:sending v1 update to 255.255.255.255 via Serial2(10.1.1.1)00:06:34:network 172.16.0.0,metric 1172.16.1.1S2E0S3192.168.1.110.1.1.110.2.2.210.1.1.2S2S310.2.2.

42、3172.16.1.0ABC192.168.1.0 E0 1999,Cisco Systems,IICND9-46比比 RIP 更好的扩展性更好的扩展性更复杂的更复杂的Metrics计算计算多条路径支持多条路径支持IGRPIGRP协议协议协议协议IGRP 1999,Cisco Systems,IICND9-47BandwidthDelayReliabilityLoadingMTU19.2 kbps19.2 kbpsIGRP IGRP 复合复合复合复合 MetricMetricSourceDestination 1999,Cisco Systems,IICND9-48配置配置配置配置 IGRPI

43、GRPRouter(config-router)#network network-numberSelects participating attached networksRouter(config)#router igrp autonomous-systemDefines IGRP as the IP routing protocol 1999,Cisco Systems,IICND9-49router igrp 100network 172.16.0.0network 10.0.0.0配置配置配置配置 IGRPIGRP实例实例实例实例router igrp 100network 10.0.

44、0.0router igrp 100network 192.168.1.0network 10.0.0.0Autonomous System=100172.16.1.1S2E0S3192.168.1.110.1.1.110.2.2.210.1.1.2S2S310.2.2.3172.16.1.0ABC192.168.1.0 E0 1999,Cisco Systems,IICND9-50验证验证验证验证IGRPIGRP配置配置配置配置RouterA#sh ip protocolsRouting Protocol is igrp 100 Sending updates every 90 second

45、s,next due in 21 seconds Invalid after 270 seconds,hold down 280,flushed after 630 Outgoing update filter list for all interfaces is Incoming update filter list for all interfaces is Default networks flagged in outgoing updates Default networks accepted from incoming updates IGRP metric weight K1=1,

46、K2=0,K3=1,K4=0,K5=0 IGRP maximum hopcount 100 IGRP maximum metric variance 1 Redistributing:igrp 100 Routing for Networks:10.0.0.0 172.16.0.0 Routing Information Sources:Gateway Distance Last Update 10.1.1.2 100 00:01:01 Distance:(default is 100)172.16.1.1S2E0S3192.168.1.110.1.1.110.2.2.210.1.1.2S2S

47、310.2.2.3172.16.1.0ABC192.168.1.0 E0 1999,Cisco Systems,IICND9-51显示路由表显示路由表显示路由表显示路由表RouterA#sh ip routeCodes:C-connected,S-static,I-IGRP,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

48、 external type 2,E-EGP i-IS-IS,L1-IS-IS level-1,L2-IS-IS level-2,*-candidate default U-per-user static route,o-ODR T-traffic engineered routeGateway of last resort is not set 172.16.0.0/24 is subnetted,1 subnetsC 172.16.1.0 is directly connected,Ethernet0 10.0.0.0/24 is subnetted,2 subnetsI 10.2.2.0

49、 100/90956 via 10.1.1.2,00:00:23,Serial2C 10.1.1.0 is directly connected,Serial2I 192.168.1.0/24 100/91056 via 10.1.1.2,00:00:23,Serial2172.16.1.1S2E0S3192.168.1.110.1.1.110.2.2.210.1.1.2S2S310.2.2.3172.16.1.0ABC192.168.1.0 E0 1999,Cisco Systems,IICND9-52debug debug ip igrp ip igrp transactiontransa

50、ction命令命令命令命令RouterA#debug ip igrp transactionsIGRP protocol debugging is onRouterA#00:21:06:IGRP:sending update to 255.255.255.255 via Ethernet0(172.16.1.1)00:21:06:network 10.0.0.0,metric=8895600:21:06:network 192.168.1.0,metric=9105600:21:07:IGRP:sending update to 255.255.255.255 via Serial2(10.1

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 生活休闲 > 生活常识

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号© 2020-2023 www.taowenge.com 淘文阁