您好,欢迎来到江浙沪招生考试网 !

设为首页|加入收藏|联系我们|网站地图|

江浙沪招生考试网

您现在的位置: test4exam >> 计算机考试 >> CISCO认证 >> 正文

RIP动态路由的配置

日期:2009/10/6 13:32:16 来源:本站原创 访问量:

实验介绍:

本实验所用的设备为:三台带有2S0口和一个E0口的路由器,三台PC

 

实验目的:

灵活掌握RIP的动态路由的配置。

实验步骤:

1.         R1上的配置:

Router>

Router>en

Router#conf t

Router(config)#host r1

r1(config)#int e0

r1(config-if)#ip add 172.16.1.1 255.255.255.0

r1(config-if)#no shutdown

r1(config-if)#exit

r1(config)#int s0

r1(config-if)#ip add 172.16.2.1 255.255.255.0

r1(config-if)#no shutdown

r1(config-if)#clock rate 56000

r1(config-if)#no shutdown

r1(config-if)#exit

r1(config)#router rip

r1(config-router)#net 172.16.0.0

r1(config-router)#^Z

RIP协议启用前的路由表

r1#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default

       U - per-user static route

Gateway of last resort is not set

C      172.16.1.0/24 is directly connected, Ethernet0

C      172.16.2.0/24 is directly connected, Serial0

RIP协议启用后的路由表

r1#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default

       U - per-user static route

Gateway of last resort is not set

C      172.16.1.0/24 is directly connected, Ethernet0

C      172.16.2.0/24 is directly connected, Serial0

R      172.16.3.0/24 [120/1] via 172.16.2.2, 00:01:37, Serial0

R      172.16.4.0/24 [120/1] via 172.16.2.2, 00:07:21, Serial0

R      172.16.5.0/24 [120/2] via 172.16.2.2, 00:05:21, Serial0

 

2.         R2上的配置:

Router>

Router>en

Router#conf t

Router(config)#host r2

r2(config)#int s1

r2(config-if)#ip add 172.16.2.2 255.255.255.0

r2(config-if)#no shutdown

r2(config-if)#exit

r2(config)#int s0

r2(config-if)#ip add 172.16.4.0 255.255.255.0

r2(config-if)#ip add 172.16.4.1 255.255.255.0

r2(config-if)#clock rate 56000

r2(config-if)#no shutdown

r2(config-if)#exit

r2(config)#int e0

r2(config-if)#ip add 172.16.3.1 255.255.255.0

r2(config-if)#no shutdown

r2(config-if)#exit

r2(config)#router rip

r2(config-router)#net 172.16.0.0

r2(config-router)#^Z

r2#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default

       U - per-user static route

Gateway of last resort is not set

C      172.16.2.0/24 is directly connected, Serial1

C      172.16.3.0/24 is directly connected, Ethernet0

C      172.16.4.0/24 is directly connected, Serial0

R      172.16.1.0/24 [120/1] via 172.16.2.1, 00:09:13, Serial1

R      172.16.5.0/24 [120/1] via 172.16.4.2, 00:09:13, Serial0

 

3.         R3上的配置:

Router>

Router>en

Router#conf t

Router(config)#int s1

Router(config-if)#ip add 172.16.4.2 255.255.255.0

Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#int e0

Router(config-if)#ip add 172.16.5.1 255.255.255.0

Router(config-if)#no shutdown

Router(config-if)#exit

Router(config)#host r3

r3(config)#

r3(config)#router rip

r3(config-router)#net 172.16.0.0

r3(config-router)#^Z

r3#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default

       U - per-user static route

Gateway of last resort is not set

C      172.16.4.0/24 is directly connected, Serial1

C      172.16.5.0/24 is directly connected, Ethernet0

R      172.16.1.0/24 [120/1] via 172.16.4.1, 00:05:32, Serial1

R      172.16.2.0/24 [120/1] via 172.16.4.1, 00:08:19, Serial1

R      172.16.3.0/24 [120/1] via 172.16.4.1, 00:05:32, Serial1

 

4.         测试:

r1#

r1#ping

Protocol [ip]:

Target IP address: 172.16.5.2

Repeat count [5]:

Datagram size [100]:

Timeout in seconds [2]:

Extended commands [n]:

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 172.16.5.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms

PC 上的配置为:

PC1IP172.16.1.2 网关:172.16.1.1

PC2IP172.16.3.2 网关:172.16.3.1

PC3IP172.16.5.2 网关:172.16.5.1

相关阅读

Copyright ©2013-2015 江浙沪招生考试网 All Rights Reserved.
地址: 苏州市姑苏区阊胥路483号(工投创业园)  电话:0512-85551931 邮编: 214000
邮箱: [email protected] 版权所有:苏州迈峰教育科技有限公司 苏ICP备15050684号-2