< Home

vrrp vrid virtual-ip

Function

The vrrp vrid virtual-ip command sets a virtual IP address for a VRRP group.

The undo vrrp vrid command deletes a VRRP group.

Format

vrrp vrid virtual-router-ID virtual-ip virtual-address [ ip-mask | ip-mask-length ] { active | standby }

undo vrrp vrid virtual-router-ID [ virtual-ip virtual-address ]

Parameters

Parameter Description Value

virtual-router-ID

Specifies the ID of a VRRP group.

The value is an integer ranging from 1 to 255.

virtual-address

Specifies the virtual IP address of a VRRP group.

The value is in dotted decimal notation.

ip-mask

Specifies the subnet mask in dotted decimal notation.

The value is in dotted decimal notation.

ip-mask-length

Specifies the subnet mask length.

The value ranges from 1 to 32.

{ active | standby }

Indicates that the VRRP group works at the active or standby state by default.

-

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

When configuring a VRRP group, note the following points:

  • A VRRP group can be configured on an interface only after an IPv4 address is assigned to the interface. You can run the ip address command to configure an IPv4 address for the interface.
  • The virtual IP address of the IPv4 VRRP group cannot be the same as the IP address of any interface or on the same network segment.
  • The physical IP address and the virtual address of the IPv4 VRRP group can reside on the same network segment or different network segments.
  • Only one virtual IP address can be configured for a VRRP group.

Example

# Configure VRRP group 1 to work in the Active state and set the virtual IP address 10.10.10.10/24 for it.

<sysname> system-view
[sysname] interface GigabitEthernet 0/0/1
[sysname-GigabitEthernet0/0/1] vrrp vrid 1 virtual-ip 10.10.10.10 24 active
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >