一、实验拓扑: 二、实验要求: 1、验证:MAC地址:中间是0001代表VRRP的组号,最后是IP地址最后转换为16进制的? 2、上行链路检测? 三、命令部署: R2(config)#int f1/0 R2(config-if)#vrrp 1 ip 192.168.10.254 R2(config-if)#vrrp 1 priority 200 R2(config-if)#vrrp 1 preempt //VRRP默认就开启抢占了 R2(config-if)#vrrp 1 track 1 decrement 150 R2(config)#track 1 int f0/0 line-protocol //注意:在全局模式下配置的
R3(config)#int f1/0 R3(config-if)#vrrp 1 ip 192.168.10.254 R3(config-if)#vrrp 1 priority 100 R3(config-if)#vrrp 1 preempt //默认已经开启了抢占 R3(config-if)#vrrp 1 track 1 decrement 150 R3(config)#track 1 int f1/0 line-protocol 四、验证: 1、刚部署R2时候提示信息: *Mar 1 00:03:21.459: %VRRP-6-STATECHANGE: Fa1/0 Grp 1 state Init -> Backup R2(config-if)# *Mar 1 00:03:25.071: %VRRP-6-STATECHANGE: Fa1/0 Grp 1 state Backup -> Master
2、接着部署R3时候提示信息: R3# *Mar 1 00:28:58.851: %VRRP-6-STATECHANGE: Fa1/0 Grp 1 state Backup -> Master *Mar 1 00:28:59.019: %VRRP-6-STATECHANGE: Fa1/0 Grp 1 state Master -> Backup
3、PC ping 4.4.4.4后,查看ARP: R2#show arp Protocol Address Age (min) Hardware Addr Type Interface Internet 12.1.1.1 30 cc01.4b78.0000 ARPA FastEthernet0/0 Internet 12.1.1.2 - cc02.5c80.0000 ARPA FastEthernet0/0 Internet 23.1.1.2 - cc02.5c80.0020 ARPA FastEthernet2/0 Internet 192.168.10.1 0 0050.7966.6800 ARPA FastEthernet1/0 Internet 192.168.10.254 - 0000.5e00.0101 ARPA FastEthernet1/0 Internet 192.168.10.252 29 cc03.5d60.0010 ARPA FastEthernet1/0 Internet 192.168.10.253 - cc02.5c80.0010 ARPA FastEthernet1/0 结论:0000.5e00.0101:0000.5e是一样的, 00.01代表VRRP的协议,01代表VRRP的组号1
4、断掉R2的f0/0口: PC-1> ping 1.1.1.1 -c 20000 84 bytes from 1.1.1.1 icmp_seq=20 ttl=254 time=31.947 ms Redirect Network, gateway 192.168.10.254 -> 192.168.10.252 1.1.1.1 icmp_seq=1 timeout 1.1.1.1 icmp_seq=2 timeout 1.1.1.1 icmp_seq=3 timeout 1.1.1.1 icmp_seq=4 timeout 1.1.1.1 icmp_seq=5 timeout 1.1.1.1 icmp_seq=6 timeout 84 bytes from 1.1.1.1 icmp_seq=7 ttl=254 time=29.920 ms