实验目的:
1、掌握RIPv2的基本配置。
2、掌握RIPv2的无类特性。
实验拓扑:
实验步骤:
1、依据图中拓扑配置各设备的IP地址,并保证直连连通性;
在R1上做如下配置:
R1(config)#int f0/0 R1(config-if)#no shutdown R1(config-if)#ip address 12.1.1.1 255.255.255.0 R1(config-if)#exit R1(config)#int f1/0 R1(config-if)#no shutdown R1(config-if)#ip address 13.1.1.1 255.255.255.0 R1(config-if)#exit R1(config)#int loopback 1 R1(config-if)#ip address 1.1.1.1 255.255.255.255 R1(config-if)#exit
在R2上做如下配置:
R2(config)#int f0/0 R2(config-if)#no shutdown R2(config-if)#ip address 12.1.1.2 255.255.255.0 R2(config-if)#exit R2(config)#int f1/0 R2(config-if)#no shutdown R2(config-if)#ip address 23.1.1.2 255.255.255.0 R2(config-if)#exit R2(config)#int loopback 1 R2(config-if)#ip address 2.2.2.2 255.255.255.255 R2(config-if)#exit
在R3上做如下配置:
R3(config)#int f0/0 R3(config-if)#no shutdown R3(config-if)#ip address 13.1.1.3 255.255.255.0 R3(config-if)#exit R3(config-if)#int f1/0 R3(config-if)#no shutdown R3(config-if)#ip address 23.1.1.3 255.255.255.0 R3(config-if)#exit R3(config)#int loopback 1 R3(config-if)#ip address 3.3.3.3 255.255.255.255 R3(config-if)#exit
在其中一台路由器上进行连通性测试:
R1#ping 12.1.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.1.1.2, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 20/34/48 ms
R1#ping 13.1.1.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 13.1.1.3, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 16/31/48 ms
此时说明直连连接没有问题。
2.在每台路由器开始进行RIPv2的配置,R1的配置如下:
R1(config)#router rip R1(config-router)#version 2 R1(config-router)#no auto-summary R1(config-router)#network 12.0.0.0 R1(config-router)#network 13.0.0.0 R1(config-router)#network 1.0.0.0 R1(config-router)#exit
R2的配置如下:
R2(config)#router rip R2(config-router)#version 2 R2(config-router)#no auto-summary R2(config-router)#network 12.0.0.0 R2(config-router)#network 23.0.0.0 R2(config-router)#network 2.0.0.0 R2(config-router)#exit
R3的配置如下:
R3(config)#router rip R3(config-router)#version 2 R3(config-router)#no auto-summary R3(config-router)#network 13.0.0.0 R3(config-router)#network 23.0.0.0 R3(config-router)#network 3.0.0.0 R3(config-router)#exi
3.在任意一台路由器上查看路由表并进行测试:
在R1上查看路由表:
R1#show ip route rip 2.0.0.0/32 is subnetted, 1 subnets R 2.2.2.2 [120/1] via 12.1.1.2, 00:00:04, FastEthernet0/0 3.0.0.0/32 is subnetted, 1 subnets R 3.3.3.3 [120/1] via 13.1.1.3, 00:00:12, FastEthernet1/0 23.0.0.0/24 is subnetted, 1 subnets R 23.1.1.0 [120/1] via 13.1.1.3, 00:00:12, FastEthernet1/0 [120/1] via 12.1.1.2, 00:00:04, FastEthernet0/0
可以看到R1从R2和R3学习到的RIPv2路由,此时进行连通性测试,如下:
R1#ping 2.2.2.2 source 1.1.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds: Packet sent with a source address of 1.1.1.1 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 20/24/44 ms R1#ping 3.3.3.3 source 1.1.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds: Packet sent with a source address of 1.1.1.1 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 16/24/40 ms
此时R1上测试成功,同样方法可以在R2和R3上测试成功,表明通过RIPv2使得三台路由器的环回网段都相互连通,此实验完成。
- 还没有人评论,欢迎说说您的想法!