- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
07-VRRP commands | 244.07 KB |
The term "interface" in this chapter collectively refers to VLAN interfaces, Layer 3 Ethernet interfaces, Layer 3 aggregate interfaces, Layer 3 Ethernet subinterfaces, and Layer 3 aggregate subinterfaces. You can set an Ethernet port as a Layer 3 interface by using the port link-mode route command (see Layer 2—LAN Switching Configuration Guide).
VRRP cannot be configured on member ports of aggregation groups.
IPv4 VRRP commands
display vrrp
Use display vrrp to display the states of IPv4 VRRP groups.
Syntax
display vrrp [ interface interface-type interface-number [ vrid virtual-router-id ] ] [ verbose ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface interface-type interface-number: Specifies an interface by its type and number.
vrid virtual-router-id: Specifies an IPv4 VRRP group by its virtual router ID in the range of 1 to 255.
verbose: Displays detailed IPv4 VRRP group information. If you do not specify this keyword, the command displays brief IPv4 VRRP group information.
Usage guidelines
· If no interface or VRRP group is specified, this command displays the states of all IPv4 VRRP groups.
· If only an interface is specified, this command displays the states of all IPv4 VRRP groups on the specified interface.
· If both an interface and an IPv4 VRRP group are specified, this command displays the states of the specified IPv4 VRRP group on the specified interface.
Examples
# Display brief information about all IPv4 VRRP groups on the device when VRRP operates in standard mode.
<Sysname> display vrrp
IPv4 Virtual Router Information:
Running Mode : Standard
Total number of virtual routers : 1
Interface VRID State Running Adver Auth Virtual
Pri Timer Type IP
---------------------------------------------------------------------
Vlan1 1 Master 150 100 Simple 1.1.1.1
Table 1 Command output (in standard mode)
Field |
Description |
Running Mode |
VRRP operating mode (standard mode). |
Total number of virtual routers |
Total number of VRRP groups. |
Interface |
Interface where the VRRP group is configured. |
VRID |
Virtual router ID (VRRP group number). |
State |
Status of the router in the VRRP group: · Master. · Backup. · Initialize. · Inactive. |
Running Pri |
Current priority of the router. When a track entry is associated with a VRRP group on the router, the router's priority changes when the track entry's status changes. |
Adver Timer |
VRRP advertisement sending interval in centiseconds. |
Auth Type |
Authentication type: · None—No authentication. · Simple—Simple text authentication. · MD5—MD5 authentication. |
Virtual IP |
Virtual IP address of the VRRP group. |
# Display detailed information about all IPv4 VRRP groups on the device when VRRP operates in standard mode.
<Sysname> display vrrp verbose
IPv4 Virtual Router Information:
Running Mode : Standard
Total number of virtual routers : 2
Interface Vlan-interface2
VRID : 1 Adver Timer : 100
Admin Status : Up State : Master
Config Pri : 150 Running Pri : 150
Preempt Mode : Yes Delay Time : 5
Auth Type : Simple Key : ******
Virtual IP : 1.1.1.1
Virtual MAC : 0000-5e00-0101
Master IP : 1.1.1.2
VRRP Track Information:
Track Object : 1 State : Positive Pri Reduced : 50
Interface Vlan-interface2
VRID : 11 Adver Timer : 100
Admin Status : Up State : Backup
Config Pri : 80 Running Pri : 80
Preempt Mode : Yes Delay Time : 0
Become Master : 2370ms left
Auth Type : None
Virtual IP : 1.1.1.11
Virtual MAC : 0000-5e00-010b
Master IP : 1.1.1.12
Table 2 Command output (in standard mode)
Field |
Description |
Running Mode |
VRRP operating mode (standard mode). |
Total number of virtual routers |
Total number of VRRP groups. |
Interface |
Interface where the VRRP group is configured. |
VRID |
Virtual router ID (VRRP group number). |
Adver Timer |
VRRP advertisement sending interval in centiseconds. |
Admin Status |
Administrative status: up or down. |
State |
Status of the router in the VRRP group: · Master. · Backup. · Initialize. · Inactive. |
Config Pri |
Configured priority of the router, which is configured through the vrrp vrid priority command. |
Running Pri |
Current priority of the router. When a track entry is associated with a VRRP group on the router, the router's priority changes when the track entry's status changes. |
Preempt Mode |
Preemptive mode: · Yes. · No. |
Delay Time |
Preemption delay time in centiseconds. |
Become Master |
Time, in milliseconds, that a backup router has to wait before it becomes the master. |
Auth Type |
Authentication type: · None—No authentication. · Simple—Simple text authentication. · MD5—MD5 authentication. |
Key |
Authentication key, which is not displayed if no authentication is required. |
Virtual IP |
Virtual IP address of the VRRP group. |
Virtual MAC |
Virtual MAC address of the VRRP group's virtual IP address, which is displayed when the router is the master. |
Master IP |
Primary IP address of the interface where the master resides. |
VRRP Track Information |
Track entry information. This field is displayed only after you have configured the vrrp vrid track command. |
Track Object |
Track entry which is associated with the VRRP group. |
State |
Track entry state: · Negative. · Positive. · NotReady. |
Pri Reduced |
Value by which the priority decreases when the status of the associated track entry becomes negative. |
Switchover |
Switchover mode. When the status of the associated track entry becomes negative, the backup immediately becomes the master. |
# Display brief information about all IPv4 VRRP groups on the device when VRRP operates in load balancing mode.
<Sysname> display vrrp
IPv4 Virtual Router Information:
Running Mode : Load Balance
Total number of virtual routers : 1
Interface VRID State Running Address Active
Pri
----------------------------------------------------------------------
Vlan1 1 Master 150 1.1.1.1 Local
----- VF 1 Active 255 000f-e2ff-0011 Local
Table 3 Command output (in load balancing mode)
Field |
Description |
Running Mode |
VRRP operating mode (load balancing mode). |
Total number of virtual routers |
Total number of VRRP groups. |
Interface |
Interface where the VRRP group is configured. |
VRID |
Virtual router ID (VRRP group number) or virtual forwarder (VF) ID. |
State |
· For a VRRP group (when the VRID is a virtual router ID), this field indicates the state of the router in the VRRP group, including Master, Backup, Initialize, and Inactive. · For a VF (when the VRID is a VF ID), this field indicates the state of the VF in the VRRP group, including Active, Listening, and Initialize. |
Running Pri |
· For a VRRP group (when the VRID is a virtual router ID), this field indicates the running priority of the router. When a track entry is associated with a VRRP group on the router, the router's priority changes when the track entry's status changes. · For a VF (when the VRID is a VF ID), this field indicates the running priority of the VF. When a track entry is associated with a VF, the priority of the VF changes if the state of the monitored track entry changes. |
Address |
· For a VRRP group (when the VRID is a virtual router ID), this field indicates the virtual IP address of the VRRP group. · For a VF (when the VRID is a VF ID), this field indicates the virtual MAC address of the VF. |
Active |
· For a VRRP group (when the VRID is a virtual router ID), this field indicates the IP address of the interface where the master resides. If the current router is the master, local is displayed. · For a VF (when the VRID is a VF ID), this field indicates the IP address of the interface where the active virtual forwarder (AVF) resides. If the current VF is the AVF, local is displayed. |
# Display detailed information about all IPv4 VRRP groups on the device when VRRP operates in load balancing mode.
<Sysname> display vrrp verbose
IPv4 Virtual Router Information:
Running Mode : Load Balance
Total number of virtual routers : 2
Interface Vlan-interface
VRID : 1 Adver Timer : 100
Admin Status : Up State : Master
Config Pri : 150 Running Pri : 150
Preempt Mode : Yes Delay Time : 5
Auth Type : None
Virtual IP : 10.1.1.1
10.1.1.2
10.1.1.3
Member IP List : 10.1.1.10 (Local, Master)
10.1.1.20 (Backup)
VRRP Track Information:
Track Object : 1 State : Positive Pri Reduced : 50
Forwarder Information: 2 Forwarders 1 Active
Config Weight : 255
Running Weight : 255
Forwarder 01
State : Active
Virtual MAC : 000f-e2ff-0011 (Owner)
Owner ID : 0000-5e01-1101
Priority : 255
Active : local
Forwarder 02
State : Listening
Virtual MAC : 000f-e2ff-0012 (Learnt)
Owner ID : 0000-5e01-1103
Priority : 127
Active : 10.1.1.20
Forwarder Weight Track Information:
Track Object : 1 State : Positive Weight Reduced : 250
Interface Vlan-interface2
VRID : 11 Adver Timer : 100
Admin Status : Up State : Backup
Config Pri : 80 Running Pri : 80
Preempt Mode : Yes Delay Time : 0
Become Master : 2370ms left
Auth Type : None
Virtual IP : 10.1.1.11
10.1.1.12
10.1.1.13
Member IP List : 10.1.1.10 (Local, Backup)
10.1.1.15 (Master)
Forwarder Information: 2 Forwarders 1 Active
Config Weight : 255
Running Weight : 255
Forwarder 01
State : Active
Virtual MAC : 000f-e2ff-40b1 (Learnt)
Owner ID : 0000-5e01-1103
Priority : 127
Active : 10.1.1.15
Forwarder 02
State : Listening
Virtual MAC : 000f-e2ff-40b2 (Owner)
Owner ID : 0000-5e01-1101
Priority : 255
Active : local
Table 4 Command output (in load balancing mode)
Field |
Description |
Running Mode |
VRRP operating mode (load balancing mode). |
Total number of virtual routers |
Total number of VRRP groups. |
Interface |
Interface where the VRRP group is configured. |
VRID |
Virtual router ID (VRRP group number). |
Adver Timer |
VRRP advertisement sending interval in centiseconds. |
Admin Status |
Administrative status: up or down. |
State |
Status of the router in the VRRP group: · Master. · Backup. · Initialize. · Inactive. |
Config Pri |
Configured priority of the router, which is configured by using the vrrp vrid priority command. |
Running Pri |
Current priority of the router. When a track entry is associated with a VRRP group on the router, the router's priority changes when the track entry's status changes. |
Preempt Mode |
Preemptive mode: · Yes. · No. |
Delay Time |
Preemption delay time in centiseconds. |
Become Master |
Time, in milliseconds, that a backup router has to wait before it becomes the master. |
Auth Type |
Authentication type: · None—No authentication. · Simple—Simple text authentication. · MD5—MD5 authentication. |
Key |
Authentication key, which is not displayed if no authentication is required. |
Virtual IP |
Virtual IP address list of the VRRP group. |
Member IP List |
IP addresses of the member devices in the VRRP group: · Local—IP address of the local router. · Master—IP address of the master. · Backup—IP address of the backup. |
VRRP Track Information |
Track entry which is associated with the VRRP group. This field is displayed only after you have configured the vrrp vrid track command. |
Track Object |
Track entry to be monitored. |
State |
Track entry state: · Negative. · Positive. · NotReady. |
Pri Reduced |
Value by which the priority decreases when the status of the associated track entry becomes negative. This field is displayed only after you have configured vrrp vrid track command. |
Switchover |
Switchover mode. When the status of the associated track entry becomes negative, the backup immediately becomes the master. |
Forwarder Information: 2 Forwarders 1 Active |
VF information: Two VFs exist, and one is the AVF. |
Config Weight |
Configured weight of the VF: 255. |
Running Weight |
Current weight of the VF. When a track entry is associated with the VFs of a VRRP group, the VFs' weights change when the track entry's status changes. |
Forwarder 01 |
Information about VF 01. |
State |
VF state: · Active. · Listening. · Initialize. |
Virtual MAC |
Virtual MAC address of the VF. |
Owner ID |
Real MAC address of the VF owner. |
Priority |
VF priority in the range of 1 to 255. |
Active |
IP address of the interface where the AVF resides. If the current VF is the AVF, local is displayed. |
Forwarder Weight Track Configuration |
VF weight Track configuration. The field is displayed only after you have configured the vrrp vrid weight track command. |
Track Object |
Track entry which is associated with the VFs. The field is displayed only after you have configured the vrrp vrid weight track command. |
State |
Track entry state: · Negative. · Positive. · NotReady. |
Weight Reduced |
Value by which the weights of the VFs decrease when the state of the associated track entry changes to negative. The field is displayed only after you configure the vrrp vrid weight track command. |
display vrrp statistics
Use display vrrp statistics to display statistics for IPv4 VRRP groups.
Syntax
display vrrp statistics [ interface interface-type interface-number [ vrid virtual-router-id ] ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface interface-type interface-number: Specifies an interface by its type and number.
vrid virtual-router-id: Specifies an IPv4 VRRP group by its virtual router ID in the range of 1 to 255.
Usage guidelines
· If no interface or VRRP group is specified, this command displays statistics for all IPv4 VRRP groups.
· If only an interface is specified, this command displays statistics for all IPv4 VRRP groups on the specified interface.
· If both an interface and an IPv4 VRRP group are specified, this command displays statistics for the specified IPv4 VRRP group on the specified interface.
You can use the reset vrrp statistics command to clear statistics for IPv4 VRRP groups.
Examples
# Display statistics for all IPv4 VRRP groups when VRRP operates in standard mode.
<Sysname> display vrrp statistics
Interface : Vlan-interface2
VRID : 1
CheckSum Errors : 0 Version Errors : 0
Invalid Pkts Rcvd : 0 Unexpected Pkts Rcvd : 0
IP TTL Errors : 0 Advertisement Interval Errors : 0
Invalid Auth Type : 0 Auth Failures : 0
Packet Length Errors : 0 Auth Type Mismatch : 0
Become Master : 1 Address List Errors : 0
Adver Rcvd : 0 Priority Zero Pkts Rcvd : 0
Adver Sent : 807 Priority Zero Pkts Sent : 0
Global statistics
CheckSum Errors : 0
Version Errors : 0
VRID Errors : 0
# Display statistics for all IPv4 VRRP groups when VRRP operates in load balancing mode.
<Sysname> display vrrp statistics
Interface : Vlan-interface2
VRID : 1
CheckSum Errors : 0 Version Errors : 0
Invalid Pkts Rcvd : 0 Unexpected Pkts Rcvd : 0
IP TTL Errors : 0 Advertisement Interval Errors : 0
Invalid Auth Type : 0 Auth Failures : 0
Packet Length Errors : 0 Auth Type Mismatch : 0
Become Master : 39 Address List Errors : 0
Become AVF : 13 Packet Option Errors : 0
Adver Rcvd : 2562 Priority Zero Pkts Rcvd : 1
Adver Sent : 16373 Priority Zero Pkts Sent : 49
Request Rcvd : 2 Reply Rcvd : 10
Request Sent : 12 Reply Sent : 2
Release Rcvd : 0 VF Priority Zero Pkts Rcvd : 1
Release Sent : 0 VF Priority Zero Pkts Sent : 11
Redirect Timer Expires : 1 Time-out Timer Expires : 0
Global statistics
CheckSum Errors : 0
Version Errors : 0
VRID Errors : 0
Table 5 Command output (in standard mode)
Field |
Description |
Interface |
Interface where the VRRP group is configured. |
VRID |
VRRP group number. |
CheckSum Errors |
Number of packets with checksum errors. |
Version Errors |
Number of packets with version errors. |
Invalid Pkts Rcvd |
Number of received packets of invalid packet types. |
Unexpected Pkts Rcvd |
Number of received unexpected packets. |
Advertisement Interval Errors |
Number of packets with advertisement interval errors. |
IP TTL Errors |
Number of packets with TTL errors. |
Auth Failures |
Number of packets with authentication failures. |
Invalid Auth Type |
Number of packets with authentication failures because of invalid authentication types. |
Auth Type Mismatch |
Number of packets with authentication failures because of mismatching authentication types. |
Packet Length Errors |
Number of packets with VRRP packet length errors. |
Address List Errors |
Number of packets with virtual IP address list errors. |
Become Master |
Number of times that the router elected as the master. |
Priority Zero Pkts Rcvd |
Number of received advertisements with the router priority of 0. |
Adver Rcvd |
Number of received advertisements. |
Priority Zero Pkts Sent |
Number of sent advertisements with the router priority of 0. |
Adver Sent |
Number of sent advertisements. |
Global statistics |
Global statistics for all VRRP groups. |
CheckSum Errors |
Total number of packets with checksum errors. |
Version Errors |
Total number of packets with version errors. |
VRID Errors |
Total number of packets with VRID errors. |
Table 6 Command output (in load balancing mode)
Field |
Description |
Interface |
Interface where the VRRP group is configured. |
VRID |
VRRP group number. |
CheckSum Errors |
Number of packets with checksum errors. |
Version Errors |
Number of packets with version errors. |
Invalid Pkts Rcvd |
Number of received packets of invalid packet types. |
Unexpected Pkts Rcvd |
Number of received unexpected packets. |
Advertisement Interval Errors |
Number of packets with advertisement interval errors. |
IP TTL Errors |
Number of packets with TTL errors. |
Auth Failures |
Number of packets with authentication failures. |
Invalid Auth Type |
Number of packets with authentication failures because of invalid authentication types. |
Auth Type Mismatch |
Number of packets with authentication failures because of mismatching authentication types. |
Packet Length Errors |
Number of packets with VRRP packet length errors. |
Address List Errors |
Number of packets with virtual IP address list errors. |
Become Master |
Number of times that the router elected as the master. |
Redirect Timer Expires |
Number of times that the redirect timer expired. |
Become AVF |
Number of times that the VF elected as the AVF. |
Time-out Timer Expires |
Number of times that the time-out timer expired. |
Adver Rcvd |
Number of received advertisements. |
Request Rcvd |
Number of received requests. |
Adver Sent |
Number of sent advertisements. |
Request Sent |
Number of sent requests. |
Reply Rcvd |
Number of received replies. |
Release Rcvd |
Number of received release packets. |
Reply Sent |
Number of sent replies. |
Release Sent |
Number of sent release packets. |
Priority Zero Pkts Rcvd |
Number of received advertisements with the router priority of 0. |
VF Priority Zero Pkts Rcvd |
Number of received advertisements with the VF priority of 0. |
Priority Zero Pkts Sent |
Number of sent advertisements with the router priority of 0. |
VF Priority Zero Pkts Sent |
Number of sent advertisements with the VF priority of 0. |
Packet Option Errors |
Number of packet option errors. |
Global statistics |
Global statistics for all IPv4 VRRP groups. |
CheckSum Errors |
Total number of packets with checksum errors. |
Version Errors |
Total number of packets with version errors. |
VRID Errors |
Total number of packets with VRID errors. |
Related commands
reset vrrp statistics
reset vrrp statistics
Use reset vrrp statistics to clear statistics for IPv4 VRRP groups.
Syntax
reset vrrp statistics [ interface interface-type interface-number [ vrid virtual-router-id ] ]
Views
User view
Predefined user roles
network-admin
Parameters
interface interface-type interface-number: Specifies an interface by its type and number.
vrid virtual-router-id: Specifies an IPv4 VRRP group by its virtual router ID in the range of 1 to 255.
Usage guidelines
· If no interface or VRRP group is specified, this command clears statistics for all IPv4 VRRP groups.
· If only an interface is specified, this command clears statistics for all IPv4 VRRP groups on the specified interface.
· If both an interface and an IPv4 VRRP group are specified, this command clears statistics for the specified IPv4 VRRP group on the specified interface.
Examples
# Clear statistics for all IPv4 VRRP groups on all interfaces.
<Sysname> reset vrrp statistics
Related commands
display vrrp statistics
snmp-agent trap enable vrrp
Use snmp-agent trap enable vrrp to enable SNMP notifications for VRRP globally.
Use undo snmp-agent trap enable vrrp to disable SNMP notifications for VRRP globally.
Syntax
snmp-agent trap enable vrrp [ auth-failure | new-master ]
undo snmp-agent trap enable vrrp [ auth-failure | new-master ]
Default
SNMP notifications for VRRP are enabled.
Views
System view
Predefined user roles
network-admin
Parameters
auth-failure: Generates notifications as defined in RFC 2787 when the device in a VRRP group receives a VRRP advertisement with the authentication type or key not matching the local configuration.
new-master: Generates notifications as defined in RFC 2787 when the state of a device in a VRRP group changes from Initialize or Backup to Master.
Usage guidelines
When the notification function is enabled, the device can send notifications to the destination host. To specify the notification type (inform or trap) and target host, use the snmp-agent target-host command.
Examples
# Generate notifications as defined in RFC 2787 when the device in a VRRP group receives a VRRP advertisement with the authentication type or key not matching the local configuration.
<Sysname> system-view
[Sysname] snmp-agent trap enable vrrp auth-failure
vrrp check-ttl enable
Use vrrp check-ttl enable to enable TTL check for IPv4 VRRP packets.
Use undo vrrp check-ttl enable to disable TTL check for IPv4 VRRP packets.
Syntax
vrrp check-ttl enable
undo vrrp check-ttl enable
Default
TTL check for IPv4 VRRP packets is enabled.
Views
Interface view
Predefined user roles
network-admin
Usage guidelines
The master in an IPv4 VRRP group periodically sends VRRP advertisements to declare its presence. The VRRP advertisements are multicast in the local subnet and cannot be forwarded by routers, so the TTL value is not changed. When the master sends VRRP advertisements, it sets the TTL value to 255. If you enable TTL check, the backups drop the VRRP advertisements with TTL other than 255, preventing attacks from other subnets.
Devices from different vendors might implement VRRP differently. When the device is interoperating with devices of other vendors, TTL check on VRRP packets might result in unexpected dropping of packets. In this scenario, use the undo vrrp check-ttl enable command to disable TTL check on VRRP packets.
Examples
# Disable TTL check for IPv4 VRRP packets.
<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] undo vrrp check-ttl enable
vrrp dscp
Use vrrp dscp to configure a DSCP value for VRRP packets.
Use undo vrrp dscp to restore the default.
Syntax
vrrp dscp dscp-value
undo vrrp dscp
Views
System view
Predefined user roles
network-admin
Parameters
dscp-value: Specifies a DSCP value for VRRP packets, in the range of 0 to 63. The default is 48.
Usage guidelines
The DSCP value identifies the packet priority during transmission. A greater DSCP value means a higher packet priority.
Examples
# Configure the DSCP value for VRRP packets as 30.
<Sysname> system-view
[Sysname] vrrp dscp 30
vrrp mode
Use vrrp mode to specify the operating mode for IPv4 VRRP.
Use undo vrrp mode to restore the default.
Syntax
vrrp mode load-balance [ version-8 ]
undo vrrp mode
Default
IPv4 VRRP operates in standard mode.
Views
System view
Predefined user roles
network-admin
Parameters
load-balance: Specifies the load balancing mode.
version-8: Specifies the version carried in VRRP packets as 8.
Usage guidelines
After you create IPv4 VRRP groups on the router, you can specify their operating mode by using this command. All IPv4 VRRP groups on the router operate in the specified mode.
The version-8 keyword takes effect only when the version of IPv4 VRRP configured on the interface is VRRPv2. The version-8 keyword is required in the following conditions:
· A router running Comware V5 software or software with version earlier than Comware V7 exists in the VRRP group.
To display the software version, use the display version command.
· All routers in the IPv4 VRRP group are operating in load balancing mode.
· All routers in the IPv4 VRRP group are configured with the version of VRRPv2.
Examples
# Specify the load balancing mode for IPv4 VRRP.
<Sysname> system-view
[Sysname] vrrp mode load-balance
Related commands
display vrrp
vrrp version
Use vrrp version to specify the version of IPv4 VRRP on an interface.
Use undo vrrp version to restore the default.
Syntax
vrrp version version-number
undo vrrp version
Default
VRRPv3 is used.
Views
Interface view
Predefined user roles
network-admin
Parameters
version-number: Specifies a VRRP version. The version number is 2 or 3, where 2 indicates VRRPv2 (described in RFC 3768), and 3 indicates VRRPv3 (described in RFC 5798).
Usage guidelines
The version of VRRP on all routers in an IPv4 VRRP group must be the same.
Examples
# Specify VRRPv2 to run on VLAN-interface 10.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] vrrp version 2
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
vrrp vrid authentication-mode
Use vrrp vrid authentication-mode to configure the authentication mode and the authentication key for an IPv4 VRRP group to send and receive VRRP packets.
Use undo vrrp vrid authentication-mode to restore the default.
Syntax
vrrp vrid virtual-router-id authentication-mode { md5 | simple } { cipher | plain } key
undo vrrp vrid virtual-router-id authentication-mode
Default
Authentication is disabled when a VRRP group sends and receives VRRP packets.
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.
md5: Specifies the MD5 authentication mode.
simple: Specifies the simple authentication mode.
cipher: Sets a ciphertext authentication key.
plain: Sets a plaintext authentication key.
key: Sets the authentication key. This argument is case-sensitive. It must be a ciphertext string of 1 to 41 characters if the cipher keyword is specified or a plaintext string of 1 to 8 characters if the plain keyword is specified.
Usage guidelines
To avoid attacks from unauthorized users, VRRP member routers add authentication keys in VRRP packets to authenticate one another. VRRP provides the following authentication modes:
· simple—Simple text authentication.
The sender fills an authentication key into the VRRP packet, and the receiver compares the received authentication key with its local authentication key. If the two authentication keys are the same, the received VRRP packet is legitimate. Otherwise, the received packet is illegitimate.
· md5—MD5 authentication.
The sender computes a digest for the packet to be sent by using the authentication key and MD5 algorithm, and it saves the result in the authentication header. The receiver performs the same operation by using the authentication key and MD5 algorithm, and it compares the result with the content in the authentication header. If the results are the same, the received VRRP packet is legitimate. Otherwise, the received packet is illegitimate.
The MD5 authentication is more secure than the simple text authentication, but it costs more resources.
For security purposes, all keys, including keys configured in plain text, are saved in cipher text.
|
IMPORTANT: · You can configure different authentication modes and authentication keys for the VRRP groups on an interface. However, members of the same VRRP group must use the same authentication mode and authentication key. · For VRRPv3, this command does not take effect. |
Examples
# Set the authentication mode to simple and the authentication key to Sysname for VRRP group 1 on VLAN-interface 2.
<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] vrrp vrid 1 authentication-mode simple plain Sysname
Related commands
· display vrrp
· vrrp version
vrrp vrid preempt-mode
Use vrrp vrid preempt-mode to enable the preemptive mode for the device in an IPv4 VRRP group and configure the preemption delay.
Use undo vrrp vrid preempt-mode to disable the preemptive mode for the device in an IPv4 VRRP group.
Use undo vrrp vrid preempt-mode delay to restore the default preemption delay.
Syntax
vrrp vrid virtual-router-id preempt-mode [ delay delay-value ]
undo vrrp vrid virtual-router-id preempt-mode [ delay ]
Default
The device operates in preemptive mode and the preemption delay is 0 centiseconds.
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.
delay delay-value: Specifies a preemption delay time in the range of 0 to 180000 in centiseconds. The default setting is 0 centiseconds.
Usage guidelines
In non-preemptive mode, when a device in the IPv4 VRRP group becomes the master, it acts as the master as long as it operates correctly, even if a backup is assigned a higher priority later. The non-preemptive mode helps avoid frequent switchover between the master and backups.
In preemptive mode, a backup takes over as the master and sends VRRP advertisements when it detects that it has a higher priority than the master. The previous master then becomes a backup. This mechanism makes sure the master is always the device with the highest priority.
To avoid frequent state changes among members in a VRRP group and to provide the backups enough time to collect information (such as routing information), a backup does not immediately become the master after it receives an advertisement with lower priority than the local priority. Instead, it waits for a period of time before taking over as the master.
Examples
# Enable the preemptive mode for VLAN-interface 2, and set the preemption delay time to 500 centiseconds.
<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] vrrp vrid 1 preempt-mode delay 500
Related commands
display vrrp
vrrp vrid priority
Use vrrp vrid priority to configure the priority of the device in an IPv4 VRRP group.
Use undo vrrp vrid priority to restore the default.
Syntax
vrrp vrid virtual-router-id priority priority-value
undo vrrp vrid virtual-router-id priority
Default
The priority of a device in an IPv4 VRRP group is 100.
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.
priority-value: Specifies a priority value in the range of 1 to 254. A higher number indicates a higher priority.
Usage guidelines
VRRP determines the role (master or backup) of each device in a VRRP group by priority. A device with a higher priority is more likely to become the master.
VRRP priority is in the range of 0 to 255, and a greater number represents a higher priority. Priorities 1 to 254 are configurable. Priority 0 is reserved for special uses, and priority 255 is for the IP address owner. The device acting as the IP address owner in a VRRP group always has a running priority of 255 and acts as the master as long as it works correctly.
Examples
# Configure the priority of the switch in VRRP group 1 on VLAN-interface 2 to 150.
<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] vrrp vrid 1 priority 150
Related commands
· display vrrp
· vrrp vrid track
vrrp vrid shutdown
Use vrrp vrid shutdown to disable an IPv4 VRRP group.
Use undo vrrp vrid shutdown to restore the default.
Syntax
vrrp vrid virtual-router-id shutdown
undo vrrp vrid virtual-router-id shutdown
Default
An IPv4 VRRP group is enabled.
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.
Usage guidelines
You can use this command to temporarily disable an IPv4 VRRP group. After this command is configured, the VRRP group stays in initialized state, and its configurations remain unchanged. You can change its configuration and your changes take effect when you enable the VRRP group again.
Examples
# Disable IPv4 VRRP group 1.
<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] vrrp vrid 1 shutdown
vrrp vrid source-interface
Use vrrp vrid source-interface to specify the source interface for an IPv4 VRRP group. This interface, instead of the interface where the VRRP group resides, sends and receives VRRP packets.
Use undo vrrp source-interface to cancel the specified source interface.
Syntax
vrrp vrid virtual-router-id source-interface interface-type interface-number
undo vrrp vrid virtual-router-id source-interface
Default
No source interface is specified for a VRRP group. The interface where the VRRP group resides sends and receives VRRP packets.
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.
interface-type interface-number: Specifies an interface by its type and number.
Usage guidelines
If VRRP group members cannot exchange VRRP packets through the interfaces where the VRRP group resides, you can use this command to enable VRRP packet exchange among VRRP group members through the specified source interfaces.
Examples
# Specify VLAN-interface 20 as the source interface for VRRP packet exchange in IPv4 VRRP group 10.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] vrrp vrid 10 source-interface vlan-interface 20
vrrp vrid timer advertise
Use vrrp vrid timer advertise to configure the interval at which the master in an IPv4 VRRP group sends VRRP advertisements.
Use undo vrrp vrid timer advertise to restore the default.
Syntax
vrrp vrid virtual-router-id timer advertise adver-interval
undo vrrp vrid virtual-router-id timer advertise
Default
The master in an IPv4 VRRP group sends VRRP advertisements at an interval of 100 centiseconds.
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.
adver-interval: Specifies an interval for the master in the specified IPv4 VRRP group to send VRRP advertisements. The value range for this argument is 10 to 4095 centiseconds. For VRRPv2, the value of the adver-interval argument can only be a multiple of 100. For example, if you configure values in the range of 10 to 100, 101 to 200, and 4001 to 4095, the actual values are 100, 200, and 4100, respectively. For VRRPv3, the value of the adver-interval argument that you configured takes effect.
Usage guidelines
The master in an IPv4 VRRP group periodically sends VRRP advertisements to declare its presence. You can use this command to configure the interval at which the master sends VRRP advertisements.
H3C recommends that you set the VRRP advertisement interval to be greater than 100 centiseconds to maintain system stability.
In VRRPv2, all routers in an IPv4 VRRP group must have the same interval for sending VRRP advertisements.
In VRRPv3, the routers in an IPv4 VRRP group can have different intervals for sending VRRP advertisements. The master in the VRRP group sends VRRP advertisements at the specified interval and carries the interval attribute in the advertisements. After a backup receives the advertisement, it records the interval in the advertisement. If the backup does not receive a new VRRP advertisement from the master when the timer (3 × recorded interval + Skew_Time) expires, it regards the master as failed and takes over as the master.
Large network traffic might disable a backup from receiving VRRP advertisements from the master within the specified time and trigger an unexpected master switchover. To solve this problem, you can use this command to configure a larger interval.
Examples
# Configure the master in IPv4 VRRP group 1 to send VRRP advertisements at an interval of 500 centiseconds.
<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] vrrp vrid 1 timer advertise 500
Related commands
display vrrp
vrrp vrid track
Use vrrp vrid track to associate a VRRP group with a track entry and control master switchover or AVF switchover in the VRRP group in response to changes (such as uplink state changes) detected by the track entry.
Use undo vrrp vrid track to remove the association between a VRRP group and a track entry. If no track entry is specified, the association between the VRRP group and any track entry is removed.
Syntax
vrrp vrid virtual-router-id track track-entry-number { forwarder-switchover member-ip ip-address | priority reduced [ priority-reduced ] | switchover | weight reduced [ weight-reduced ] }
undo vrrp vrid virtual-router-id track [ track-entry-number [ forwarder-switchover | priority reduced | switchover | weight reduced ] ]
Default
A VRRP group is not associated with any track entry.
Views
Interface view
Predefined user roles
network-admin
Parameters
virtual-router-id: Specifies an IPv4 VRRP group number in the range of 1 to 255.
track-entry-number: Specifies a track entry. The track-entry-number argument is in the range of 1 to 1024.
forwarder-switchover member-ip ip-address: Enables the LVF on the router to take over the role of the AVF at the specified IP address immediately after the specified track entry changes to the negative state. You can use the display vrrp verbose command to view the IP addresses of VFs.
priority reduced priority-reduced: Reduces the priority of the router in the VRRP group by a specific value when the state of the specified track entry changes to negative. The priority-reduced argument is in the range of 1 to 255, and the default is 10.
switchover: Enables the router in backup state to take over as the master immediately after the specified track entry changes to the negative state.
weight reduced priority-reduced: Reduces the weight of all VFs on the router in the VRRP group by a specific value when the state of the specified track entry changes to negative. The weight-reduced argument is in the range of 1 to 255, and the default is 30.
Usage guidelines
When the associated track entry changes to the negative state, one of the following conditions occurs, depending on your configuration:
· The priority of the router in the VRRP group decreases by a specific value.
· The weight of VFs decreases by a specific value.
· The router immediately takes over as the master if it is a backup.
· The LVF on the router takes over the role of the AVF at the specified IP address immediately.
Before executing this command, create a VRRP group on the interface and assign a virtual IP address to it.
The forwarder-switchover member-ip ip-address or weight reduced weight-reduced option takes effect only when the IPv4 VRRP group is operating in load balancing mode.
If the priority reduced keyword is specified but the priority-reduced argument is not specified, the priority of the router in the VRRP group decreases by 10 when the track entry changes to negative.
If the weight reduced keyword is specified but the weight-reduced argument is not specified, the weight of the VFs on the router in the VRRP group decreases by 30 when the track entry changes to negative.
The weight of a VF is 255, and its lower limit of failure is 10.
When the weight of a VF owner is higher than or equal to the lower limit of failure, its priority is always 255 and does not change with the weight. To guarantee that an LVF can take over the VF owner as the AVF when the upstream link of the VF owner fails, the reduced weight for the VF owner must be higher than 245 so the weight of the VF owner can drop below the lower limit of failure.
When the track entry changes from Negative to Positive or NotReady, the router automatically restores its priority or VF weight. The failed master router becomes the master again, or the failed AVF becomes active again.
|
IMPORTANT: · The vrrp vrid track priority reduced or vrrp vrid track switchover command cannot take effect on an IP address owner. If you have configured the command on an IP address owner, the configuration takes effect after the router changes to be a non-IP address owner. · You can create a track entry with the track command before or after you associate it with a VRRP group. For more information about configuring track entries, see High Availability Configuration Guide. |
Examples
# Associate VRRP group 1 on VLAN-interface 2 with track entry 1 and decrease the priority of the router in the VRRP group by 50 when the state of track entry 1 changes to negative.
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] vrrp vrid 1 track 1 priority reduced 50
# Associate VRRP group 1 on VLAN-interface 2 with track entry 1 and enable the VF in listening state whose AVF is on the member device with the IP address of 10.1.1.3 to take over immediately after the specified track entry changes to the negative state.
[Sysname-Vlan-interface2] vrrp vrid 1 track 1 forwarder-switchover member-ip 10.1.1.3
# Associate VRRP group 1 on VLAN-interface 2 with track entry 1 and decrease the weight of all VFs on the router in the VRRP group by 50 when the state of track entry 1 changes to negative.
[Sysname-Vlan-interface2] vrrp vrid 1 track 1 weight reduced 50
Related commands
display vrrp
IPv6 VRRP commands
display vrrp ipv6
Use display vrrp ipv6 to display the states of IPv6 VRRP groups.
Syntax
display vrrp ipv6 [ interface interface-type interface-number [ vrid virtual-router-id ] ] [ verbose ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface interface-type interface-number: Specifies an interface by its type and number.
vrid virtual-router-id: Specifies an IPv6 VRRP group by its virtual router ID in the range of 1 to 255.
verbose: Displays detailed IPv6 VRRP group information. If you do not specify this keyword, the command displays brief IPv6 VRRP group information.
Usage guidelines
· If no interface or VRRP group is specified, this command displays the states of all IPv6 VRRP groups.
· If only an interface is specified, this command displays the states of all IPv6 VRRP groups on the specified interface.
· If both an interface and an IPv6 VRRP group are specified, this command displays the states of the specified IPv6 VRRP group on the specified interface.
Examples
# Display brief information about all IPv6 VRRP groups on the device when VRRP operates in standard mode.
<Sysname> display vrrp ipv6
IPv6 Virtual Router Information:
Running Mode : Standard
Total number of virtual routers : 1
Interface VRID State Running Adver Auth Virtual
Pri Timer Type IP
---------------------------------------------------------------------
Vlan1 1 Master 150 100 None FE80::1
Table 7 Command output (in standard mode)
Field |
Description |
Running Mode |
VRRP operating mode (standard mode). |
Total number of virtual routers |
Total number of VRRP groups. |
Interface |
Interface where the VRRP group is configured. |
VRID |
Virtual router ID (VRRP group number). |
State |
Status of the router in the VRRP group: · Master. · Backup. · Initialize. · Inactive. |
Running Pri |
Current priority of the router. When a track entry is associated with a VRRP group on the router, the router's priority changes when the track entry's status changes. |
Adver Timer |
VRRP advertisement sending interval in centiseconds. |
Auth Type |
Authentication type. Only none is available, which means no authentication is required. |
Virtual IP |
Virtual IP address of the VRRP group. |
# Display detailed information about all IPv6 VRRP groups on the device when VRRP operates in standard mode.
<Sysname> display vrrp ipv6 verbose
IPv6 Virtual Router Information:
Running Mode : Standard
Total number of virtual routers : 2
Interface Vlan-interface2
VRID : 1 Adver Timer : 100
Admin Status : Up State : Master
Config Pri : 150 Running Pri : 150
Preempt Mode : Yes Delay Time : 10
Auth Type : None
Virtual IP : FE80::1
Virtual MAC : 0000-5e00-0201
Master IP : FE80::2
VRRP Track Information:
Track Object : 1 State : Positive Pri Reduced : 50
Interface Vlan-interface2
VRID : 11 Adver Timer : 100
Admin Status : Up State : Backup
Config Pri : 80 Running Pri : 80
Preempt Mode : Yes Delay Time : 0
Become Master : 2450ms left
Auth Type : None
Virtual IP : FE80::11
Virtual MAC : 0000-5e00-020b
Master IP : FE80::12
Table 8 Command output (in standard mode)
Field |
Description |
Running Mode |
VRRP operating mode (standard mode). |
Total number of virtual routers |
Total number of VRRP groups. |
Interface |
Interface where the VRRP group is configured. |
VRID |
Virtual router ID (VRRP group number). |
Adver Timer |
VRRP advertisement sending interval in centiseconds. |
Admin Status |
Administrative status: up or down. |
State |
Status of the router in the VRRP group: · Master. · Backup. · Initialize. · Inactive. |
Config Pri |
Configured priority of the router, which is configured through the vrrp ipv6 vrid priority command. |
Running Pri |
Current priority of the router. When a track entry is associated with a VRRP group on the router, the router's priority changes when the track entry's status changes. |
Preempt Mode |
Preemptive mode: · Yes. · No. |
Delay Time |
Preemption delay time in centiseconds. |
Become Master |
Time, in milliseconds, that a backup router has to wait before it becomes the master. |
Auth Type |
Authentication type. Only none is available, which means no authentication is required. |
Virtual IP |
Virtual IP address of the VRRP group. |
Virtual MAC |
Virtual MAC address of the VRRP group's virtual IP address, which is displayed when the router is the master. |
Master IP |
Link-local address of the interface where the master resides. |
VRRP Track Information |
Track entry information. This field is displayed only after you have configured the vrrp ipv6 vrid track command. |
Track Object |
Track entry which is associated with the VRRP group. |
State |
Track entry state: · Negative. · Positive. · NotReady. |
Pri Reduced |
Value by which the priority decreases when the status of the associated track entry becomes negative. |
Switchover |
Switchover mode. When the status of the associated track entry becomes negative, the backup immediately becomes the master. |
# Display brief information about all IPv6 VRRP groups on the device when VRRP operates in load balancing mode.
<Sysname> display vrrp ipv6
IPv6 Virtual Router Information:
Running Mode : Load Balance
Total number of virtual routers : 1
Interface VRID State Running Address Active
Pri
----------------------------------------------------------------------
Vlan1 1 Master 150 FE80::1 Local
----- VF 1 Active 255 000f-e2ff-4011 Local
Table 9 Command output (in load balancing mode)
Field |
Description |
Running Mode |
VRRP operating mode (load balancing mode). |
Total number of virtual routers |
Total number of VRRP groups. |
Interface |
Interface where the VRRP group is configured. |
VRID |
Virtual router ID (VRRP group number) or VF ID. |
State |
· For a VRRP group (when the VRID is a virtual router ID), this field indicates the state of the router in the VRRP group, including Master, Backup, Initialize, and Inactive. · For a VF (when the VRID is a VF ID), this field indicates the state of the VF in the VRRP group, including Active, Listening, and Initialize. |
Running Pri |
· For a VRRP group (when the VRID is a virtual router ID), this field indicates the running priority of the router. When a track entry is associated with a VRRP group on the router, the router's priority changes when the track entry's status changes. · For a VF (when the VRID is a VF ID), this field indicates the running priority of the VF. When a track entry is associated with a VF, the priority of the VF changes if the state of the monitored track entry changes. |
Address |
· For a VRRP group (when the VRID is a virtual router ID), this field indicates the virtual IP address of the VRRP group. · For a VF (when the VRID is a VF ID), this field indicates the virtual MAC address of the VF. |
Active |
· For a VRRP group (when the VRID is a virtual router ID), this field indicates the link-local address of the interface where the master resides. If the current router is the master, local is displayed. · For a VF (when the VRID is a VF ID), this field indicates the link-local address of the interface where the AVF resides. If the current VF is the AVF, local is displayed. |
# Display detailed information about all IPv6 VRRP groups on the device when VRRP operates in load balancing mode.
<Sysname> display vrrp ipv6 verbose
IPv6 Virtual Router Information:
Running Mode : Load Balance
Total number of virtual routers : 2
Interface Vlan-interface2
VRID : 1 Adver Timer : 100
Admin Status : Up State : Master
Config Pri : 150 Running Pri : 150
Preempt Mode : Yes Delay Time : 5
Auth Type : None
Virtual IP : FE80::10
Member IP List : FE80::3 (Local, Master)
FE80::2 (Backup)
VRRP Track Information:
Track Object : 1 State : Positive Pri Reduced : 50
Forwarder Information: 2 Forwarders 1 Active
Config Weight : 255
Running Weight : 255
Forwarder 01
State : Active
Virtual MAC : 000f-e2ff-4011 (Owner)
Owner ID : 0000-5e01-1101
Priority : 255
Active : local
Forwarder 02
State : Listening
Virtual MAC : 000f-e2ff-4012 (Learnt)
Owner ID : 0000-5e01-1103
Priority : 127
Active : FE80::2
Forwarder Weight Track Information:
Track Object : 1 State : Positive Weight Reduced : 250
Interface Vlan-interface2
VRID : 11 Adver Timer : 100
Admin Status : Up State : Backup
Config Pri : 80 Running Pri : 80
Preempt Mode : Yes Delay Time : 0
Become Master : 2450ms left
Auth Type : None
Virtual IP : FE80::11
Member IP List : FE80::3 (Local, Backup)
FE80::2 (Master)
Forwarder Information: 2 Forwarders 1 Active
Config Weight : 255
Running Weight : 255
Forwarder 01
State : Active
Virtual MAC : 000f-e2ff-40b1 (Learnt)
Owner ID : 0000-5e01-1103
Priority : 127
Active : FE80::2
Forwarder 02
State : Listening
Virtual MAC : 000f-e2ff-40b2 (Owner)
Owner ID : 0000-5e01-1101
Priority : 255
Active : local
Table 10 Command output (in load balancing mode)
Field |
Description |
Running Mode |
VRRP operating mode (load balancing mode). |
Total number of virtual routers |
Total number of VRRP groups. |
Interface |
Interface where the VRRP group is configured. |
VRID |
Virtual router ID (VRRP group number) |
Adver Timer |
VRRP advertisement sending interval in centiseconds. |
Admin Status |
Administrative status: up or down. |
State |
Status of the router in the VRRP group: · Master. · Backup. · Initialize. · Inactive. |
Config Pri |
Configured priority of the router, which is configured through the vrrp ipv6 vrid priority command. |
Running Pri |
Current priority of the router. When a track entry is associated with a VRRP group on the router, the router's priority changes when the track entry's status changes. |
Preempt Mode |
Preemptive mode: · Yes. · No. |
Delay Time |
Preemption delay time in centiseconds. |
Become Master |
Time, in milliseconds, that a backup router has to wait before it becomes the master. |
Auth Type |
Authentication type. Only none is available, which means no authentication is required. |
Virtual IP |
Virtual IP address list of the VRRP group. |
Member IP List |
IP addresses of the member devices in the VRRP group: · Local—IP address of the local router. · Master—IP address of the master. · Backup—IP address of the backup. |
VRRP Track Information |
Track entry which is associated with the VRRP group. This field is displayed only after you have configured the vrrp ipv6 vrid track command. |
Track Object |
Track entry to be monitored. This field is displayed only after you have configured the vrrp ipv6 vrid track command. |
State |
Track entry state: · Negative. · Positive. · NotReady. |
Pri Reduced |
Value by which the priority decreases when the status of the associated track entry becomes negative. This field is displayed only after you have configured vrrp ipv6 vrid track command. |
Switchover |
Switchover mode. When the status of the associated track entry becomes negative, the backup immediately becomes the master. |
Forwarder Information: 2 Forwarders 1 Active |
VF information: Two VFs exist and one is the AVF. |
Config Weight |
Configured weight of the VF: 255. |
Running Weight |
Current weight of the VF. When a track entry is associated with the VFs of a VRRP group, the VFs' weights change when the track entry's status changes. |
Forwarder 01 |
Information about VF 01. |
State |
VF state: · Active. · Listening. · Initialize. |
Virtual MAC |
Virtual MAC address of the VF. |
Owner ID |
Real MAC address of the VF owner. |
Priority |
VF priority in the range of 1 to 255. |
Active |
Link-local address of the interface where the AVF resides. If the current VF is the AVF, local is displayed. |
Forwarder Weight Track Configuration |
VF weight Track configuration. The field is displayed only after you have configured the vrrp ipv6 vrid weight track command. |
Track Object |
Track entry which is associated with the VFs. The field is displayed only after you have configured the vrrp ipv6 vrid weight track command. |
State |
Track entry state: · Negative. · Positive. · NotReady. |
Weight Reduced |
Value by which the weights of the VFs decrease when the state of the associated track entry changes to negative. The field is displayed only after you have configured the vrrp ipv6 vrid weight track command. |
display vrrp ipv6 statistics
Use display vrrp ipv6 statistics to display statistics for IPv6 VRRP groups.
Syntax
display vrrp ipv6 statistics [ interface interface-type interface-number [ vrid virtual-router-id ] ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
interface interface-type interface-number: Specifies an interface by its type and number.
vrid virtual-router-id: Specifies an IPv6 VRRP group by its virtual router ID in the range of 1 to 255.
Usage guidelines
· If no interface or VRRP group is specified, this command displays statistics for all IPv6 VRRP groups.
· If only an interface is specified, this command displays statistics for all IPv6 VRRP groups on the specified interface.
· If both an interface and an IPv6 VRRP group are specified, this command displays statistics for the specified IPv6 VRRP group on the specified interface.
You can use the reset vrrp ipv6 statistics command to clear statistics for IPv6 VRRP groups.
Examples
# Display statistics for all IPv6 VRRP groups when VRRP operates in standard mode.
<Sysname> display vrrp ipv6 statistics
Interface : Vlan-interface2
VRID : 1
CheckSum Errors : 0 Version Errors : 0
Invalid Pkts Rcvd : 0 Unexpected Pkts Rcvd : 0
Hop Limit Errors : 0 Advertisement Interval Errors : 0
Invalid Auth Type : 0 Auth Failures : 0
Packet Length Errors : 0 Auth Type Mismatch : 0
Become Master : 1 Address List Errors : 0
Adver Rcvd : 0 Priority Zero Pkts Rcvd : 0
Adver Sent : 425 Priority Zero Pkts Sent : 0
Global statistics
CheckSum Errors : 0
Version Errors : 0
VRID Errors : 0
# Display statistics for all IPv6 VRRP groups when VRRP operates in load balancing mode.
<Sysname> display vrrp ipv6 statistics
Interface : Vlan-interface2
VRID : 1
CheckSum Errors : 0 Version Errors : 0
Invalid Pkts Rcvd : 0 Unexpected Pkts Rcvd : 0
Hop Limit Errors : 0 Advertisement Interval Errors : 0
Invalid Auth Type : 0 Auth Failures : 0
Packet Length Errors : 0 Auth Type Mismatch : 0
Become Master : 39 Address List Errors : 0
Become AVF : 13 Packet Option Errors : 0
Adver Rcvd : 2562 Priority Zero Pkts Rcvd : 1
Adver Sent : 16373 Priority Zero Pkts Sent : 49
Request Rcvd : 2 Reply Rcvd : 10
Request Sent : 12 Reply Sent : 2
Release Rcvd : 0 VF Priority Zero Pkts Rcvd : 1
Release Sent : 0 VF Priority Zero Pkts Sent : 11
Redirect Timer Expires : 1 Time-out Timer Expires : 0
Global statistics
CheckSum Errors : 0
Version Errors : 0
VRID Errors : 0
Table 11 Command output (in standard mode)
Field |
Description |
Interface |
Interface where the VRRP group is configured. |
VRID |
VRRP group number. |
CheckSum Errors |
Number of packets with checksum errors. |
Version Errors |
Number of packets with version errors. |
Invalid Pkts Rcvd |
Number of received packets of invalid packet types. |
Unexpected Pkts Rcvd |
Number of received unexpected packets. |
Advertisement Interval Errors |
Number of packets with advertisement interval errors. |
Hop Limit Errors |
Number of packets with hop limit errors. |
Auth Failures |
Number of packets with authentication failures. |
Invalid Auth Type |
Number of packets with authentication failures because of invalid authentication types. |
Auth Type Mismatch |
Number of packets with authentication failures because of mismatching authentication types. |
Packet Length Errors |
Number of packets with VRRP packet length errors. |
Address List Errors |
Number of packets with virtual IP address list errors. |
Become Master |
Number of times that the router elected as the master. |
Priority Zero Pkts Rcvd |
Number of received advertisements with the router priority of 0. |
Adver Rcvd |
Number of received advertisements. |
Priority Zero Pkts Sent |
Number of sent advertisements with the router priority of 0. |
Adver Sent |
Number of sent advertisements. |
Global statistics |
Global statistics for all IPv6 VRRP groups. |
CheckSum Errors |
Total number of packets with checksum errors. |
Version Errors |
Total number of packets with version errors. |
VRID Errors |
Total number of packets with VRID errors. |
Table 12 Command output (in load balancing mode)
Field |
Description |
Interface |
Interface where the VRRP group is configured. |
VRID |
VRRP group number. |
CheckSum Errors |
Number of packets with checksum errors. |
Version Errors |
Number of packets with version errors. |
Invalid Pkts Rcvd |
Number of received packets of invalid packet types. |
Unexpected Pkts Rcvd |
Number of received unexpected packets. |
Advertisement Interval Errors |
Number of packets with advertisement interval errors. |
Hop Limit Errors |
Number of packets with hop limit errors. |
Auth Failures |
Number of packets with authentication failures. |
Invalid Auth Type |
Number of packets with authentication failures because of invalid authentication types. |
Auth Type Mismatch |
Number of packets with authentication failures because of mismatching authentication types. |
Packet Length Errors |
Number of packets with VRRP packet length errors. |
Address List Errors |
Number of packets with virtual IP address list errors. |
Become Master |
Number of times that the router elected as the master. |
Redirect Timer Expires |
Number of times that the redirect timer expired. |
Become AVF |
Number of times that the VF elected as the AVF. |
Time-out Timer Expires |
Number of times that the time-out timer expired. |
Adver Rcvd |
Number of received advertisements. |
Request Rcvd |
Number of received requests. |
Adver Sent |
Number of sent advertisements. |
Request Sent |
Number of sent requests. |
Reply Rcvd |
Number of received replies. |
Release Rcvd |
Number of received release packets. |
Reply Sent |
Number of sent replies. |
Release Sent |
Number of sent release packets. |
Priority Zero Pkts Rcvd |
Number of received advertisements with the router priority of 0. |
VF Priority Zero Pkts Rcvd |
Number of received advertisements with the VF priority of 0. |
Priority Zero Pkts Sent |
Number of sent advertisements with the router priority of 0. |
VF Priority Zero Pkts Sent |
Number of sent advertisements with the VF priority of 0. |
Packet Option Errors |
Number of packet option errors. |
Global statistics |
Global statistics for all IPv6 VRRP groups. |
CheckSum Errors |
Total number of packets with checksum errors. |
Version Errors |
Total number of packets with version errors. |
VRID Errors |
Total number of packets with VRID errors. |
Related commands
reset vrrp ipv6 statistics
reset vrrp ipv6 statistics
Use reset vrrp ipv6 statistics to clear statistics for IPv6 VRRP groups.
Syntax
reset vrrp ipv6 statistics [ interface interface-type interface-number [ vrid virtual-router-id ] ]
Views
User view
Predefined user roles
network-admin
Parameters
interface interface-type interface-number: Specifies an interface by its type and number.
vrid virtual-router-id: Specifies an IPv6 VRRP group by its virtual router ID in the range of 1 to 255.
Usage guidelines
· If no interface or VRRP group is specified, this command clears statistics for all IPv6 VRRP groups.
· If only an interface is specified, this command clears statistics for all IPv6 VRRP groups on the specified interface.
· If both an interface and an IPv6 VRRP group are specified, this command clears statistics for the specified IPv6 VRRP group on the specified interface.
Examples
# Clear statistics for all IPv6 VRRP groups on all interfaces.
<Sysname> reset vrrp ipv6 statistics
Related commands
display vrrp ipv6 statistics
vrrp ipv6 dscp
Use vrrp ipv6 dscp to configure a DSCP value for IPv6 VRRP packets.
Use undo vrrp ipv6 dscp to restore the default.
Syntax
vrrp ipv6 dscp dscp-value
undo vrrp ipv6 dscp
Views
System view
Predefined user roles
network-admin
Parameters
dscp-value: Specifies a DSCP value for IPv6 VRRP packets, in the range of 0 to 63. The default is 56.
Usage guidelines
The DSCP value identifies the packet priority during transmission. A greater DSCP value means a higher packet priority.
Examples
# Configure the DSCP value for IPv6 VRRP packets as 30.
<Sysname> system-view
[Sysname] vrrp ipv6 dscp 30
vrrp ipv6 mode
Use vrrp ipv6 mode to specify the operating mode for IPv6 VRRP.
Use undo vrrp ipv6 mode to restore the default.
Syntax
vrrp ipv6 mode load-balance
undo vrrp ipv6 mode
Default
IPv6 VRRP operates in standard mode.
Views
System view
Predefined user roles
network-admin
Parameters
load-balance: Specifies the load balancing mode.
Usage guidelines
When IPv6 VRRP operates in load balancing mode, the virtual IPv6 address of an IPv6 VRRP group cannot be the same as the IPv6 address of the interface where the VRRP group is configured. If the IPv6 addresses are the same, the load balancing mode cannot function.
After you create IPv6 VRRP groups on the router, you can specify their operating mode through this command. All IPv6 VRRP groups on the router operate in the specified mode.
Examples
# Specify the load balancing mode for IPv6 VRRP.
<Sysname> system-view
[Sysname] vrrp ipv6 mode load-balance
Related commands
display vrrp ipv6
vrrp ipv6 vrid
Use vrrp ipv6 vrid to create an IPv6 VRRP group and assign a virtual IPv6 address to the VRRP group or to assign a virtual IPv6 address to an existing IPv6 VRRP group.
Use undo vrrp ipv6 vrid to remove all configurations of an existing IPv6 VRRP group or to remove a virtual IPv6 address from an existing IPv6 VRRP group.
Syntax
vrrp ipv6 vrid virtual-router-id virtual-ip virtual-address [ link-local ]
undo vrrp ipv6 vrid virtual-router-id [ virtual-ip [ virtual-address [ link-local ] ] ]
Default
No IPv6 VRRP group is created.
Views
Interface view
Predefined user roles
network-admin
Parameters
virtual-router-id: Specifies an IPv6 VRRP group by its virtual router ID in the range of 1 to 255.
virtual-ip virtual-address: Specifies a virtual IPv6 address. If you do not specify this option, the undo vrrp ipv6 vrid command removes all virtual IPv6 addresses from the existing IPv6 VRRP group.
link-local: Specifies a link-local address as the virtual IPv6 address.
Usage guidelines
You can assign up to 16 virtual IPv6 addresses to an IPv6 VRRP group.
The first virtual IPv6 address that you assign for an IPv6 VRRP group must be a link-local address, and it must be removed last.
An IPv6 VRRP group can have only one link-local address as its virtual IPv6 address.
If you create an IPv6 VRRP group but do not assign any virtual IPv6 address for it, the VRRP group stays in inactive state and does not function.
The virtual IPv6 address of an IPv6 VRRP group and the downlink interface IPv6 address of the VRRP group must be in the same subnet. Otherwise, the hosts in the subnet might fail to access external networks.
Examples
# Create IPv6 VRRP group 1 and assign virtual IPv6 address fe80::10 to the VRRP group. Then assign virtual IPv6 address 1::10 to the VRRP group.
<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] vrrp ipv6 vrid 1 virtual-ip fe80::10 link-local
[Sysname-Vlan-interface2] vrrp ipv6 vrid 1 virtual-ip 1::10
Related commands
display vrrp ipv6
vrrp ipv6 vrid preempt-mode
Use vrrp ipv6 vrid preempt-mode to enable the preemptive mode for the router in an IPv6 VRRP group and configure the preemption delay time.
Use undo vrrp ipv6 vrid preempt-mode to disable the preemptive mode for the router in an IPv6 VRRP group.
Use undo vrrp ipv6 vrid preempt-mode delay to restore the default preemption delay.
Syntax
vrrp ipv6 vrid virtual-router-id preempt-mode [ delay delay-value ]
undo vrrp ipv6 vrid virtual-router-id preempt-mode [ delay ]
Default
The router operates in preemptive mode and the preemption delay is 0 centiseconds.
Views
Interface view
Predefined user roles
network-admin
Parameters
virtual-router-id: Specifies an IPv6 VRRP group by its virtual router ID in the range of 1 to 255.
delay delay-value: Specifies a preemption delay time in the range of 0 to 180000 in centiseconds. The default setting is 0 centiseconds.
Usage guidelines
In non-preemptive mode, when a router in the IPv6 VRRP group becomes the master, it acts as the master as long as it operates correctly, even if a backup is assigned a higher priority later. The non-preemptive mode helps avoid frequent switchover between the master and backups.
In preemptive mode, a backup takes over as the master and sends VRRP advertisements when it detects that it has a higher priority than the master. The previous master then becomes a backup. This mechanism makes sure the master is always the router with the highest priority.
To avoid frequent state changes among members in a VRRP group and to provide the backups enough time to collect information (such as routing information), a backup does not immediately become the master after it receives an advertisement with lower priority than the local priority. Instead, it waits for a period of time before taking over as the master.
Examples
# Enable the preemptive mode for VRRP group 1, and set the preemption delay time to 500 centiseconds.
<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] vrrp ipv6 vrid 10 preempt-mode delay 500
Related commands
display vrrp ipv6
vrrp ipv6 vrid priority
Use vrrp ipv6 vrid priority to configure the priority of the router in an IPv6 VRRP group.
Use undo vrrp ipv6 vrid priority to restore the default.
Syntax
vrrp ipv6 vrid virtual-router-id priority priority-value
undo vrrp ipv6 vrid virtual-router-id priority
Default
The priority of a router in an IPv6 VRRP group is 100.
Views
Interface view
Predefined user roles
network-admin
Parameters
virtual-router-id: Specifies an IPv6 VRRP group by its virtual router ID in the range of 1 to 255.
priority-value: Specifies a priority value in the range of 1 to 254. A higher number indicates a higher priority.
Usage guidelines
VRRP determines the role (master or backup) of each router in a VRRP group by priority. A router with a higher priority is more likely to become the master.
VRRP priority is in the range of 0 to 255, and a greater number represents a higher priority. Priorities 1 to 254 are configurable. Priority 0 is reserved for special uses, and priority 255 is for the IP address owner. The router acting as the IP address owner in a VRRP group always has a running priority of 255 and acts as the master as long as it operates correctly.
Examples
# Configure the priority of the switch in VRRP group 1 on VLAN-interface 2 as 150.
<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] vrrp ipv6 vrid 1 priority 150
Related commands
display vrrp ipv6
vrrp ipv6 vrid shutdown
Use vrrp ipv6 vrid shutdown to disable an IPv6 VRRP group.
Use undo vrrp ipv6 vrid shutdown to restore the default.
Syntax
vrrp ipv6 vrid virtual-router-id shutdown
undo vrrp ipv6 vrid virtual-router-id shutdown
Default
An IPv6 VRRP group is enabled.
Views
Interface view
Predefined user roles
network-admin
Parameters
virtual-router-id: Specifies an IPv6 VRRP group by its virtual router ID in the range of 1 to 255.
Usage guidelines
You can use this command to temporarily disable an IPv6 VRRP group. After this command is configured, the VRRP group stays in initialized state, and its configurations remain unchanged. You can change its configuration, and your changes take effect when you enable the VRRP group again.
Examples
# Disable IPv6 VRRP group 1.
<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] vrrp ipv6 vrid 1 shutdown
vrrp ipv6 vrid timer advertise
Use vrrp ipv6 vrid timer advertise to configure the interval at which the master in an IPv6 VRRP group sends VRRP advertisements.
Use undo vrrp ipv6 vrid timer advertise to restore the default.
Syntax
vrrp ipv6 vrid virtual-router-id timer advertise adver-interval
undo vrrp ipv6 vrid virtual-router-id timer advertise
Default
The master in an IPv6 VRRP group sends VRRP advertisements at an interval of 100 centiseconds.
Views
Interface view
Predefined user roles
network-admin
Parameters
virtual-router-id: Specifies an IPv6 VRRP group by its virtual router ID in the range of 1 to 255.
adver-interval: Specifies an interval for the master in the specified IPv6 VRRP group to send VRRP advertisements, in the range of 100 to 4095 centiseconds.
Usage guidelines
The master in an IPv6 VRRP group periodically sends VRRP advertisements to declare its presence. You can use this command to configure the interval at which the master sends VRRP advertisements.
H3C recommends that you set the VRRP advertisement interval to be greater than 100 centiseconds to maintain system stability.
The routers in an IPv6 VRRP group can have different intervals for sending VRRP advertisements. The master in the VRRP group sends VRRP advertisements at the specified interval and carries the interval attribute in the advertisements. After a backup receives the advertisement, it records the interval in the advertisement. If the backup does not receive a new VRRP advertisement from the master when the timer (3 × VRRP advertisement sending interval + Skew_Time) expires, it regards the master as failed and takes over as the master.
Large network traffic might disable a backup from receiving VRRP advertisements from the master within the specified time and trigger an unexpected master switchover. To solve this problem, you can use this command to configure a larger interval.
Examples
# Configure the master in IPv6 VRRP group 1 to send VRRP advertisements at an interval of 500 centiseconds.
<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] vrrp ipv6 vrid 1 timer advertise 500
Related commands
display vrrp ipv6
vrrp ipv6 vrid track
Use vrrp ipv6 vrid track to associate an IPv6 VRRP group with a track entry and control master switchover or AVF switchover in the VRRP group in response to changes (such as uplink state changes) detected by the track entry.
Use undo vrrp ipv6 vrid track to remove the association between an IPv6 VRRP group and a track entry. If no track entry is specified, the association between the VRRP group and any track entry is removed.
Syntax
vrrp ipv6 vrid virtual-router-id track track-entry-number { forwarder-switchover member-ip ipv6-address | priority reduced [ priority-reduced ] | switchover | weight reduced [ weight-reduced ] }
undo vrrp ipv6 vrid virtual-router-id track [ track-entry-number [ forwarder-switchover | priority reduced | switchover | weight reduced ] ]
Default
An IPv6 VRRP group is not associated with any track entry.
Views
Interface view
Predefined user roles
network-admin
Parameters
virtual-router-id: Specifies an IPv6 VRRP group number in the range of 1 to 255.
track-entry-number: Specifies a track entry. The track-entry-number argument is in the range of 1 to 1024.
forwarder-switchover member-ip ipv6-address: Enables the LVF on the router to take over the role of the AVF at the specified IPv6 address immediately after the specified track entry changes to the negative state. You can use the display vrrp verbose command to view the IPv6 addresses of VFs.
priority reduced priority-reduced: Reduces the priority of the router in the VRRP group by a specific value when the state of the specified track entry changes to negative. The priority-reduced argument is in the range of 1 to 255, and the default is 10.
switchover: Enables the router in backup state to take over as the master immediately after the specified track entry changes to the negative state.
weight reduced priority-reduced: Reduces the weight of all VFs on the router in the VRRP group by a specific value when the state of the specified track entry changes to negative. The weight-reduced argument is in the range of 1 to 255, and the default is 30.
Usage guidelines
When the associated track entry changes to the negative state, one of the following conditions occurs, depending on your configuration:
· The priority of the router in the VRRP group decreases by a specific value.
· The weight of VFs decreases by a specific value.
· The router immediately takes over as the master if it is a backup.
· The LVF on the router takes over the role of the AVF at the specified IPv6 address immediately.
Before executing this command, create an IPv6 VRRP group on the interface and assign a virtual IPv6 address to it.
The forwarder-switchover member-ip ipv6-address or weight reduced weight-reduced option takes effect only when the IPv6 VRRP group is operating in load balancing mode.
If the priority reduced keyword is specified but the priority-reduced argument is not specified, the priority of the router in the IPv6 VRRP group decreases by 10 when the track entry changes to negative.
If the weight reduced keyword is specified but the weight-reduced argument is not specified, the weight of the VFs on the router in the IPv6 VRRP group decreases by 30 when the track entry changes to negative.
The weight of a VF is 255, and its lower limit of failure is 10.
When the weight of a VF owner is higher than or equal to the lower limit of failure, its priority is always 255 and does not change with the weight. To guarantee that an LVF can take over the VF owner as the AVF when the upstream link of the VF owner fails, the reduced weight for the VF owner must be higher than 245 so the weight of the VF owner can drop below the lower limit of failure.
When the track entry changes from Negative to Positive or NotReady, the router automatically restores its priority or VF weight. The failed master router becomes the master again, or the failed AVF becomes active again.
|
IMPORTANT: · The vrrp ipv6 vrid track priority reduced or vrrp ipv6 vrid track switchover command cannot take effect on an IP address owner. If you have configured the command on an IP address owner, the configuration takes effect after the router changes to be a non-IP address owner. · You can create a track entry with the track command before or after you associate it with an IPv6 VRRP group. For more information about configuring track entries, see High Availability Configuration Guide. |
Examples
# Associate IPv6 VRRP group 1 on VLAN-interface 2 with track entry 1 and decrease the priority of the router in the VRRP group by 50 when the state of track entry 1 changes to negative.
[Sysname] interface Vlan-interface2
[Sysname-Vlan-interface2] vrrp vrid 1 track 1 priority reduced 50
# Associate IPv6 VRRP group 1 on VLAN-interface 2 with track entry 1 and enable the VF in listening state whose AVF is on the member device with the IPv6 address of 11::22 to take over immediately after the specified track entry changes to the negative state.
[Sysname-Vlan-interface2] vrrp ipv6 vrid 1 track 1 forwarder-switchover member-ip 11::22
# Associate IPv6 VRRP group 1 on VLAN-interface 2 with track entry 1 and decrease the weight of all VFs on the router in the IPv6 VRRP group by 50 when the state of track entry 1 changes to negative.
[Sysname-Vlan-interface2] vrrp ipv6 vrid 1 track 1 weight reduced 50
Related commands
display vrrp ipv6