The vrrp vrid virtual-ip command creates a VRRP group and assigns a virtual IP address to the group.
The undo vrrp vrid virtual-ip command deletes the virtual IP address of a VRRP group.
By default, no VRRP group is created.
vrrp vrid virtual-router-id virtual-ip virtual-address
undo vrrp vrid virtual-router-id [ virtual-ip virtual-address ]
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. |
virtual-ip virtual-address | Specifies the virtual IP address of a VRRP group. | The value is in dotted decimal notation. |
In practice, hosts use the default gateway to communicate with external networks. As value-added services such as IPTV or video conferencing services are widely deployed, hosts may fail to communicate with external networks if the default gateway fails. Configuring dynamic routing protocols such as RIP, OSPF, or ICMP can improve system reliability. However, it is difficult to configure dynamic routing protocols and some hosts may not support dynamic routing protocols. VRRP virtualizes multiple routing devices into a virtual router without changing the networking. The virtual router IP address is configured as the default gateway address.
If users on a network have the same reliability requirements, configure multiple virtual IP addresses for a VRRP group. By doing this, one virtual IP address serves one separate user group, and the default gateway address remains consistent regardless of changes in VRRP device locations. A VRRP group can be assigned a maximum of 16 virtual IP addresses.
PrecautionsThe MAC address of the VBDIF must differ from the virtual MAC address of the VRRP group. (The last two bits of the VRRP virtual MAC address are determined by the VRID. For example, The VRID of the virtual router composed of SwitchA and SwitchB is 3, so the MAC address of the VRRP group is 00-00-5E-00-01-03).
If all the virtual IP addresses in a VRRP group are deleted, the VRRP group is deleted automatically.
After the vrrp vrid virtual-ip command is run on an interface, when the ARP entries learned by the interface are aged, the device sends ARP aging probe packets with the source IP address being the interface's IP address. The virtual IP address of the interface is not used as the source IP address.
<HUAWEI> system-view [HUAWEI] interface vlanif 100 [HUAWEI-Vlanif100] vrrp vrid 1 virtual-ip 10.10.10.10
<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.10.10.10