目的:为了使pc有良好的上网环境,我们给pc配置了网关冗余,R1和R3有一个挂掉时,不影响它们。

第一步:配置各个路由器使全网互通
第二步:配置R1和R3
R1上的配置

track 100 interface FastEthernet0/0 line-protocol
interface FastEthernet0/1
ip address 192.168.1.1 255.255.255.0
no ip redirects
no ip proxy-arp
duplex auto
speed auto
glbp 1 ip 192.168.1.253
glbp 1 priority 105
glbp 1 preempt
glbp 1 weighting track 100 //GLBP的track和vrrp有些不同
glbp 2 ip 192.168.1.254
glbp 2 preempt











R3上的配置

track 100 interface FastEthernet0/0 line-protocol
interface FastEthernet0/1
ip address 192.168.1.3 255.255.255.0
no ip redirects
no ip proxy-arp
duplex auto
speed auto
glbp 1 ip 192.168.1.253
glbp 1 preempt
glbp 2 ip 192.168.1.254
glbp 2 priority 105
glbp 2 preempt
glbp 2 weighting track 100











第二步:测试

  1. 先测试R1

R1上出现的情况:
R1(config)#int f0/1
R1(config-if)#sh
May 3 11:15:37.491: %GLBP-6-FWDSTATECHANGE: FastEthernet0/1 Grp 1 Fwd 1 state Active -> Init
May 3 11:15:37.495: %GLBP-6-STATECHANGE: FastEthernet0/1 Grp 1 state Active -> Init
*May 3 11:15:37.495: %GLBP-6-FWDSTATECHANGE: FastEthernet0/1 Grp 2 Fwd 1 state Active -> Init
//组1和2同时进入了初始化状态




R1(config-if)#no sh
*May 3 11:15:59.327: %GLBP-6-STATECHANGE: FastEthernet0/1 Grp 1 state Speak -> Active
R1(config-if)#int f0/0
R1(config-if)#sh


R1(config-if)#no sh

*May 3 11:16:29.335: %GLBP-6-FWDSTATECHANGE: FastEthernet0/1 Grp 2 Fwd 1 state Listen -> Active

R3上出现的情况
*May 3 11:15:47.179: %GLBP-6-FWDSTATECHANGE: FastEthernet0/1 Grp 2 Fwd 1 state Listen -> Active

*May 3 11:15:47.243: %GLBP-6-FWDSTATECHANGE: FastEthernet0/1 Grp 1 Fwd 1 state Listen -> Active
//当R1的接口挂掉时,R3成为了组1和组2的active路由器

Pc4上出现的情况:
pc4#ping 2.2.2.2 re 33333333

Type escape sequence to abort.
Sending 33333333, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.....!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.!.!.!.!.!.!.!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.
Success rate is 97 percent (600/615), round-trip min/avg/max = 20/70/344 ms










  1. 在测试R3
    R3上出现的情况
    R3(config)#int f0/1
    R3(config-if)#sh
    May 3 11:23:38.711: %GLBP-6-FWDSTATECHANGE: FastEthernet0/1 Grp 1 Fwd 2 state Active -> Init
    May 3 11:23:38.711: %GLBP-6-FWDSTATECHANGE: FastEthernet0/1 Grp 2 Fwd 2 state Active -> Init
    *May 3 11:23:38.715: %GLBP-6-STATECHANGE: FastEthernet0/1 Grp 2 state Active -> Init




R3(config-if)#no sh
*May 3 11:24:00.263: %GLBP-6-STATECHANGE: FastEthernet0/1 Grp 2 state Speak -> Active

R3(config-if)#int f0/0
R3(config-if)#sh
R3(config-if)#no sh
*May 3 11:24:29.323: %GLBP-6-FWDSTATECHANGE: FastEthernet0/1 Grp 1 Fwd 2 state Listen -> Active
R1上出现的情况



*May 3 11:23:46.407: %GLBP-6-FWDSTATECHANGE: FastEthernet0/1 Grp 1 Fwd 2 state Listen -> Active

May 3 11:23:48.299: %GLBP-6-STATECHANGE: FastEthernet0/1 Grp 2 state Standby -> Active
May 3 11:23:48.299: %GLBP-6-FWDSTATECHANGE: FastEthernet0/1 Grp 2 Fwd 2 state Listen -> Active
*May 3 11:24:00.391: %GLBP-6-STATECHANGE: FastEthernet0/1 Grp 2 state Active -> Speak

May 3 11:24:28.503: %GLBP-6-FWDSTATECHANGE: FastEthernet0/1 Grp 2 Fwd 2 state Active -> Listen
May 3 11:24:29.439: %GLBP-6-FWDSTATECHANGE: FastEthernet0/1 Grp 1 Fwd 2 state Active -> Listen
Pc5上出现的情况
pc5#ping 2.2.2.2 re 22222222

Type escape sequence to abort.
Sending 22222222, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!...
..!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.!.!.!.!.!.!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.
Success rate is 97 percent (579/593), round-trip min/avg/max = 24/67/1080 ms










Over
敬请期待以下文档


04-12 23:56