The vrrp vrid timer advertise command sets the interval at which the master sends VRRP Advertisement packets.
The undo vrrp vrid timer advertise command restores the default interval at which the master sends VRRP Advertisement packets.
By default, the master sends VRRP Advertisement packets every 1 second.
vrrp vrid virtual-router-id timer advertise advertise-interval
undo vrrp vrid virtual-router-id timer advertise
Parameter | Description | Value |
---|---|---|
vrid virtual-router-id | Specifies the VRID of a VRRP group. | The value is an integer that ranges from 1 to 255. |
advertise advertise-interval | Specifies the interval at which the master sends VRRP Advertisement packets. | The value is an integer, in seconds. In VRRPv2, the value ranges from 1 to 255. In VRRPv3, the value ranges from 1 to 40. |
The master in a VRRP group sends VRRP Advertisement packets to backups at intervals to notify that it is working properly. If the backup with the highest priority does not receive any VRRP Advertisement packets from the master at the specified interval, it considers the master faulty and becomes the master. The vrrp vrid timer advertise command sets the interval at which the master sends VRRP Advertisement packets.
PrerequisitesThe vrrp vrid virtual-ip command has been executed on an interface to create a VRRP group.
PrecautionsIf a longer interval is used, backups in the same VRRP group cannot detect the fault on the master in a timely manner, causing packet loss. If a shorter interval is used, system resources are occupied. In addition, when network traffic is heavy or the network is unstable, backups may not receive packets after the Master_Down_Interval timer expires. As a result, the VRRP group status is incorrectly switched. Set the interval based on actual networking. The algorithm for calculating the value of the Master_Down_Interval timer is as follows:
Master_Down_Interval = (3 x Advertisement_Interval) + Skew_time
Skew_Time = (256 – Priority) / 256
When the interval for sending VRRP Advertisement packets on the master and backup in the same VRRP group is different, the master sends VRRP Advertisement packets at the configured interval.
<HUAWEI> system-view [HUAWEI] interface vlanif 100 [HUAWEI-Vlanif100] vrrp vrid 1 virtual-ip 10.1.1.2 [HUAWEI-Vlanif100] vrrp vrid 1 timer advertise 5
<HUAWEI> system-view [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] undo portswitch [HUAWEI-GigabitEthernet0/0/1] vrrp vrid 1 virtual-ip 10.1.1.2 [HUAWEI-GigabitEthernet0/0/1] vrrp vrid 1 timer advertise 5