路由器高级实训教程

所需积分/C币:10 2012-11-21 10:14:18 3.54MB PDF
0
收藏 收藏
举报

关于路由器高级命令实验的教程,供有一定水平的相关人员练习。
实训步骤 、配置基础网络 木实训中使用路由器各自的两个以太口来互连,其配置如下所示: F00 F0/1 FOB Loopback R1101112410121/24无 10.1.3.1 R21011224无 1012.224 10.14.1 配置过程如下: -R1- Router#confi Router configthostname r1 R1 config#interface fastEthernet ofo R1 config_fo/ O#ip address 10.1.1.1 255.255.255.0 R1 config_ fO/0#exit R1 config# interface fast Ethernet o/1 R1 config_fo/1#ip address 10.1.2.1 255.255.255.0 R1 config f0/1#exit R1 config#interface loopback O R1 config0# ip add10.1.31255255.2550 R1 config_ 0#exit R1 config井exit R1# R1 Router#config Router configthostname R2 R2 config# interface fastEthernet o0 R2 config fo/o#ip address 10 1.1.2 255.255.255.0 R2 config fo/0#exit R2 config#interface fastEthernet 03 R2 config_f03# Hip add10122255.2552550 R2 config_ fO B#exit R2 config#interface loopback 0 R2 config_ 0# ip address 10 1.4.1 255.255.255.0 R2 config_10#exit R2 config#exit R2#Jan 100: 09: 10 Configured from console o by UNKNOWN 2、配置R1的静态路由 到达网终1014.0分别经过10.1.1.2(度量值为10)和10.1.2,2(度量值为20) 过程如卜: R1 config# ip route10.140255255.255.0101.1.210 R1 config# ip route10.1.40255255255.010.1.2.220 R1 config 查看路由表如下: R1#show ip route Codes: C-connected s-staticr-RiP b-BGP BC -bGP connected D-DEIGRP DEX-external deIGRPo-OSPF OlA-OSPF inter area oN1-OSPF NSSA external type 1, oN2 -OSPF NSSa external type 2 OE1-OSPF external type 1, oE2-OSPF external type 2 DHCP-DHCP type VRE D:O C 10.110/24 is directly connected, FastEthernetoro Ccs 10120/24 is directly connected, FastEtherneto/1 10130/24 is directly connected, Loopback 1014.0/24 [10, 0] via 10.1.1.2(on FastEthernetoo R1# 注意上述路由衣中到大10.1.4.0网络的度量值与我们设置的是·致的,接下来,将F0端 口shut掉,再次查看路由表 R1 config#interface fastEthernet o/o R1 config fo/o#shut R1 config_fo/0#exit R1 config#show ip route Codes;c-connected, s-static,r-RiP b-bGP Bc -bgP connected D-DEIGRP DEX- external deigrPo-OSPE OlA-OSPF inter area ON1-OSPF NSSA external type 1, oN2-OSPF NSSa external type 2 OE1-OSPF external type 1, oE2-OSPF external type 2 DHCP-DHCP type VRE ID:O 10120/24 is directly connected, FastEtherneto/1 CCsR 10130/24 is directly connected, Loopback 1014024 [20, 0] via 10. 1.2.2(on FastEtherneto/1) 1 config# 注意此时的度量值为20的静态路由已经生效了。 注意事项和排错 1、从路由器中测试连通性的影响 R1#ping10.1.2.2 P|NG10.1.2.2(101.22):56 data bytes !!!! 10.1.2.2 ping statistics 5 packets transmitted, 5 packets received, 0% packet loss round-trip min/avg/max=o/o/o ms R1#ping10.1.4.1 P|NG10.14.1(10.1.4.,1):56 data bytes ---10.1 4.1 ping statistics - 5 packets transmitted, 5 packets received, O% packet loss round-trip min/ avg/max=0/oo ms R1#ping10.14.1-i10.1.3.1 P|NG10.14.1(10.1.4.1):56 data bytes ---10.1 4.1 ping statistics --- 5 packets transmitted, o packets received, 100% packet loss R1# 注意,上面的过程显示从R1出发Png10.1.2.2是可以通的,表明链路没有问题,再 ping10141也是可以通的,但以10.131为源地址出发ping10.141却不通了,原因何在? 原因在于我们还没有为R2配置返冋的路由,因此,解决上述问题的办法就是为R2配置 合适的静态路由,过程如下 R2 config# ip route10.1.3.0255.255.255.010.1.1.110 R2 config# ip route10.1.3.0255.255.255.010.12.120 R2 config#exit R2#Jan 100: 26: 20 Configured from console o by UNKNOWN show ip route Codes: C-connected, s-staticr-RIPB-BGP BC-bGP connected D-DEIGRP DEX-external deigrPo-oSPe olA-oSPf inter area oN1-OSPF NSSA external type 1, on2 -OSPF NSSa external type 2 OE1-OSPF external type 1, oE2-OSPF external type 2 DHCP -DHCP type VRF ID: 0 C 10.1.10/24 is directly connected, FastEtherneto/ o C 0.120/4 is directly connected, FastEthernetO3 10130/24 [10,0] via 10.1. 1.(on FastEthernetoo C 0140/24 is directly connected, Loopback R2# 再次测试连通性 R1#ping101.4.1-1101.31 PING 10.1.4.1(10.1.4.1: 56 data bytes 10.1.4.1 ping statistics 5 packets transmitted, O packets received, 100% packet loss R1# 还是没有连通,这又是为什么? 故障排查 分析上面的R2路由表我们得到一条静态路由 10.130/24 [10, 0] via 10.1.1.1(on FastEtherneto/b) 由此我们知道从R2去往10130网络的数据(R1以101.31为源地址所发png包的返回数 据)需要从f0)口发送给R1,而此时R1的F0端口是shut状态,因此无法通信。 解决小法就是把R2的F0/口也shut掉或者将f知端口的线缆拔掉。过程如下 R2 config#interface fastethernet o0 R2 config fo/0#shut R2 config_fo/0#exit R2 config井exit R2#sh ip route Codes: C-connected, s- static, r-RiPb-BGP BC-bgP connected D-. DEX- external deigrPo-OSPf ola-oSPf inter area ON1-OSPF NSSA external type 1, ON2-OSPF NSSa external type 2 oE1-OSPF external type 1, oE2 -OSP F external type 2 DHCP-DHCP type VRE ID: O C 10120/24 is directly connected, FastEtherneto 3 S 10130/24 20,]via 10. 1.2.1(on FastEtherneto 3 C 10140/24 is directly connected, Loopback R2# 此时再次测试连通性如下: R1#ping10.1.4.1110.13.1 P|NG10.1.4.1(10.1.4.1):56 data bytes 10.1. 4 1 ping statistics -- 5 packets transmitted, 5 packets received, o% packet loss round-trip min/avg/max=o/o/o ms R1# 问题已经解决 配置文档 --R1 R2 R1#show r R2#sh ru Building configuration Building configuration Current configuration Current configuration version 1,3,3G Iversion 1,3,3G service timestamps log date service timestamps log date service timestamps debug date service timestamps debug date no service password-encryption no service password-encryption hostname r1 hostname r2 gbsc group default gbsc group default interface Loopback interface loopback p address101.3.1255.255255.0 ip address10.14.12552552550 no ip directed-broadcast no ip directed-broadcast nterface FastEtherneto/ interface Fast Etherneto0 ip address10.1.1.1255.255.255.0 ip address10.112255.255255.0 no ip directed-broadcas no ip directed-broadcast shutdown shutdown interface FastEtherneto/1 interface FastEtherneto B ip address101.2.1255.255.255.0 ip address101.2.2255.255255.0 no ip directed-broadcast no ip directed-broadcast interface Serial/2 interface Serial0/1 no ip address no ip address no ip directed-broadcast no ip directed-broadcast interface Serial/B interface Serialon no ip address no ip address no ip directed-broadcast no ip directed-broadcast interface Async/0 interface asynco0 no ip address no ip address no ip directed-broadcast no ip directed-broadcast p route10.1.4.0255255.255.010.1.2.220 ip route10.1.3.0255.255.255.010.1.2.120 p route1014025525255010.11210 ip route101.302552552550101110 共同思考 为什么刚刚使用shut命令时,只本端得路由器将相关的静态路由改动了,而对端却没 有变化? 是否有可能通过更改静态路由的管理距离值使他们可以成为动态路由的浮动路由? 课后练习 尝试设置不同的地址重新进行设置。 实训二|CMP重定向实训 实训目的 理解ICMP重定向存在环境 进一步熟悉CMP报文结构 应用环境 多出口环境中,PC终端的路由选择完全可以通过ICMP重定向来操做,而不需要为终端 PC配置多个网络的出口。使用CMP重定向,只要环境中的路由设备能够拥有正确的路由 息,PC就可以通过ICMP重定向报文找到每个网络的正确出口路由了。 实训设备 1.两台PC 2.两台路由器 台交换机 若干网线 实训拓扑 10.2.2124 Router Router 10.1.1.1/24 101125424 PC1 PC2 10.1.11024 11.210/24 实训要求 配置基础环境,注意PC1的內关配置为10.1.1.1,PC2的內关配置为10.1.2.1 2.配置R1的路由 ap route10.1.2.0255255255.010.11254 3.在PC1中廾启抓包软件,启动抓取LCMP协议报文 在PC1开启持续的 PING pc2 5.停止捕获,查看丨CMP报文,重点关注ECHO报文 实训步骤 1、配置基础环境 R1 R2 F0/10.1.1.11011254 FO/B 10.1.2.1 R1 Router#config Router configthostname R1 R1 config#interface fastEthernet oo R1 config fi0/#ipad10.11.1255255,255.0 R1 ig fo/o#exit R1 config# ip route10.12.0255255.255.0101.1.254 R1 config#texit R1# e-----------------------------R2 Router#config Router configtthostname r2 R2 config#interface fastEthernet o/0 R2 config_fi0/#ipad10.11254255255255.0 R2 config fo/#exit R2 config#interface fastEthernet 0/3 R2 config_f0/# ip add10.121255255255.0 Ifig fOB#exit R2 config#exit R2#wr ing current configurat OK! R2#Jan 1 00: 01: 52 Configured from console o by UNKNOWN 2、PC1启动抓包软件,本实训使用 sniffer 启动后,定义一个过滤器,如下所示:

...展开详情
试读 127P 路由器高级实训教程
立即下载 低至0.43元/次 身份认证VIP会员低至7折
抢沙发
一个资源只可评论一次,评论内容不能少于5个字
上传资源赚积分or赚钱
    最新推荐
    路由器高级实训教程 10积分/C币 立即下载
    1/127
    路由器高级实训教程第1页
    路由器高级实训教程第2页
    路由器高级实训教程第3页
    路由器高级实训教程第4页
    路由器高级实训教程第5页
    路由器高级实训教程第6页
    路由器高级实训教程第7页
    路由器高级实训教程第8页
    路由器高级实训教程第9页
    路由器高级实训教程第10页
    路由器高级实训教程第11页
    路由器高级实训教程第12页
    路由器高级实训教程第13页
    路由器高级实训教程第14页
    路由器高级实训教程第15页
    路由器高级实训教程第16页
    路由器高级实训教程第17页
    路由器高级实训教程第18页
    路由器高级实训教程第19页
    路由器高级实训教程第20页

    试读结束, 可继续阅读

    10积分/C币 立即下载 >