7【工程实验室】【RIPv2配置】_第1页
7【工程实验室】【RIPv2配置】_第2页
7【工程实验室】【RIPv2配置】_第3页
7【工程实验室】【RIPv2配置】_第4页
7【工程实验室】【RIPv2配置】_第5页
已阅读5页,还剩7页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、实验RIPv2 配置【实验名称】RIPv2 配置。【实验目的】理解 RIP 两个版本之间的区别,掌握如何配置 RIPv2。【背景描述】假设在校园网在地理上分为 2 个区域,每个区域内分别有一台路由器连接了 2 个子网,需要将两台路由器通过以太网链路连接在一起并进行适当的配置,以实现这 4 个子网之间的互联互通。为了在未来每个校园区域扩充子网数量的时候,管理员不需要同时更改路由器的配置,计划使用 RIP 路由协议实现子网之间的互通。【需求分析】两台路由器通过快速以太网端口连接在一起,每个路由器上设置 2 个 Loopback 端口模拟子网,在所有端口运行 RIP 路由协议,实现所有子网间的互通。

2、【实验拓扑】图 72 实验拓扑图【实验设备】路由器2 台【预备知识】路由器的工作原理和基本配置方法,距离矢量路由协议,RIP 工作原理,RIPv1 和 RIPv2的区别,RIPv2 的配置方法【实验原理】RIP 协议有两个版本 RIPv1 和 RIPv2。RIPv1 属于有类路由协议,不支持 VLSM(变长子网掩码),RIPv1 是以广播的形式进行路由信息的更新的;更新周期为 30 秒。RIPv2 属于无类路由协议,支持 VLSM(变长子网掩码),RIPv2 是以组播的形式进行路由信息的更新的,组播地址是。RIPv2 还支持基于端口的认证,提高网络的安全性。【实验步骤】第一步:配置两台路由器的

3、主机名、接口 IP 地址RSR20#configure terminalEnter configuration commands, one per line. End with CNTL/Z.RSR20(config)#hostname RouterARouterA(config)#RouterA(config)#interface fastEthernet 0/0RouterA(config-if)#no shutdownRouterA(config-if)#exitRouterA(config)#RouterA(config)#interface loopback 0RouterA(con

4、fig-if)#Aug 15 23:46:32 RouterA %7:%LINE PROTOCOL CHANGE:Interface Loopback 0, changed state to UPRouterA(config-if)#exitRouterA(config)#RouterA(config)#interface loopback 1RouterA(config-if)#Aug 15 23:47:00 RouterA %7:%LINE PROTOCOL CHANGE:Interface Loopback 1, changed state to UPRouterA(config-if)

5、#exitRSR20#configure terminalEnter configuration commands, one per line. End with CNTL/Z.RSR20(config)#hostname RouterBRouterB(config)#RouterB(config)#interface fastEthernet 0/0RouterB(config-if)#no shutdownRouterB(config-if)#exitRouterB(config)#RouterB(config)#interface loopback 0RouterB(config-if)

6、#Aug 8 21:00:00 RouterB %7:%LINE PROTOCOL CHANGE:Interface Loopback 0, changed state to UPRouterB(config-if)#exitRouterB(config)#RouterB(config)#interface loopback 1RouterB(config-if)#Aug 8 21:00:28 RouterB %7:%LINE PROTOCOL CHANGE:Interface Loopback 1, changed state to UPRouterB(config-if)#exit第二步:

7、在两台路由器上启用 RIPv2,但不关闭自动汇总RouterA(config)#router ripRouterA(config-router)#version 2!配置使用 RIPv2RouterA(config-router)#exitRouterB(config)#router ripRouterB(confiRouterB(config-router)#version 2RouterB(config-router)#exit第三步:查看路由表从路由表中可以看到,仍然只有 B 类主网络 和 A 类主网络 出现在路由表之中。虽然 RIPv2 支持 VLSM,但 RouterA 和 Rout

8、erB 都是边界路由器,分别是 B 类主网络 和 C 类主网络 的边界、A 类主网络和 C 类主网络 的边界,因此在执行自动的路由汇总。RouterA#show ip routeCodes: C - connected, S - static, R - RIP B - BGPO - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, L1 - IS

9、-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate defaultGateway of last resort is no setRCCCCCC10.0.0.0/8 120/1 via 192.168.1.2, 00:00:10, FastEthernet 0/0172.16.1.0/24 is directly connected, Loopback 0172.16.2.0/24 is directly connected, Loopback 1192.168.1.0/24 is directly conne

10、cted, FastEthernet 0/0RouterB#show ip routeCodes: C - connected, S - static, R - RIP B - BGPO - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS in

11、ter area* - candidate defaultGateway of last resort is no setC 10.1.1.0/24 is directly connected, Loopback 0C 10.2.2.0/24 is directly connected, Loopback 1.1/32 is local host.RCC172.16.0.0/16 120/1 via 192.168.1.1, 00:00:02, FastEthernet 0/0192.168.1.0/24 is directly connected, FastEthernet 0/0第四步:关

12、闭自动路由汇总RouterA(config)#router ripRouterA(config-router)#no auto-summary!关闭 RIPv2 的自动路由汇总功能RouterA(config-router)#endRouterB(config)#router ripRouterB(config-router)#no auto-summaryRouterB(config-router)#end第五步:查看 RIP 配置信息,路由表RouterA#show ip routeCodes: C - connected, S - static, R - RIP B - BGPO - O

13、SPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate defaultGateway of last resort is no setR 10.1.1.0/24 120/1 via 192.168.1.2,

14、 00:00:03, FastEthernet 0/0R 10.2.2.0/24 120/1 via 192.168.1.2, 00:00:03, FastEthernet 0/0C 172.16.1.0/24 is directly connected, Loopback 0connected, Loopback 1C 192.168.1.0/24 is directly connected, FastEthernet 0/0!可以看到 RIP 路由表中已经学习到了子网的路由RouterA#show ip ripRouting Protocol is ripSending updates e

15、very 30 seconds, next due in 23 secondsInvalid after 180 seconds, flushed after 120 secondsOutgoing update filter list for all interface is: not setIncoming update filter list for all interface is: not setDefault redistribution metric is 1Redistributing:Default version control: send version 2, recei

16、ve version 2Interface Send Recv Key-chainFastEthernet 0/0 2 2Loopback 0 2 2Loopback 1 2 2Routing for Networks:Distance: (default is 120)!在配置 RIPv2 版本后,RIP 路由器将只接收和发送版本 2 的更新报文RouterA#show ip rip database1 via 192.168.1.2 FastEthernet 0/0 00:281 via 192.168.1.2 FastEthernet 0/0 00:281 directly connec

17、ted, Loopback 01 directly connected, Loopback 11 directly connected, FastEthernet 0/0!RIP 的数据库中保存了子网条目的信息RouterA#show ip rip interfaceFastEthernet 0/0 is up, line protocol is upRouting Protocol: RIPReceive RIPv2 packets onlySend RIPv2 packets onlyPassive interface: DisabledSplit horizon: EnabledV2 B

18、roadcast: DisabledMulticast registe: RegistedInterface Summary Rip:Not ConfiguredIP interface address:FastEthernet 0/1 is down, line protocol is downRIP is not enabled on this interfaceNull 0 is up, line protocol is upRIP is not enabled on this interfaceLoopback 0 is up, line protocol is upRouting P

19、rotocol: RIPReceive RIPv2 packets onlySend RIPv2 packets onlyPassive interface: DisabledSplit horizon: EnabledV2 Broadcast: DisabledMulticast registe: RegistedInterface Summary Rip:Not ConfiguredIP interface address:Loopback 1 is up, line protocol is upRouting Protocol: RIPReceive RIPv2 packets only

20、Send RIPv2 packets onlyPassive interface: DisabledSplit horizon: EnabledV2 Broadcast: DisabledMulticast registe: RegistedInterface Summary Rip:Not ConfiguredIP interface address:RouterB#show ip routeCodes: C - connected, S - static, R - RIP B - BGPO - OSPF, IA - OSPF inter areaN1 - OSPF NSSA externa

21、l type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area* - candidate defaultGateway of last resort is no setC 10.1.1.0/24 is directly connected, Loopback 0C 10.2.2.0/24 is directly connected,

22、 Loopback 1RRCC172.16.1.0/24 120/1 via 192.168.1.1, 00:00:22, FastEthernet 0/0172.16.2.0/24 120/1 via 192.168.1.1, 00:00:22, FastEthernet 0/0192.168.1.0/24 is directly connected, FastEthernet 0/0RouterB#show ip ripRouting Protocol is ripSending updates every 30 seconds, next due in 22 secondsInvalid

23、 after 180 seconds, flushed after 120 secondsOutgoing update filter list for all interface is: not setIncoming update filter list for all interface is: not setDefault redistribution metric is 1Redistributing:Default version control: send version 2, receive version 2Interface Send Recv Key-chainFastE

24、thernet 0/0Loopback 0Loopback 1222222Routing for Networks:Distance: (default is 120)RouterB#RouterB#show ip rip datRouterB#show ip rip database1 directly connected, Loopback 01 directly connected, Loopback 11 via 192.168.1.1 FastEthernet 0/0 00:021 via 192.168.1.1 FastEthernet 0/0 00:021 directly co

25、nnected, FastEthernet 0/0RouterB#show ip rip interfaceFastEthernet 0/0 is up, line protocol is upRouting Protocol: RIPReceive RIPv2 packets onlySend RIPv2 packets onlyPassive interface: DisabledSplit horizon: EnabledV2 Broadcast: DisabledMulticast registe: RegistedInterface Summary Rip:Not Configure

26、dIP interface address:FastEthernet 0/1 is down, line protocol is downRIP is not enabled on this interfaceNull 0 is up, line protocol is upRIP is not enabled on this interfaceLoopback 0 is up, line protocol is upRouting Protocol: RIPReceive RIPv2 packets onlySend RIPv2 packets onlyPassive interface:

27、DisabledSplit horizon: EnabledV2 Broadcast: DisabledMulticast registe: RegistedInterface Summary Rip:Not ConfiguredIP interface address:Loopback 1 is up, line protocol is upRouting Protocol: RIPReceive RIPv2 packets onlySend RIPv2 packets onlyPassive interface: DisabledSplit horizon: EnabledV2 Broad

28、cast: DisabledMulticast registe: RegistedInterface Summary Rip:Not ConfiguredIP interface address:第六步:测试网络连通性Sending 5, 100-byte ICMP Echoes to 10.1.1.1, timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/10 msSending 5, 100-byte ICMP Echoes to 10.2.2.1, timeout is

29、 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 msSending 5, 100-byte ICMP Echoes to 172.16.1.1, timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 msSending 5, 100-byte ICMP Echoes to 172.16.2.1, timeout is 2 seconds:!Success rate i

30、s 100 percent (5/5), round-trip min/avg/max = 1/2/10 ms第七步:用 debug 命令观察路由器接收和发生路由更新的情况下面是一个完整的 RIPv2 路由器接收更新和发送更新的过程,从中可以看到 RouterB接收到了 RouterA 发送的更新,其中包含两条路由信息 和(可以看到水平分割原则的作用),然后刷新了路由表。RouterB 本身发送的更新报文则在 Fa0/0、Lo0 和 Lo1 三个端口发出,使用组播方式,组播地址为,使用的是 UDP 520 端口。在水平分割的原则下,每个端口发送的路由信息均不相同。注意 RIPv2 的更新报文格

31、式和 RIPv1 的不同。RouterB#debug ip ripRouterB#Aug 8 21:58:08 RouterB %7: RIP RIP recveived packet, sock=2125src=192.168.1.1 len=44Aug 8 21:58:08 RouterB %7: RIP Cancel peer remove timerAug 8 21:58:08 RouterB %7:RIP Peer remove timer shedule.Aug 8 21:58:08 RouterB %7: RIP Both do not need auth, Auth okmas

32、k 255.255.255.0 nhop 0.0.0.0 metric 1mask 255.255.255.0 nhop 0.0.0.0 metric 1Aug 8 21:58:08 RouterB %7: RIP Received version 2 response packetAug 8 21:58:08 RouterB %7: RIProutesrc=192.168.1.1 intf=1Aug 8 21:58:08 RouterB %7: RIPAug8 21:58:08 RouterB %7: RIP 172.16.1.0/24 RIP route refresh!Aug 8 21:

33、58:08 RouterB %7: RIP 172.16.1.0/24 RIP distance apply from192.168.1.1!Aug 8 21:58:08 RouterB %7: RIP 172.16.1.0/24 ready to refresh kernel.distance=120 metric=1 nexthop_num=1 distance=120 nexhop=192.168.1.1 ifindex=1Aug 8 21:58:08 RouterB %7: RIP 172.16.1.0/24 cancel route timerAug 8 21:58:08 Route

34、rB %7: RIP 172.16.1.0/24 route timer schedule.Aug 8 21:58:08 RouterB %7: RIProutesrc=192.168.1.1 intf=1Aug 8 21:58:08 RouterB %7: RIPAug 8 21:58:08 RouterB %7: RIP 172.16.2.0/24 RIP route refresh!Aug 8 21:58:08 RouterB %7: RIP 172.16.2.0/24 RIP distance apply from192.168.1.1!Aug 8 21:58:08 RouterB %

35、7: RIP 172.16.2.0/24 ready to refresh kernel.distance=120 metric=1 nexthop_num=1 distance=120 nexhop=192.168.1.1 ifindex=1Aug 8 21:58:08 RouterB %7: RIP 172.16.2.0/24 cancel route timerAug 8 21:58:08 RouterB %7: RIP 172.16.2.0/24 route timer schedule.Aug 8 21:58:23 RouterB %7: RIP Output timer expir

36、ed to send reponseAug 8 21:58:23 RouterB %7: RIP Prepare to send MULTICAST response.Aug 8 21:58:23 RouterB %7: RIP Building update entries on FastEthernet 0/0Aug 8 21:58:23 RouterB %7:Aug 8 21:58:23 RouterB %7:Aug 8 21:58:23 RouterB %7: RIP Send packet to 224.0.0.9 Port 520 onFastEthernet 0/0Aug 8 2

37、1:58:23 RouterB %7: RIP Prepare to send MULTICAST response.Aug 8 21:58:23 RouterB %7: RIP Building update entries on Loopback 0Aug 8 21:58:23 RouterB %7:Aug 8 21:58:23 RouterB %7:Aug 8 21:58:23 RouterB %7:Aug 8 21:58:23 RouterB %7:Aug 8 21:58:23 RouterB %7: RIP Send packet to 224.0.0.9 Port 520 onLoopback 0Aug 8 21:58:23 RouterB %7: RIP Prepare to send MULTICAST response.Aug 8 21:58:23 RouterB %7: RIP Building update en

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论