殛空

导航

 

RIP路由选择基础实验

 

 

实验目的

使用RIP协议配置此拓扑,保证全网连通性。

初始配置

第一步 R1上根据拓扑进行初始配置

R1(config)#interface loopback 0

R1(config-if)#ip address 1.1.1.1 255.255.255.0

R1(config-if)#interface s1/2

R1(config-if)#ip address 10.1.1.1 255.255.255.0

R1(config-if)#no shutdown

R1(config-if)#interface s1/3

R1(config-if)#ip address 10.1.2.1 255.255.255.0

R1(config-if)#no shutdown

R1(config-if)#end

第二步 R2上根据拓扑进行初始配置。

R2(config)#interface s2/1

R2(config-if)#no shutdown

R2(config-if)#ip address 10.1.1.2 255.255.255.0

R2(config-if)#interface loopback 0

R2(config-if)#ip address 2.2.2.2 255.255.255.0

R2(config-if)#interface loopback 1

R2(config-if)#ip address 172.16.1.2 255.255.255.0

R2(config-if)#end

进行直连接口的ping测试

R2#ping 10.1.1.1

 

Type escape sequence to abort.

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

!!!!!

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

第三步 R3上根据拓扑进行初始配置

R3(config)#interface s3/1

R3(config-if)#no shutdown

R3(config-if)#ip address 10.1.2.3 255.255.255.0

R3(config-if)#interface loopback 0

R3(config-if)#ip address 3.3.3.3 255.255.255.0

R3(config-if)#interface loopback 1

R3(config-if)#ip address 192.168.1.3 255.255.255.0

R3(config-if)#end

R3#

进行直连接口的ping测试

R3#ping 10.1.2.1

 

Type escape sequence to abort.

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

!!!!!

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

 

实验过程

第一步 配置RIP协议

R1(config)#router rip

R1(config-router)#network 1.0.0.0

R1(config-router)#network 10.0.0.0

R1(config-router)#^Z

R1#

 

R2(config)#router rip

R2(config-router)#network 172.16.0.0

R2(config-router)#network 2.0.0.0

R2(config-router)#network 10.0.0.0

R2(config-router)#^Z

R2#

 

R3(config)#router rip

R3(config-router)#network 3.0.0.0

R3(config-router)#network 192.168.1.0

R3(config-router)#network 10.0.0.0

R3(config-router)#^Z

R3#

第二步 检查RIP协议的运行情况

R1#show ip protocols

Routing Protocol is "rip"

  Sending updates every 30 seconds, next due in 11 seconds

  Invalid after 180 seconds, hold down 180, flushed after 240

  Outgoing update filter list for all interfaces is

  Incoming update filter list for all interfaces is

  Redistributing: rip

  Default version control: send version 1, receive any version

    Interface        Send  Recv   Key-chain

    Serial1/2        1     1 2                   

    Serial1/3        1     1 2                    

    Loopback0        1     1 2                   

  Routing for Networks:

    1.0.0.0

    10.0.0.0

  Routing Information Sources:

    Gateway         Distance      Last Update

    10.1.1.2             120      00:00:23

    10.1.2.3             120      00:00:00

  Distance: (default is 120)

 

第三步 查看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

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       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, o - ODR

       T - traffic engineered route

 

Gateway of last resort is not set

 

     1.0.0.0/24 is subnetted, 1 subnets

C       1.1.1.0 is directly connected, Loopback0

R    2.0.0.0/8 [120/1] via 10.1.1.2, 00:00:13, Serial1/2

R    3.0.0.0/8 [120/1] via 10.1.2.3, 00:00:20, Serial1/3

R    172.16.0.0/16 [120/1] via 10.1.1.2, 00:00:13, Serial1/2

     10.0.0.0/24 is subnetted, 2 subnets

C       10.1.2.0 is directly connected, Serial1/3

C       10.1.1.0 is directly connected, Serial1/2

R    192.168.1.0/24 [120/1] via 10.1.2.3, 00:00:20, Serial1/3

 

第四步 R1上进行RIP调试

R1#debug ip rip

RIP protocol debugging is on

01:49:11: RIP: sending v1 update to 255.255.255.255 via Serial1/2 (10.1.1.1)

01:49:11:      subnet  10.1.2.0, metric 1

01:49:11:      network 1.0.0.0, metric 1

01:49:11:      network 3.0.0.0, metric 2

01:49:11:      network 192.168.1.0, metric 2

01:49:11: RIP: sending v1 update to 255.255.255.255 via Serial1/3 (10.1.2.1)

01:49:11:      subnet  10.1.1.0, metric 1

01:49:11:      network 1.0.0.0, metric 1

01:49:11:      network 2.0.0.0, metric 2

01:49:11:      network 172.16.0.0, metric 2

01:49:11: RIP: sending v1 update to 255.255.255.255 via Loopback0 (1.1.1.1)

01:49:11:      network 2.0.0.0, metric 2

01:49:11:      network 3.0.0.0, metric 2

01:49:11:      network 172.16.0.0, metric 2

01:49:11:      network 10.0.0.0, metric 1

01:49:11:      network 192.168.1.0, metric 2

R1#

01:49:13: RIP: received v1 update from 10.1.1.2 on Serial1/2

01:49:13:      2.0.0.0 in 1 hops

01:49:13:      172.16.0.0 in 1 hops

R1#

01:49:25: RIP: received v1 update from 10.1.2.3 on Serial1/3

01:49:25:      3.0.0.0 in 1 hops

01:49:25:      192.168.1.0 in 1 hops

R1#

 

第五步 查看R2上路由表和R3上路由表

R2上的路由表

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

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       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, o - ODR

       T - traffic engineered route

 

Gateway of last resort is not set

 

R    1.0.0.0/8 [120/1] via 10.1.1.1, 00:00:07, Serial2/1

     2.0.0.0/24 is subnetted, 1 subnets

C       2.2.2.0 is directly connected, Loopback0

R    3.0.0.0/8 [120/2] via 10.1.1.1, 00:00:07, Serial2/1

     172.16.0.0/24 is subnetted, 1 subnets

C       172.16.1.0 is directly connected, Loopback1

     10.0.0.0/24 is subnetted, 2 subnets

R       10.1.2.0 [120/1] via 10.1.1.1, 00:00:07, Serial2/1

C       10.1.1.0 is directly connected, Serial2/1

R    192.168.1.0/24 [120/2] via 10.1.1.1, 00:00:07, Serial2/1

 

R3上的路由表

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

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       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, o - ODR

       T - traffic engineered route

 

Gateway of last resort is not set

 

R    1.0.0.0/8 [120/1] via 10.1.2.1, 00:00:19, Serial3/1

R    2.0.0.0/8 [120/2] via 10.1.2.1, 00:00:19, Serial3/1

     3.0.0.0/24 is subnetted, 1 subnets

C       3.3.3.0 is directly connected, Loopback0

R    172.16.0.0/16 [120/2] via 10.1.2.1, 00:00:19, Serial3/1

     10.0.0.0/24 is subnetted, 2 subnets

C       10.1.2.0 is directly connected, Serial3/1

R       10.1.1.0 [120/1] via 10.1.2.1, 00:00:19, Serial3/1

C    192.168.1.0/24 is directly connected, Loopback1

 

第六步 假设R3上的192.168.1.0接口down

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

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       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, o - ODR

       T - traffic engineered route

 

Gateway of last resort is not set

 

     1.0.0.0/24 is subnetted, 1 subnets

C       1.1.1.0 is directly connected, Loopback0

R    2.0.0.0/8 [120/1] via 10.1.1.2, 00:00:17, Serial1/2

R    3.0.0.0/8 [120/1] via 10.1.2.3, 00:00:01, Serial1/3

R    172.16.0.0/16 [120/1] via 10.1.1.2, 00:00:17, Serial1/2

     10.0.0.0/24 is subnetted, 2 subnets

C       10.1.2.0 is directly connected, Serial1/3

C       10.1.1.0 is directly connected, Serial1/2

R    192.168.1.0/24 is possibly down, routing via 10.1.2.3, Serial1/3

192.168.1.0路由条目显示possibly down

R1上测试

R1#ping 192.168.1.3

 

Type escape sequence to abort.

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

U.U.U

Success rate is 0 percent (0/5)

R2上路由表

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

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       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, o - ODR

       T - traffic engineered route

 

Gateway of last resort is not set

 

R    1.0.0.0/8 [120/1] via 10.1.1.1, 00:00:25, Serial2/1

     2.0.0.0/24 is subnetted, 1 subnets

C       2.2.2.0 is directly connected, Loopback0

R    3.0.0.0/8 [120/2] via 10.1.1.1, 00:00:25, Serial2/1

     172.16.0.0/24 is subnetted, 1 subnets

C       172.16.1.0 is directly connected, Loopback1

     10.0.0.0/24 is subnetted, 2 subnets

R       10.1.2.0 [120/1] via 10.1.1.1, 00:00:25, Serial2/1

C       10.1.1.0 is directly connected, Serial2/1

R    192.168.1.0/24 is possibly down, routing via 10.1.1.1, Serial2/1

 

R3上路由表

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

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       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, o - ODR

       T - traffic engineered route

 

Gateway of last resort is not set

 

R    1.0.0.0/8 [120/1] via 10.1.2.1, 00:00:26, Serial3/1

R    2.0.0.0/8 [120/2] via 10.1.2.1, 00:00:26, Serial3/1

     3.0.0.0/24 is subnetted, 1 subnets

C       3.3.3.0 is directly connected, Loopback0

R    172.16.0.0/16 [120/2] via 10.1.2.1, 00:00:26, Serial3/1

     10.0.0.0/24 is subnetted, 2 subnets

C       10.1.2.0 is directly connected, Serial3/1

R       10.1.1.0 [120/1] via 10.1.2.1, 00:00:26, Serial3/1

posted on 2011-10-24 10:26  殛空  阅读(262)  评论(0)    收藏  举报