Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3960552
  • 博文数量: 408
  • 博客积分: 10227
  • 博客等级: 上将
  • 技术积分: 9820
  • 用 户 组: 普通用户
  • 注册时间: 2009-04-17 21:48
个人简介

非淡泊无以明志,非宁静无以致远

文章存档

2022年(1)

2021年(1)

2020年(2)

2019年(5)

2018年(4)

2017年(3)

2016年(24)

2015年(8)

2014年(7)

2013年(3)

2012年(1)

2011年(23)

2010年(179)

2009年(147)

分类: 系统运维

2009-10-25 22:41:06

实验五:RIP动态路由的配置

实验介绍:

本实验所用的设备为:三台带有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

 

阅读(2343) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~