beautypg.com

Vrrp interface tracking configuration example, Network requirements, Configuration procedure – H3C Technologies H3C SecPath F1000-E User Manual

Page 28

background image

27

VRRP Interface Tracking Configuration Example

Network requirements

Host A needs to access Host B on the Internet, using 202.38.160.111/24 as its default gateway.

Device A and Device B belong to VRRP group 1 with the virtual IP address of 202.38.160.111/24.

If Device A operates normally, packets sent from Host A to Host B are forwarded by Device A; if
interface GigabitEthernet 0/1 through which Device A connects to the internet is not available,

packets sent from Host A to Host B are forwarded by Device B.

Figure 11 Network diagram for interface tracking in VRRP

Host A

Device A

Device B

Virtual IP address:

202.38.160.111/24

GE0/1

202.38.160.1/24

GE0/1

202.38.160.2/24

Host B

202.38.160.3/24

203.2.3.1/24

Internet

Configuration procedure

Step1

Configure Device A

system-view

[DeviceA] interface gigabitethernet 0/2

[DeviceA-GigabitEthernet0/2] ip address 202.38.160.1 255.255.255.0

# Create VRRP group 1 and configure its virtual IP address as 202.38.160.111.

[DeviceA-GigabitEthernet0/2] vrrp vrid 1 virtual-ip 202.38.160.111

# Set the priority of Device A in the VRRP group to 110.

[DeviceA-GigabitEthernet0/2] vrrp vrid 1 priority 110

# Configure the authentication mode of the VRRP group as simple and authentication key as hello.

[DeviceA-GigabitEthernet0/2] vrrp vrid 1 authentication-mode simple hello

# Configure the master to send VRRP packets every five seconds.

[DeviceA-GigabitEthernet0/2] vrrp vrid 1 timer advertise 5

# Set Device A to work in preemptive mode. The preemption delay is five seconds.

[DeviceA-GigabitEthernet0/2] vrrp vrid 1 preempt-mode timer delay 5

# Set the interface to be tracked.

[DeviceA-GigabitEthernet0/2] vrrp vrid 1 track interface gigabitethernet 0/1 reduced 30

Step2

Configure Device B

system-view

[DeviceB] interface gigabitethernet 0/2