142
VRID : 1 Adver Timer : 1
Admin Status : Up State : Master
Config Pri : 110 Running Pri : 110
Preempt Mode : Yes Delay Time : 5
Auth Type : None
Virtual IP : 202.38.160.111
Virtual MAC : 0000-5e00-0101
Master IP : 202.38.160.1
The output shows that after Switch A resumes normal operation, it becomes the master, and packets sent
from host A to host B are forwarded by Switch A.
VRRP interface tracking configuration example
Network requirements
•
Host A wants to access Host B on the Internet, using 202.38.160.111/24 as its default gateway.
•
Switch A and Switch B belong to VRRP group 1 with the virtual IP address of 202.38.160.111/24.
•
If Switch A operates normally, packets sent from Host A to Host B are forwarded by Switch A. If
VLAN-interface 3 through which Switch A connects to the Internet is not available, packets sent from
Host A to Host B are forwarded by Switch B.
•
To prevent attacks to the VRRP group by illegal users who use spoofed packets, configure the
authentication mode as plain text to authenticate the VRRP packets in VRRP group 1, and specify the
authentication key as
hello
.
Figure 40
Network diagram for VRRP interface tracking
Host A
Switch A
Switch B
Virtual IP address:
202.38.160.111/24
Vlan-int2
202.38.160.1/24
Vlan-int2
202.38.160.2/24
Host B
202.38.160.3/24
203.2.3.1/24
Vlan-int3
Internet
Configuration procedure
1.
Configure Switch A
# Configure VLAN 2.
<SwitchA> system-view
[SwitchA] vlan 2
[SwitchA-vlan2] port gigabitethernet 1/0/5
[SwitchA-vlan2] quit
[SwitchA] interface vlan-interface 2