vrrp vrid
Use vrrp vrid to create an IPv4 VRRP group and assign a virtual IP address to the IPv4 VRRP group or 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
mdc-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 this argument is not specified, 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 addresses of an IPv4 VRRP group must be in the same subnet as one of the IP addresses of the interface where the VRRP group is configured. Otherwise, the hosts in the subnet cannot access external networks.
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