




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、实验四 动态路由协议实验4.1 RIP V1 基本配置【实验名称】RIP V1 基本配置【实验目的】掌握在路由器上配置RIP V1 。【背景描述】假设校园网通过一台路由器连接到校园外的另一台路由器上,现要在路由器上做适当配置,实现校园网内部主机与校园网外部主机的相互通信。本实验以2 台R2624 路由器为例,路由器分别命名为Router1 和Router2 ,路由器之间通过串口采用V35 DCE/DTE 电缆连接,DCE 端连接到Router1 (R2624 )上。PC1 的IP 地址和缺省网关分别为172.16.1.11 和172.16.1.1 ,PC2 的IP 地址和缺省网关分别为172.
2、16.3.22 和172.16.3.2 ,网络掩码都是255.255.255.0 。【实现功能】实现网络的互连互通,从而实现信息的共享和传递。【实验拓扑】 172.16.1.0/24 172.16.2.0/24 172.16.3.0/24 outer1 Router2 PC1 11 1 1 2 2 22 PC2 【实验设备】R2624 路由器(2 台)、V35DCE (1 根)、V35DTE (1 根)【实验步骤】第一步:在路由器Router1 上配置接口的IP 地址和串口上的时钟频率Router1(config)# interface fastethernet 0 !进入接口F0 的配置模式
3、Router1(config-if)# ip address 172.16.1.1 255.255.255.0 !配置路由器接口F0 的IP 地址Router1(config-if)# no shutdown !开启路由器fastethernet0 接口!Router1(config)# interface serial 0 !进入接口S0 配置模式Router1(config-if)# ip address 172.16.2.1 255.255.255.0 !配置路由器接口S0 的IP 地址Router1(config-if)#clock rate 64000 !配置Router1 的时钟频
4、率(DCE )Router1(config-if)# no shutdown !开启路由器serial 0 接口验证测试:验证路由器接口的配置和状态Router1#show ip interface briefInterface IP-Address OK? Method Status Protocol2 / 16FastEthernet0 172.16.1.1 YES manual up upFastEthernet1 unassigned YES unset administratively down downFastEthernet2 unassigned YES unset admin
5、istratively down downFastEthernet3 unassigned YES unset administratively down downSerial0 172.16.2.1 YES manual down downSerial1 unassigned YES unset administratively down down注:串口Serial0 的链路层状态是down ,这是因为对端接口还没有配置。第二步:在路由器Router1 上配置RIP V1 路由协议Router1(config)# router rip !创建RIP 路由进程Router1(config-r
6、outer)#network 172.16.0.0 !定义关联网络(必须是直连的主类网络地址)验证测试:验证Router1 上的RIP V1 路由表Router1#show ip routeCodes: C - connected, S - static, R - RIPO - OSPF, IA - OSPF inter areaE1 - OSPF external type 1, E2 - OSPF external type 2Gateway of last resort is not set172.16.0.0/24 is subnetted, 2 subnetsC 172.16.1.0
7、 is directly connected, FastEthernet0C 172.16.2.0 is directly connected, Serial0第三步:在路由器Router2 上配置接口的IP 地址Router2(config)# interface fastethernet 0 !进入接口F0 的配置模式Router2(config-if)# ip address 172.16.3.2 255.255.255.0 !配置路由器接口F0 的IP 地址Router2(config-if)# no shutdown !开启路由器fastethernet0 接口!Router2(co
8、nfig)# interface serial 0 !进入接口S0 配置模式Router2(config-if)# ip address 172.16.2.2 255.255.255.0 !配置路由器接口S0 的IP 地址Router2(config-if)# no shutdown !开启路由器serial 0 接口验证测试:验证路由器接口的配置和状态Router2#show ip interface briefInterface IP-Address OK? Method Status ProtocolFastEthernet0 172.16.3.2 YES manual up upFas
9、tEthernet1 unassigned YES unset administratively down downFastEthernet2 unassigned YES unset administratively down downFastEthernet3 unassigned YES unset administratively down downSerial0 172.16.2.2 YES manual up upSerial1 unassigned YES unset administratively down down第四步:在路由器Router2 上配置RIP V1 路由协议
10、Router2(config)# router rip !创建RIP 路由进程Router2(config-router)#network 172.16.0.0 !定义关联网络(必须是直连的主类网络地址)验证测试:验证Router2 和Router1 上的RIP V1 路由表Router2#show ip routeCodes: C - connected, S - static, R - RIPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaE1 - OSPF external type 1, E2 - OSPF e
11、xternal type 2Gateway of last resort is not set172.16.0.0/24 is subnetted, 3 subnetsR 172.16.1.0 120/1 via 172.16.2.1, 00:00:16, Serial0 !Router2 通过RIP 协议获得的路由C 172.16.2.0 is directly connected, Serial0C 172.16.3.0 is directly connected, FastEthernet0Router1#sh ip routeCodes: C - connected, S - stat
12、ic, R - RIPO - OSPF, IA - OSPF inter areaE1 - OSPF external type 1, E2 - OSPF external type 2Gateway of last resort is not set172.16.0.0/24 is subnetted, 3 subnetsC 172.16.1.0 is directly connected, FastEthernet0C 172.16.2.0 is directly connected, Serial0R 172.16.3.0 120/1 via 172.16.2.2, 00:00:08,
13、Serial0 !Router1 通过RIP 协议获得的路由第五步:测试网络的连通性。C: ping 172.16.3.22 !从PC1 ping PC2C: ping 172.16.1.11 !从PC2 ping PC1【注意事项】1 在串口上配置时钟频率时,一定要在电缆DCE 端的路由器上配置,否则链路不通;2 定义关联网络时,命令network 后面必须是与该路由器直连的主类网络地址。【参考配置】Router1#show running-config ! 显示路由器Router1 的全部配置Building configuration.Current configuration:!ver
14、sion 6.14(2)!hostname Router1!enable secret 5 $1$CT43$gMntVy1ViUeKqRfmWanw/0!ip subnet-zero! endRouter2#show running-config ! 显示路由器Router2 的全部配置Building configuration.Current configuration:!hostname Red-Giant!enable secret 5 $1$TK6E$V8xIZJ40aN1LYoUd27U45/!ip subnet-zero!interface FastEthernet0ip add
15、ress 172.16.3.2 255.255.255.0!interface FastEthernet1no ip addressshutdown!interface FastEthernet2no ip addressshutdown!interface FastEthernet3no ip addressshutdown!interface Serial0ip address 172.16.2.2 255.255.255.0!interface Serial1no ip addressshutdown!router ripnetwork 172.16.0.0!ip classless!l
16、ine con 0line aux 0line vty 0 4password starlogin! end实验4.2在不连续的子网中运行RIP V1【实验名称】在不连续的子网中运行RIP V1【实验目的】掌握在不连续的子网中配置RIP V1 。【背景描述】假设校园网通过一台路由器连接到校园外的另一台路由器上,中间穿过的是另一个主网络192.168.1.0/24 ,而校园内网和外部网则是主网络172.16.0.0/16 的两个子网,现要在路由器上做适当配置,实现校园网内部主机与校园网外部主机的相互通信。本实验以2 台R2624 路由器为例,路由器分别为Router1 和Router2 ,路由器
17、之间通过串口采用V35 DCE/DTE 电缆连接,DCE 端连接到Router1 上 。PC1 的IP 地址和缺省网关分别为172.16.1.11和172.16.1.1 ,PC2 的IP 地址和缺省网关分别为172.16.3.22 和172.16.3.2 ,网络掩码都是255.255.255.0 。【实现功能】实现不连续子网的互连互通,从而实现信息的共享和传递。【实验拓扑】 172.16.1.0/24 192.168.1.0/24 172.16.3.0/24 outer1 Router2 PC1 11 1 1 2 2 22 PC2 【实验设备】R2624 路由器(2 台)、V35DCE (1
18、根)、V35DTE (1 根)【实验步骤】第一步:在路由器Router1 上配置接口的IP 地址和串口上的时钟频率Router1(config)# interface fastethernet 0 !进入接口F0 的配置模式Router1(config-if)# ip address 172.16.1.1 255.255.255.0!配置路由器接口F0 的IP 地址Router1(config-if)# no shutdown !开启路由器fastethernet0 接口!Router1(config)# interface serial 0 !进入接口S0 配置模式Router1(confi
19、g-if)# ip address 192.168.1.1 255.255.255.0 !配置路由器接口S0 的IP 地址Router1(config-if)#clock rate 64000 !配置Router1 的时钟频率(DCE )Router1(config-if)# no shutdown !开启路由器serial 0 接口验证测试:验证路由器接口的配置Router1#show ip interface briefInterface IP-Address OK? Method Status ProtocolFastEthernet0 172.16.1.1 YES manual up
20、upFastEthernet1 unassigned YES unset administratively down downFastEthernet2 unassigned YES unset administratively down downFastEthernet3 unassigned YES unset administratively down downSerial0 192.168.1.1 YES manual down downSerial1 unassigned YES unset administratively down down第二步:在路由器Router1 上配置R
21、IP V1 路由协议Router1(config)# router rip !创建RIP 路由进程Router1(config-router)#network 172.16.0.0 !定义关联网络172.16.0.0Router1(config-router)#network 192.168.1.0 !定义关联网络192.168.1.0验证测试:验证Router1 上的RIP V1 路由协议配置Router1#show ip routeCodes: C - connected, S - static, R - RIPO - OSPF, IA - OSPF inter areaE1 - OSPF
22、 external type 1, E2 - OSPF external type 2Gateway of last resort is not setC 192.168.1.0/24 is directly connected, Serial0172.16.0.0/24 is subnetted, 1 subnetsC 172.16.1.0 is directly connected, FastEthernet0第三步:在路由器Router2 上配置接口的IP 地址和串口上的时钟频率Router2(config)# interface fastethernet 0 !进入接口F0 的配置模式
23、Router2(config-if)# ip address 172.16.3.2 255.255.255.0 !配置路由器接口F0 的IP 地址Router2(config-if)# no shutdown !开启路由器fastethernet0 接口!Router2(config)# interface serial 0 !进入接口S0 配置模式Router2(config-if)# ip address 192.168.1.2 255.255.255.0 !配置路由器接口S0 的IP 地址Router2(config-if)# no shutdown !开启路由器serial 0 接口验
24、证测试:验证路由器接口的配置Router2#show ip interface briefInterface IP-Address OK? Method Status ProtocolFastEthernet0 172.16.3.2 YES manual up upFastEthernet1 unassigned YES unset administratively down downFastEthernet2 unassigned YES unset administratively down downFastEthernet3 unassigned YES unset administra
25、tively down downSerial0 192.168.1.2 YES manual up upSerial1 unassigned YES unset administratively down down第四步:在路由器Router2 上配置RIP V1 路由协议Router2(config)# router rip !创建RIP 路由进程Router2(config-router)#network 172.16.0.0 !定义关联网络(必须是直连的主类网络地址)Router2(config-router)#network 192.168.1.0验证测试:验证Router2 上的RI
26、P V1 路由信息Router2#show ip route !查看Router2 的路由表,结果显示没有到子网172.16.1.0 的路由Codes: C - connected, S - static, R - RIPO - OSPF, IA - OSPF inter areaE1 - OSPF external type 1, E2 - OSPF external type 2Gateway of last resort is not setC 192.168.1.0/24 is directly connected, Serial0172.16.0.0/24 is subnetted,
27、 1 subnetsC 172.16.3.0 is directly connected, FastEthernet0Router2#debug ip rip !查看Router2 的路由更新信息,结果显示没有收到子网172.16.1.0 的信息RIP protocol debugging is onRIP: sending v1 update to 255.255.255.255 via FastEthernet0 (172.16.3.2)network 192.168.1.0, metric 1RIP: sending v1 update to 255.255.255.255 via Se
28、rial0 (192.168.1.2)network 172.16.0.0, metric 5RIP: received v1 update from 192.168.1.1 on Serial0172.16.0.0 in 5 hopsRIP: sending v1 update to 255.255.255.255 via FastEthernet0 (172.16.3.2)network 192.168.1.0, metric 1RIP: sending v1 update to 255.255.255.255 via Serial0 (192.168.1.2)network 172.16
29、.0.0, metric 5RIP: received v1 update from 192.168.1.1 on Serial0172.16.0.0 in 5 hopsRouter2#undebug all ! 关闭调试功能第五步:测试网络的连通性C: ping 172.16.3.22 !从PC1 ping PC2 ,结果显示目的不可达(unreachable )第六步:分别在Router1 和Router2 上增加如下配置Router1(config)# interface serial 0Router1(config-if)# ip address 172.16.2.1 255.255.
30、255.0 secondary !配置路由器接口S0 的辅助IP 地址Router2(config)# interface serial 0Router2(config-if)# ip address 172.16.2.2 255.255.255.0 secondary !配置路由器接口S0 的辅助IP 地址验证测试:验证Router2 和Router1 上的RIP V1 路由表Router2#show ip routeCodes: C - connected, S - static, R - RIPD - EIGRP, EX - EIGRP external, O - OSPF, IA -
31、OSPF inter areaE1 - OSPF external type 1, E2 - OSPF external type 2Gateway of last resort is not set172.16.0.0/24 is subnetted, 3 subnetsR 172.16.1.0 120/1 via 172.16.2.1, 00:00:16, Serial0 !Router2 通过RIP 协议获得的路由C 172.16.2.0 is directly connected, Serial0C 192.168.1.0 is directly connected, Serial0C
32、 172.16.3.0 is directly connected, FastEthernet0Router1#sh ip routeCodes: C - connected, S - static, R - RIPO - OSPF, IA - OSPF inter areaE1 - OSPF external type 1, E2 - OSPF external type 2Gateway of last resort is not set172.16.0.0/24 is subnetted, 3 subnetsC 172.16.1.0 is directly connected, Fast
33、Ethernet0C 172.16.2.0 is directly connected, Serial0C 192.168.1.0 is directly connected, Serial0R 172.16.3.0 120/1 via 172.16.2.2, 00:00:08, Serial0 !Router1 通过RIP 协议获得的路由第七步:测试网络的连通性。C: ping 172.16.3.22 !从PC1 ping PC2C: ping 172.16.1.11 !从PC2 ping PC1结果显示网络是连通的【注意事项】1. RIP V1 是有类路由协议,在穿过主网络边界时进行自动汇
34、总,它本身不支持不连续子网间的路由信息的传递,解决办法有多种,这里采取增加secondary 地址以构成连续网络。当然也可以采用静态路由或无类路由协议并关闭自动汇总功能(如采用RIP V2 或OSPF 路由协议);2. 在网络规划时应尽量避免采用不连续子网。【参考配置】Router1#show running-config ! 显示路由器Router1 的全部配置Building configuration.Current configuration:! version 6.14(2)!hostname Router1!enable secret 5 $1$CT43$gMntVy1ViUeKqRfmWanw!ip subnet-zero!interface FastEthernet0ip address 172.16.1.1 255.255.255.0!interface Fast
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
评论
0/150
提交评论