The set protocols vrrp interface vif vrid ip command assigns a virtual IP address to the VRRP group.
This command applies to both VRRPv2 and VRRPv3 configuration.
set protocols vrrp interface <interface-name> vif <vif-name> vrid <virtual-router-id> ip <ip-address>
Specifies the Layer 3 interface name of VRRP device. The value is a string.
Specifies the VLAN interface name. The value is a string.
Specifies the VRID of a VRRP group. The value is an integer that ranges from 1 to 254.
Specifies the virtual IPvX address of a VRRP group. The value could be an IPv4 address or an IPv6 address.
Type the IPvX address without subnet mask as the mask value is the same as the Layer 3 interface.
If users on a network have the same reliability requirements, configure multiple virtual IPvX addresses for a VRRP group. By doing this, one virtual IP address can serve one separate user group.
One VRRP group supports a maximum of 254 virtual IPv4 addresses, and 64 virtual IPv6 addresses.
Follow the rules below when configuring the virtual IPv4 / IPv6 address:
- For IPv4, the virtual IPv4 of the VRRP group and the IPv4 address of the interface should be configured in the same network segment to ensure that the VRRP group can work normally.
- For IPv6, the global virtual IPv6 address of the VRRPv3 group and the global IPv6 address of the interface should be configured in the same network segment to ensure that the VRRPv3 group can work normally.
- The IP address of the virtual router can be either an unassigned IP address in the network segment where the VRRP group resides or the IP address of an interface on a router in the VRRP group. A router whose interface IP address is the same as the virtual IP address is called an "IP address owner".
- The virtual IPv4 address of the VRRP group cannot be all zeros, broadcast address (255.255.255.255), network address or network broadcast address of the segment where the virtual IP address resides, loopback address, non-A / B / C address or any other illegal IP Address (e.g., 0.0.0.1).
- In the same VRRP group, IPv4 and IPv6 cannot be mixed. That is, the configured virtual IP addresses in the same VRRP group could either be virtual IPv4 addresses or virtual IPv6 addresses.
- For IPv6, configure at least one link-local IPv6 address in a VRRPv3 group which will be used as gateway address for the hosts, the format is FE80::/10.
- Virtual IP address list on both devices of VRRP group must be the same.
- Configure one or more global virtual IPv6 addresses, for the purpose of configuring global addresses via stateless address autoconfiguration of the downstream host (refer to RFC2462 IPv6 Stateless Address Autoconfiguration).
The gateway address of the downstream host should be configured as the virtual IPvX address of the VRRP virtual router device. For IPv6, the gateway address should be the virtual link-local address.
- Assigns a virtual IP address to the VRRP group.