网络路由问题
Cicso 网络协议配置介绍之一 RIP (1) 本实验对RIP协议进行基本的配置,涉及到配置RIP协议所必须的命令和常用的监测命令。1.实验目的通过本实验,读者可以掌握以下技能:在路由器上启动RIP协议;声明相应网络进入RIP路由进程;查看路由表并理解相关字段含义;查看RIP协议配置信息;监测RIP协议相关信息。2.设备需求本实验需要以下设备:Cisco路由器3台,分别命名为R1、R2和R3,均要求具有1个以太网接口和2个串行接□;3条DCE电缆和3条DTE电缆,或3条DCE转DTE电缆;1台终端服务器,如Cisco 2509路由器。及用于反向Telnet的相应电缆;1台带有超级终端程序的PC机,以及Console电缆及转接器。3.拓扑结构及配置说明本实验拓扑结构如图1所示,首先把DCE电缆和DTE电缆进行对接,共组成3对电缆。然后用这3对电缆把R1和R2"RE和R3、R2和R3分别连接起来。各路由器使用的接口及其编号见图1中的标注。IP地址分配如下:R1: E0 172.16.1.1, 50 172.16.12.1, 51 172.16.13.1;R2: E0 172.16.2.2, 50 172.16.12.2, 51 172.16.23.2;R3: E0 172.16.3.3, 50 172.16.13.3, 51 172.16.23.30子网掩码均为 255.255.255.00如图 1实验中R、R2之间和R、R3之间的串行线路速率设置为5OOkbit/s;R2、R3之间的串行线路速率设置为64kbit/s。本实验要求通过对RIP路由选择协议的配置,实现全网的连通。4.实验配置及监测结果实验环境准备就绪后,打开PC机、访问服务器和路由器的电源。开始进行实验。现在假设我们不知道各路由器串行接口所连接的电缆是DCE电缆还是DTE电缆,同时路由器的E0接口均没有连接任何设备。在这样的基础上开始配置3台路由器,并启动RIP路由选择协议。具体配置过程如配置清单1-1、1-2所示,配置清单后有详细的讲解。配置清单1-1配置以太网接口和串行接口第1段:配置R1网络接口R1#R1#show controllers serial 0HD unit 0, idb = 0x95659C, driver stmcture at 0x95C910buffer size 1524 HD unit 0, V.35 DCE cablecpb = 0xE2, eda = 0x2904, cda = 0x2918RX ring with 16 entries at OxE2280000 bd_ptr==0x2800 pak=0x95DB94 ds=0xE25A4C status==80 pak_size=2201 bd_ptr=0x2814 pak=0x960328 ds=0xE2CCC8 status=80 pak_size=22...(类似内容,省略多行)0 missed datagrams, 0 overruns0 bad datagram encapsulations, 0 memory errors0 transmitter underruns0 residual bit errorsR1#sh controllers ser 1HD unit 1, idb = 0x961614, driver structure at 0x967988buffer size 1524 HD unit 1,cpb = 0xE3, eda = 0x850, cda = 0x864RX ring with 16 entries at OxE3080000 bd_ptr=0x0800 pak=Ox9690B4 ds==OxE34E80 status=80 pak_size=22...(类似内容,省略多行)01 bd__ptr=0xl014 pak=0x000000 ds=0xE22EA4 status=80 pak_size=220 missed datagrams, 0 overruns0 bad datagram encapsulations, 0 memory errors0 transmitter underruns0 residual bit errorsR1#conftEnter configuration commands, one per line. End with CNTL/Z.R1(config)#no logg conR1config#int e0R1(config-if)#ip addr 172.16.1.1255.255.255.0R1(config-if)#no keepaliveR1(config-if)#no shutR1(config-if)#mt sOR1(config-if)#ip addr 172.16.12.1R1(config-if)#clockrate 500000R1(config-if)#no shR1(config-if)#bandwidth 500R1(config-if)#int siR1(config-if)#ip addr 172.16.13.1R1(config-if)#clockrate 500000R1(config-if)#no shR1(config-if)#bandwidth 500R1(config-if)#^ZR1#R1#sh int s0Seria10 is down,line protocol is downHardware is HD64570Internet address is 172.16.12.1/24MTU 1500 bytes, BW 500 Kbit, DLY 20000 usec,reliability 255/255, txioad 1/255, rxioad 1/255Encapsulation HDLC, loopback not setKeepalive set (10 sec)Last input 00:01:44, output 00:01:46, output hang neverLast clearing of "show interface" counters 00:00:02Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0Queueing strategy: fifoOutput queue :0/40 (size/max)5 minute input rate 0 bits/sec, 0 packets/sec5 minute output rate 0 bits/sec, 0 packets/sec0 packets input, 0 bytes, 0 no bufferReceived 0 broadcasts, 0 runts, 0 giants, 0 throttles0 input errors, 0 CRC,0 frame, 0 overrun, 0 ignored, Ollort0 packets output, 0 bytes, 0 underruns0 output errors, 0 collisions, 0 interface resets0 output buffer failures, 0 output buffers swapped out0 carrier transitionsDCD=up DSR=up DTR=down RTS=down CTSsup第2段:配置R2网络接口Term_Server>2[Resuming connection 2 to R2 ...]R2#sh contr ser 0HD unit 0, idb = Oxl4DF9C, driver structure at 0x154310buffer size 1524 HD unit 0, V.35 DTE cablecpb = 0x1, eda = 0x4878, cda == Ox488CRX ring with 16 entries at 0x401480000 bd@ptr=0x4800 pak=Oxl557E8 ds=Ox40187C4 status=80 pak_size=22...(类似内容,省略多行)0 missed datagrams, 0 overruns0 bad datagram encapsulations, 0 memory errors0 transmitter underruns0 residual bit errorsR2#sh ser 1HD unit 1, idb == 0x159014, driver structure at 0x15F388buffer size 1524 HD unit 1,cpb = 0x2, eda = 0x3140, cda = 0x3000RX ring with 16 entries at 0x402300000 bd_ptr==0x3000 pak=Oxl62B4C ds=Ox402CEOC status=80 pak_size=0...(类似内容,省略多行)0 missed datagrams, 0 overruns0 bad datagram encapsulations, 0 memory errors0 transmitter underruns0 residual bit errorsR2#conftEnter configuration commands, one per line. End with CNTL/Z.R2(config)#iso logg conR2(config)#int e0R2(config-if)#ip addr 172.16.2.2R2(config-if)#eo keepaliveR2(config-if)#no shR2(config-if)#lnt sOR2(config-if)#ip addr 172.16.12.2R2(config-if)#no shR1(config-if)#bandwidth 500R2(config-if)#int s1R2(config-if)#ip addr 172.16.23@2R2(config-if)#clockr 64000R2(config-if)#no shR1(config-if)#baiidwldth 64R2(config-if)#endR2#pmg 172.16.12.1Type escape sequence to abort.Sending 5,100-byte ICMP Echos to 172.16.12.1,timeout is 2 seconds:!!!!!R2#第3段:配置R3网络接口Term_Server>3[Resuming connection 3 to R3 ... ]R3#conftEnter configuration commands, one per line. End with CNTL/Z.R3(config)#no logg conR3(config)#int e0R3(config-if)#ip addr 172.16.3.3 255.255.255.0R3(config-if)#no keepaliveR3(config-if)#no shR3(config-if)#int s0R3(config-if)#ip addr 172.16.13.3 255.255.255.0R3(config-if)#no shR1(config-if)#bandwidth 500R3(config-if)#int siR3(config-if)#ip addr 172.16.23.3 255.255.255.0R1(config-if)#bandwidth 64R3(config-if)#endR3#ping 172.16.13.1配置清单1-2 配置RIP协议第1段:配置RIP协议R1#conftEnter configuration commands, one per line. End with CNTL/Z.R1(config)#router ripR1(config-router)#eetwork 172.16.0.0R1(config-router)#Term_Server>2[Resuming connection 2 to R2 ...]R2#conftEnter configuration commands, one per line. End with CNTT ./ZR2(config)#router ripR2(config-router)#network 172.16.0.0R2(config-router)#Term_Server>3[Resuming connection 3 to R3 ...]R3#conftEnter configuration commands, one per line. End with CNTL/Z.R3(config)#router ripR3(config-router)#network 172.16.0.0R3(config-router)#第2段:查看路由表Term_Server> 1[Resuming connection I to R1... ]R1(config-router)#endR1#sh ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, 0 - OSPF, IA - OSPF inter areaN - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not set172.16.0.0/24 is subnetted, 6 subnetsR 172.16.23.0[20/1]via 172.16.12.2,00:00:06,Serial0[20/1]via 172.16.13.3,00:00:07,Serial1C 172.16.12.0 is directly connected, Serial0C 172.16.13.0 is directly connected. Serial1C 172.16.1.0 is directly connected, Ethernet0R 172.16.2.0[20/1]via 172.16.12.2,00:00:06,Serial0R172.16.3.0[20/1]via 172.16.13.3,00:00:07,Serial1R1#Term_Server>2[Resuming connection 2 to R2 ... ]R2(config-router)#endR2#sh ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M " mobile, B - BGPD - EIGRP, EX - EIGRP external, 0 - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type I, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not set172.16.0.0/24 is subnetted, 6 subnetsC 172.16.23.0 is directly connected, SeriallC 172.16.12.0 is directly connected, SerialOR 172.16.13.0[20/1]via 172.16.12.1,00:00:08,Serial0[20/1]via 172.16.23.3,00:00:09,Serial1R 172.16.1.0[20/1]via 172.16.12.1,00:00:08,Serial0C 172.16.2.0 is directly connected, Ethernet0R 172.16.3.0[20/1]via 172.16.23.3,00:00:09,Serial1R2#Term_Server>3[Resuming connection 3 to R3 ... ]R3(config-.router)#endR3#sh ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGPD - EIGRP, EX -EIGRP external, 0 - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGPi - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate default, U - per-user static route, o - ODRP - periodic downloaded static routeGateway of last resort is not set172.16.0.0/24 is subnetted, 6 subnetsC 172.16.23.0 is directly connected, Serial1R 172.16.12.0 [120/13 via 172.16.13.1, 00:00:17, Serial0[120/1} via 172.16.23.2, 00:00:26, Serial1C 172.16.13.0 is directly connected, SerialOR 172.16.1.0 [120/1] via 172.16.13.1, 00:00:17, Serial0R 172.16.2,0 [120/1] via 172.16.23.2,00:00:26, Serial1C 172.16.3.0 is directly connected, Ethemet0R3#PS:(1)RIP协议的基本配置非常简单。首先使用router ip命令进入RIP协议配置模式,然后用network语句声明进入RIP进程的网络。可以看到netwo比语句中使用的是网络号,而不是子网号。当我们试图把172.16.1.0这一子网号码加入R1的RIP路由进程中而发出network l72.16.0.0的命令后,show running-config的结果会显示此处的语句变成为network 172.16.0.0,即B类网络172.16.0.0下的所有子网都加入了RIP路由进程。(2)使用show ip route命令查看路由表。在R1路由器上可以看到,通过RIP协议,学到了与R1不直接相连的网段172.16.23.0、172.16.2.0和17216.3.0。路由表中的项目解释如下。R 172.16.2.0[120/1]via 172.16.12.2,00:00:06,Serial0R:表示此项路由是由RIP协议获取的,另外,"C,代表直连的网段。172.16.2.0: 目标网络。[120/1]:12O是RIP协议的管理距离,1是该条路由的度量值,即Metric值,即跳数。via:经由的意思。172.16.12.2:是由当前路由器出发,到达目标网段所需经过的下一个跳点的IP地址。00:00:06:此条路由产生的时间,即65钟。Serial0:由此路由器到达目标网段所需使用的接口。(3)从3台路由器的路由表中可以看出RIP协议工作正常,所有网段的路由条目都已具备。(4)对于路由器R1的路由表而言。172.16.23.0这条路由项具有2个路径,即表中列出的172.26.12.2和172.16.13.3,表示到达172.16.23.0网段可以通过R2路由器,也可以通过R3路由器,表明有两条等值的路径存在,其度量值均为1。路由器R2和R3都有类似的路由存在。(5)从实验拓扑图可以分析出,从R2发送到R3的数据包如果经由R1的话会有较高的带宽(5OOkbit/s),是应该首选的路由。但路由表中显示的实际情况是选择了由R2直接发送到R3。这表明RIP路由协议在进行路由计算时只考虑两个网段之间的跳数这个惟一的度量值,而不考虑诸如带宽。延迟等其他因素。监测清单1-1记录了RIP协议常用的监测命令的使用。监测清单1-1 RIP协议常用监测命令R3#sh ip protocolRouting Protocol is "rip"Sending updates every 30 seconds, next due in 24 secondInvalid after 180 seconds, hold down 180, flushed after 240Outgoing update filter list for all interfaces isIncoming update filter list for all interfaces isRedistributing: ripDefault version control: send version 1, receive any versionInterface SendRecvTriggered TIPKey-chainEthernet01 12Serial0 1 12Serial1 1 12Autonaatic network sunamarization is in effectRouting for Networks:172.16.0.0Routing Information Sources:Gateway DistanceLast Update172.16.23.2 12000:00:14172.16.13.1 12000:00:00Distance: (default is 120)R3#pmg 172.16.1.1Type escape sequence to abort.Sending 5, 100-bytelCMPEchos to 172.16.1.1,timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), rouad-tripmin/avg/max=8/8/8 msR3#trace 172.16.1.1Type escape sequence to abort.Tracing the route to 172.16.1.11 172.16.13.14 msec * R3#conft
路由分静太路由和动态路由.rip 和 rip2(2是版本) 都是静太路由协议.二个以上的路由器相连必须做静太路由如果不做静太路由的话根本就不知道各路由器的IP地址这样怎么能通信呢.而静态路由适合于小型企业超过19台以上的路上器就不能用rip静太路上了啊,只能用OSPF(动态路由协议)OSPF是自动更新路由条目的啊.不过缺点就是占用带宽.而CHAP是实现验证功能的.加强安全性.igrp这个协议我还真不接触过.
只要是路由器必须配置路由协议才能工作的,否则怎么实现第三层网络寻址。 具体使用什么协议,根据网络的要求而定了,现在一般EIGRP和OSPF比较常用些吧。
对呀,人家提问又不是看你废话 楼主说的这些路由协议作用是什么?路由呗!所以,你让网络通了,跑起来了,你管它用什么路由协议呢? 通常我们用的比较多的是RIP,大一点的网络用OSPF
我都不明白上面的人复制那么多废话干吗 - - 看得人都头大
