vrrp vrid
Use vrrp vrid to create an IPv4 VRRP group and assign a virtual IP address to the IPv4 VRRP group or to assign a virtual IP address to an existing IPv4 VRRP group.
Use undo vrrp vrid to remove all configurations of an existing IPv4 VRRP group or to remove a virtual IP address from an existing IPv4 VRRP group.
Syntax
vrrp vrid virtual-router-id virtual-ip virtual-address
undo vrrp vrid virtual-router-id [ virtual-ip [ virtual-address ] ]
Default
No IPv4 VRRP group is created.
Views
Interface view
Predefined user roles
network-admin
Parameters
virtual-router-id: Specifies an IPv4 VRRP group by its virtual router ID in the range of 1 to 255.
virtual-ip virtual-address: Specifies a virtual IP address, which cannot be an all-zero address (0.0.0.0); a broadcast address (255.255.255.255); a loopback address; an IP address of other than Class A, Class B, and Class C; or an invalid IP address (for example, 0.0.0.1). If you do not specify this option, the undo vrrp vrid command removes all virtual IP addresses from the existing IPv4 VRRP group.
Usage guidelines
You can assign up to 16 virtual IP addresses to an IPv4 VRRP group.
If you create an IPv4 VRRP group but do not assign any virtual IP address to it, the VRRP group stays in inactive state and does not function.
The virtual IP address of an IPv4 VRRP group and the downlink interface IP address of the VRRP group must be in the same subnet. Otherwise, the hosts in the subnet might fail to access external networks.
In load balancing mode, the virtual IP address of an IPv4 VRRP group cannot be the same as the IP address of any interface in the VRRP group. Otherwise, the load balancing mode cannot operate.
Examples
# Create IPv4 VRRP group 1 and assign virtual IP address 10.10.10.10 to the VRRP group. Then assign virtual IP address 10.10.10.11 to the VRRP group.
<Sysname> system-view [Sysname] interface vlan-interface 2 [Sysname-Vlan-interface2] vrrp vrid 1 virtual-ip 10.10.10.10 [Sysname-Vlan-interface2] vrrp vrid 1 virtual-ip 10.10.10.11
Related commands
display vrrp