版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、cisco IP路由 分解实验1. 在路由表中查找特定的路由条目Routershow ip route 5Routing entry for /24Known via ospf 55, distance 110, metric 11, type inter areaRedistributing via ospf 55Last update from on Ethernet0, 2d12h agoRouting Descriptor Blocks:* , from , 2d12h ago
2、, via Ethernet0 Route metric is 11, traffic share count is 1注释路由器在路由表中查找路由条目的原则是最长匹配,所以例子中虽然查找的是5但是由于没有这条特定的路由,显示的结果是最长匹配的/24。如果没有任何一条匹配只能使用缺省路由,会出现下面信息Router show ip route % Network not in table注意的是这里都是无类路由,如果有类的就不一样了2. 在路由表中查找相同类型的路由条目Router show ip route static
3、/32 is subnetted, 1 subnetsS 1/0 via 还有一个更有用的命令Router show ip route summaryIP routing table name is Default-IP-Routing-Table(0)Route SourceNetworksSubnetsOverheadMemory (bytes)connected03328432static1064144ospf5513256576Intra-area: 1 Inter-area: 2 External-1: 1 Extern
4、al-2: 0NSSA External-1: 0 NSSA External-2: 0internal22328Total466483480注释通过显示路由表的统计情况来了解当前路由器的路由条目,也可以用来以后的比对3. 配置静态路由Router#configure terminalEnter configuration commands, one per line.End with CNTL/Z.Router(config)#ip route 55 Ethernet0( permanent选项可以使此条目一直存在于路由表中,而不管下一跳的可达
5、性)Router(config)#ip route 2Router(config)#endRouter#( permanent )也可以给路由条目打上标签Router#configure terminalEnter configuration commands, one per line.End with CNTL/Z.Router(config)#ip route 2 tag 36291Router(config)#endRouter#注释在类似以太网这种多路访
6、问的网络中建议使用下一跳为地址而不是接口。正常情况下路由器对静态路由的下一跳有效性的检查是一分钟,在以对此时间进行调整Router(config)#iproutestatic12.3(10)以后增加了下面的命令可adjust-time30。对静态路由打tag用于路由再发布时的区分4. 当动态路由出问题的时候使用静态路由作为备份Router#configure terminalEnter configuration commands, one per line.End with CNTL/Z.Router(config)#ip route 172.16.1.
7、1 190(下一跳也可以触发一个拨号接口)Router(config)#endRouter#注释通过调整管理距离的方式来进行路由备份,不过要注意的是管理距离只适合在相同路由的情况下,路由条目的最长匹配是第一位的。另外在不同厂商设备互联的时候,调整管理距离一定要设置合理。5. 根据源地址的不同选择不同的路径Router#configure terminalEnter configuration commands, one per line.End with CNTL/Z.Router(config)#access-list 1 permit 55Router(
8、config)#access-list 2 permit 55Router(config)#interface Ethernet0Router(config-if)#ip address Router(config-if)#ip policy route-map EngineersRouter(config-if)#ip route-cache policyRouter(config-if)#exitRouter(config)#route-map Engineers permit 10Router(confi
9、g-route-map)#match ip address 1Router(config-route-map)#set ip next-hop Router(config-route-map)#exitRouter(config)#route-map Engineers permit 20Router(config-route-map)#match ip address 2Router(config-route-map)#set interface Ethernet1Router(config-route-map)#endRouter#注释缺省情况下route map的最后
10、一句都是deny all,这样不符合route map规则的数据包都会按照正常的路由表进行转发。set ip next-hop verify-availability命令提供了对下一跳的验证, 不过是基于CDP的,所以如果使用此命令需要打开CDP,最好同时调整时长,毕竟缺省是180 秒。在使用策略路由时会在排错时增加难度,因为缺省对于本路由器发出的数据包可以绕过route map这样会造成错觉。6. 根据不同的应用来选择不同的路径Router#configure terminalEnter configuration commands, one per line.End with CNTL/Z
11、.Router(config)#access-list 101 deny tcp 55 any eq wwwRouter(config)#access-list 101 permit tcp any any eq wwwRouter(config)#interface Ethernet0Router(config-if)#ip address Router(config-if)#ip policy route-map WebsurfersRouter(config-if)#ip route-cache poli
12、cyRouter(config-if)#exitRouter(config)#route-map Websurfers permit 10Router(config-route-map)#match ip address 101Router(config-route-map)#set ip next-hop Router(config-route-map)#exitRouter(config)#route-map Websurfers permit 20Router(config-route-map)#set ip default next-hop Ro
13、uter(config-route-map)#endRouter#对于本设备的发出的数据包也使用策略路由Router#configure terminalEnter configuration commands, one per line.End with CNTL/Z.Router(config)#ip local policy route-map dlswtrafficRouter(config)#access-list 103 permit tcp any any eq 2065Router(config)#access-list 103 permit tcp any eq 2065 a
14、nyRouter(config)#route-map dlswtraffic permit 10Router(config-route-map)#match ip address 103Router(config-route-map)#set ip next-hop Router(config-route-map)#endRouter#注释正常情况下如果所有定义的下一跳都不存在的情况下会使用路由表来查询,如果路由表没有此定义会使用缺省路由,这时候你可以使用set ip default next-hop来定义一个不同的缺省路由7. 检查所应用的策略路由Routershow i
15、p policyInterfacelocalEthernet0Serial0Routershow route-mapRoute mapdlswtrafficWebsurfersHigh-priorityroute-map High-priority, permit, sequence 10Match clauses:ip address (access-lists): 101Set clauses:ip next-hop Policy routing matches: 0 packets, 0 bytesroute-map Websurfers, permit, seque
16、nce 10Match clauses:ip address (access-lists): 102Set clauses:ip next-hop Policy routing matches: 0 packets, 0 bytesroute-map Websurfers, permit, sequence 20Match clauses:Set clauses:ip default next-hop Policy routing matches: 4 packets, 531 bytesroute-map dlswtraffic, permit, se
17、quence 10Match clauses:ip address (access-lists): 103Set clauses:ip next-hop Policy routing matches: 5 packets, 500 bytes注释也可以通过show access-list 103命令看到更多的匹配信息8. 调整学到的外部网络的缺省管理距离Router#configure terminalEnter configuration commands, one per line.End with CNTL/Z.Router(config)#router ripRou
18、ter(config-route)#network Router(config-route)#distance 15 Router(config-route)#distance 200 55Router(config-route)#distance 255Router(config-route)#endRouter#Router#configure terminalEnter configuration commands, one per line.End with CNTL/Z.Route
19、r(config)#router eigrp 111Router(config-route)#network Router(config-route)#distance eigrp 55 200Router(config-route)#endRouter#Router#configure terminalEnter configuration commands, one per line.End with CNTL/Z.Router(config)#router ospf 66Router(config-route)#distance ospf inter-area 1
20、15Router(config-route)#distance ospf intra-area 105Router(config-route)#distance ospf external 125Router(config-route)#endRouter#Router#configure terminalEnter configuration commands, one per line.End with CNTL/Z.Router(config)#router bgp 65520Router(config-route)#distance bgp 115 220 50Router(confi
21、g-route)#endRouter#注释管理距离只是针对自己的,通过调整这些外部路由的管理距离来调整自己路由表的结构9. 限制路由器到达同一目的地的路径数目Router#configure terminalEnter configuration commands, one per line.End with CNTL/Z.Router(config)#router ospf 65510Router(config-router)#maximum-paths 2Router(config-router)#endRouter#IOS 12.2T以后对 BGP增加了下面的命令Router#confi
22、gure terminalEnter configuration commands, one per line.End with CNTL/Z.Router(config)#router bgp 65511Router(config-router)#maximum-paths 2Router(config-router)#maximum-paths ibgp 3Router(config-router)#endRouter#注释 缺省情况下静态路由可以有 6 条冗余,BGP只有一条最佳路径, 其他路由协议为 4 条。使用上述命令在 12.3(2)T 之前可以调整最大为 6 条, 12.3(2)
23、T 之后可以最大为 16 条10. 在某个端口当掉等情况下才启用特定的静态路由Router#configure terminalEnter configuration commands, one per line.End with CNTL/Z.Router(config)#track 10 interface Serial0/0 line-protocolRouter(config-track)#delay down 5 up 30Router(config-track)#exitRouter(config)#ip route 10.3.
24、12.26 track 10 Router(config)#endRouter#Router#configure terminalEnter configuration commands, one per line.End with CNTL/Z.Router(config)#track 11 ip route reachabilityRouter(config-track)#delay down 5 up 5Router(config-track)#exitRouter(config)#ip route 6 track 11Router(config)#endRouter#Router#configure terminalEnter configuration commands, one per line.End with CNTL/Z.Router(config)#track 12 list boolean andRouter(config-track)#object 10 notRouter(config-track)#object 11Router(config-track)#exitRouter(config)#ip route 1
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- GB/T 19148.4-2026灯座的型式和尺寸第4部分:杂类灯座
- 2026文明就餐面试题目及答案
- 2026乡村造景面试题及答案大全
- 2025-2026学年河北省邯郸市曲周县数学四下期中联考模拟试题(含答案解析)
- 2025-2026学年河北省沧州市孟村县数学四年级下学期期末综合测试试题(含解析)
- 2025-2026学年江西省赣州市赣县数学四下期中预测试题含答案解析
- 四川遂宁经济技术开发区党群工作部招募社会工作服务岗位人员笔试真题2025
- 贵阳观山湖区招聘城镇公益性岗位工作人员笔试真题2025
- 2026 年护理质控检查问题分类梳理培训课件
- 2026 年护生临床差错风险防范带教专题主题
- 2026广西壮族自治区经济社会技术发展研究所招聘编外聘用人员3人笔试题库含答案详解(A卷)
- 2026海南农村商业银行招聘1人(202607)笔试备考试题及答案详解
- 肿瘤患者的姑息治疗护理
- 2026年安徽安庆经开区老峰镇村(社区)专职工作人员招聘考试试卷-含答案解析
- 工程结算中工程款抵房款审批流程
- 2026年河南省中考英语试题(含答案和音频)
- 2026年河南省中考英语试卷(含答案)
- 2026年战士留疆考试真题及答案解析
- 2026年贵州高考物理真题解析含答案
- 2026年国家电投集团苏州审计中心选聘15人笔试备考试题及答案解析
- 10KV高配运行管理规定培训课件
评论
0/150
提交评论