!
hostname ripd
password zebra
log stdout
!
interface lo
!
interface eth0
!
interface eth1
!
interface eth2
!
interface dummy0
!
router rip
network 2.2.2.0/24
network 192.168.0.0/16
passive-interface eth0
!
line vty
!
End
----------------------------------------------------
R3:
配置文件如下:
ripd# show running-config
Current configuration:
!
hostname ripd
password zebra
log stdout
!
interface lo
!
interface eth0
!
interface eth1
!
interface eth2
!
interface dummy0
!
router rip
network 4.4.4.0/24
network 192.168.0.0/16
passive-interface eth0
!
line vty
!
End
---------------------------------------------------------
由于RIP的收敛时间大概需要3mins左右,所以过3mins 查看各个运行状态如下:
R1:
ripd# show ip rip
Codes: R - RIP, C - connected, O - OSPF, B - BGP
(n) - normal, (s) - static, (d) - default, (r) - redistribute,
(i) - interface
Network Next Hop Metric From Time
R(n) 2.2.2.0/24 192.168.101.1 2 192.168.101.1 02:52
C(i) 3.3.3.0/24 0.0.0.0 1 self
R(n) 4.4.4.0/24 192.168.102.2 2 192.168.102.2 02:41
R(n) 192.168.100.0/30 192.168.101.1 2 192.168.101.1 02:52
C(i) 192.168.101.0/30 0.0.0.0 1 self
C(i) 192.168.102.0/30 0.0.0.0 1 self
路由表:
bash-2.05# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.100.0 192.168.101.1 255.255.255.252 UG 2 0 0 eth1
192.168.101.0 0.0.0.0 255.255.255.252 U 0 0 0 eth1
192.168.102.0 0.0.0.0 255.255.255.252 U 0 0 0 eth2
10.0.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
2.2.2.0 192.168.101.1 255.255.255.0 UG 2 0 0 eth1
3.3.3.0 0.0.0.0 255.255.255.0 U 0 0 0 eth3
4.4.4.0 192.168.102.2 255.255.255.0 UG 2 0 0 eth2
10.100.100.0 0.0.0.0 255.255.254.0 U 0 0 0 tap0
0.0.0.0 10.0.1.163 0.0.0.0 UG 0 0 0 eth0
-----------------------------------------------------------------------------------------------------------
R2:
ripd# show ip rip
Codes: R - RIP, C - connected, O - OSPF, B - BGP
(n) - normal, (s) - static, (d) - default, (r) - redistribute,