vrrp vrid authentication-mode
Function
The vrrp vrid authentication-mode command configures an authentication mode and an authentication key for a VRRP group.
The undo vrrp vrid authentication-mode command cancels the authentication mode and authentication key for a VRRP group.
By default, a VRRP group uses non-authentication.
Format
vrrp vrid virtual-router-id authentication-mode { simple { key | plain key | cipher cipher-key } | md5 md5-key }
undo vrrp vrid virtual-router-id authentication-mode
Parameters
Parameter |
Description |
Value |
---|---|---|
vrid virtual-router-id |
Specifies the VRID of a VRRP group. |
The value is an integer that ranges from 1 to 255. |
simple |
Indicates simple authentication. |
- |
key |
Specifies the authentication key for simple authentication. |
The value is a string of 1 to 8 case-sensitive characters without spaces. |
plain key |
Specifies the authentication key in plain text authentication mode. |
The value is a string of 1 to 8 case-sensitive characters without spaces. |
cipher cipher-key |
Specifies the authentication key in cipher text authentication mode. |
The value is a string of 1 to 8 characters in plain text or a string of 32 or 48 characters in cipher text, without spaces. |
md5 md5-key |
Specifies the authentication key in MD5 authentication mode. Characters ^#^# and $@$@ are used to identify passwords with variable lengths. Characters ^#^# are the prefix and suffix of a new password, and characters $@$@ are the prefix and suffix of an old password. Neither of them can be both configured at the beginning and end of a plain text password. |
The value is a string of 1 to 8 characters in plain text or a string of 24, 32 or 48 characters in cipher text, without spaces. |
Usage Guidelines
Usage Scenario
To be compatible with VRRP defined in RFC 2338 and interwork with other devices, VRRP provides simple authentication and MD5 authentication. The vrrp vrid authentication-mode command configures an authentication mode and an authentication key for a VRRP group.
Prerequisites
A VRRP group has been configured on a specified interface.
Precautions
Devices in a VRRP group must be configured with the same authentication mode and authentication key; otherwise, the VRRP group cannot negotiate the Master and Backup status.
Example
# Set the authentication mode of the VRRP group with VRID 1 on VLANIF100 to simple text authentication and set the authentication key to huawei.
<AC6605> system-view [AC6605] interface vlanif 100 [AC6605-Vlanif100] vrrp vrid 1 virtual-ip 10.1.1.1 [AC6605-Vlanif100] vrrp vrid 1 authentication-mode simple huawei
# Set the authentication mode of the VRRP group with VRID 2 on VLANIF100 to MD5 authentication and set the authentication key to hello.
<AC6605> system-view [AC6605] interface vlanif 100 [AC6605-Vlanif100] vrrp vrid 2 virtual-ip 10.2.1.1 [AC6605-Vlanif100] vrrp vrid 2 authentication-mode md5 hello