vrrp vrid authentication-mode
Syntax
vrrp vrid virtual-router-id authentication-mode { md5 | simple } [ cipher ] key
undo vrrp vrid virtual-router-id authentication-mode
View
Interface view
Default level
2: System level
Parameters
virtual-router-id: VRRP group number, which ranges from 1 to 255.
md5: Specifies the MD5 authentication mode.
simple: Specifies the simple authentication mode.
cipher: Sets a ciphertext authentication key.
key: Set the authentication key. This argument is case sensitive.
When md5 authentication applies, it must be a plaintext string of 1 to 8 characters or a ciphertext string of 24 characters if the cipher keyword is not specified; or a ciphertext string of 1 to 41 characters if the cipher keyword is specified.
When simple authentication applies, it must be a plaintext string of 1 to 8 characters if the cipher keyword is not specified; or a ciphertext string of 1 to 41 characters if the cipher keyword is specified.
Description
Use vrrp vrid authentication-mode to configure authentication mode and authentication key for a VRRP group to send and receive VRRP packets.
Use undo vrrp vrid authentication-mode to restore the default.
By default, authentication is disabled.
For secrecy, all keys, including keys configured in plain text, are saved in cipher text.
Before executing the command, create a VRRP group on an interface and configure the virtual IP address of the VRRP group.
You can configure different authentication modes and authentication keys for the VRRP groups on an interface. However, the members of the same VRRP group must use the same authentication mode and authentication key.
If you specify VRRPv3 as the version for an interface, the authentication configuration on the VRRP group does not take effect.
Related commands: display vrrp.
Examples
# Set the authentication mode to simple and authentication key to Sysname for VRRP group 1 on VLAN-interface 2 to send and receive VRRP packets.
<Sysname> system-view [Sysname] interface vlan-interface 2 [Sysname-Vlan-interface2] vrrp vrid 1 virtual-ip 10.1.1.1 [Sysname-Vlan-interface2] vrrp vrid 1 authentication-mode simple Sysname