RIPIGRP

实验拓扑:

wKiom1RN0o-h6qRaAAIsC2uAlqY217.jpg

实验环境:

本次实验环境使用的是DynamipsGUI模拟软件进行的实验,实验拓扑中的路由器型号为思科c3620系列,路由器之间使用广域网线进行连接

实验配置:

R1配置:

R1(config)#int f0/0

R1(config-if)#ip add 192.168.1.1 255.255.255.0

R1(config-if)#no shutdown

R1(config)#int s1/0

R1(config-if)#ip add 192.168.4.1 255.255.255.0

R1(config-if)#no shutdown

R1(config-if)#int s1/1                        

R1(config-if)#ip add 192.168.5.1 255.255.255.0

R1(config-if)#no shutdown



R1#show ip route 


Gateway of last resort is not set


C    192.168.4.0/24 is directly connected, Serial1/0

C    192.168.5.0/24 is directly connected, Serial1/1

C    192.168.1.0/24 is directly connected, FastEthernet0/0

再配置rip

R1(config)#router rip 

R1(config-router)#version 2

R1(config-router)#network 192.168.1.0 

R1(config-router)#network 192.168.4.0 

R1(config-router)#network 192.168.5.0

R1(config)#router igrp 100

R1(config-router)#network 192.168.1.0

R1(config-router)#network 192.168.4.0

R1(config-router)#network 192.168.5.0

 

R2配置

R2(config)#int f0/0

R2(config-if)#ip add 192.168.2.1 255.255.255.0

R2(config-if)#no shu

R2(config-if)#no shutdown

R2(config-if)#int s1/0                        

R2(config-if)#ip add 192.168.4.2 255.255.255.0

R2(config-if)#no shutdown   

 

R2#sh ip route 

 

Gateway of last resort is not set

 

C    192.168.4.0/24 is directly connected, Serial1/0

C    192.168.2.0/24 is directly connected, FastEthernet0/0

 

 

R2(config)#router rip 

R2(config-router)#network 192.168.2.0

R2(config-router)#network 192.168.4.0


R3配置

R3(config)#int f0/0

R3(config-if)#ip add 192.168.3.1 255.255.255.0

R3(config-if)#no sh

R3(config-if)#no shutdown

 

R3(config-if)#int s1/1                        

R3(config-if)#ip add 192.168.5.2 255.255.255.0

R3(config-if)#no shutdown          

 

R3#sh ip route 

 

Gateway of last resort is not set

 

C    192.168.5.0/24 is directly connected, Serial1/1

C    192.168.3.0/24 is directly connected, FastEthernet0/0

 

 

 

R3(config)#router igrp 100

R3(config-router)#net

R3(config-router)#network 192.168.3.0

R3(config-router)#network 192.168.5.0

 

 

R3#sh ip route 

 

Gateway of last resort is not set

 

I    192.168.4.0/24 [100/10476] via 192.168.5.1, 00:00:14, Serial1/1

C    192.168.5.0/24 is directly connected, Serial1/1

I    192.168.1.0/24 [100/8486] via 192.168.5.1, 00:00:14, Serial1/1

C    192.168.3.0/24 is directly connected, FastEthernet0/0

 

 

R2#sh ip route 

 

Gateway of last resort is not set

 

C    192.168.4.0/24 is directly connected, Serial1/0

R    192.168.5.0/24 [120/1] via 192.168.4.1, 00:00:14, Serial1/0

R    192.168.1.0/24 [120/1] via 192.168.4.1, 00:00:14, Serial1/0

C    192.168.2.0/24 is directly connected, FastEthernet0/0

R1#sh ip route 

 

Gateway of last resort is not set

 

C    192.168.4.0/24 is directly connected, Serial1/0

C    192.168.5.0/24 is directly connected, Serial1/1

C    192.168.1.0/24 is directly connected, FastEthernet0/0

R    192.168.2.0/24 [120/1] via 192.168.4.2, 00:00:00, Serial1/0

I    192.168.3.0/24 [100/8486] via 192.168.5.2, 00:00:58, Serial1/1

 

发现R2R3 没有发现对方的路由信息,这主要是因为ripigrp是两种不同的协议,要想让他们学习到彼此之间的路由,就得使用重分布命令将ripigrp的路由重分布到彼此的路由协议中

R1中进入rip路由配置模式中使用命令redistribute igrp 101 metric 2igrp协议重分布进rip中并设置度量值为2

进入igrp的路由配置模式使用命令redistribute rip metric 2000   rip协议重分布进igrp中并设置度量值为2000

 

R1(config)#router rip

R1(config-router)#redistribute igrp 100 metric 2

R1(config)#router igrp 100

R1(config-router)#redistribute rip metric 2000 

 

再看R2R3的路由表

R2#sh ip route 

Gateway of last resort is not set

 

C    192.168.4.0/24 is directly connected, Serial1/0

R    192.168.5.0/24 [120/1] via 192.168.4.1, 00:00:05, Serial1/0

R    192.168.1.0/24 [120/1] via 192.168.4.1, 00:00:05, Serial1/0

C    192.168.2.0/24 is directly connected, FastEthernet0/0

R    192.168.3.0/24 [120/2] via 192.168.4.1, 00:00:05, Serial1/0

 

R3#sh ip route 

Gateway of last resort is not set

 

I    192.168.4.0/24 [100/10476] via 192.168.5.1, 00:01:04, Serial1/1

C    192.168.5.0/24 is directly connected, Serial1/1

I    192.168.1.0/24 [100/8486] via 192.168.5.1, 00:01:04, Serial1/1

I    192.168.2.0/24 [100/8576] via 192.168.5.1, 00:01:04, Serial1/1

C    192.168.3.0/24 is directly connected, FastEthernet0/0

可以看到R2R3已经有了对方的网段的路由信息

实验测试:

R3#ping 

Protocol [ip]: 

Target IP address: 192.168.2.1

Source address or interface: 192.168.3.1

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

Packet sent with a source address of 192.168.3.1 

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 8/24/52 ms