实验目的:
在这个实验配置了两个VRRP组——vrrp 1和vrrp 2。在vrrp 1中,路由器R1为主虚拟路由器,R2为备用虚拟路由器;在vrrp 2中,路由器R1为备用虚拟路由器,路由器R1为主虚拟路由器。在两个路由器都正常工作的时候,PC1和PC2通过R1访问远端,PC3通过R2访问远端。
具体配置:
路由器R1的具体配置:
R1(config)#int f0/0
R1(config-if)#ip address 10.0.0.253 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#int s1/0
R1(config-if)#ip add 200.0.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#int f0/0
R1(config-if)#vrrp 1 ip 10.0.0.253
R1(config-if)#vrrp 1 priority 200
R1(config-if)#vrrp 1 preempt
R1(config-if)#vrrp 2 ip 10.0.0.254
R1(config-if)#vrrp 2 priority 100
R1(config-if)#vrrp 2 preempt
R1(config-if)#exit
R1(config)#router rip
R1(config)#ver 2
R1(config)#no auto-summary
R1(config)#network 10.0.0.0
R1(config)#network 200.0.1.0
路由器R2的配置:
R2#sh run
Building configuration...
Current configuration : 1019 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
memory-size iomem 5
no aaa new-model
ip subnet-zero
!
ip cef
!
no ftp-server write-enable
!
interface FastEthernet0/0
ip address 10.0.0.254 255.255.255.0
duplex auto
speed auto
vrrp 1 ip 10.0.0.253
vrrp 1 priority 150
vrrp 2 ip 10.0.0.254
vrrp 2 priority 200
!
interface Serial1/0
ip address 200.0.2.1 255.255.255.0
serial restart-delay 0
!
interface Serial1/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
router rip
version 2
network 10.0.0.0
network 200.0.2.0
no auto-summary
!
ip http server
ip classless
!
control-plane
!
line con 0
transport preferred all
transport output all
line aux 0
transport preferred all
transport output all
line vty 0 4
!
End
路由器R3的配置:
R3#sh run
Building configuration...
Current configuration : 965 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
memory-size iomem 5
no aaa new-model
ip subnet-zero
!
ip cef
!
no ftp-server write-enable
!
interface Serial0/0
ip address 200.0.1.2 255.255.255.0
serial restart-delay 0
!
interface Serial0/1
ip address 200.0.2.2 255.255.255.0
serial restart-delay 0
!
interface Serial0/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/3
no ip address
shutdown
serial restart-delay 0
!
interface FastEthernet1/0
ip address 200.0.0.254 255.255.255.0
duplex auto
speed auto
!
router rip
version 2
network 200.0.0.0
network 200.0.1.0
network 200.0.2.0
no auto-summary
!
ip http server
ip classless
!
control-plane
!
line con 0
transport preferred all
transport output all
line aux 0
transport preferred all
transport output all
line vty 0 4
!
End