vrrp authentication
To authenticate Virtual Router Redundancy Protocol (VRRP) packets received from other routers in the group, use the vrrp authentication command in interface configuration mode. To disable VRRP authentication, use the no form of this command.
vrrp group authentication {text-string | text text-string | md5 {key-chain key-chain | key-string [0 | 7] key-string [timeout seconds]}}
no vrrp group authentication {text-string | text text-string | md5 {key-chain key-chain | key-string [0 | 7] key-string [timeout seconds]}}
Syntax Description
group |
Virtual router group number for which authentication is being configured. The group number is configured with the vrrp ip command. The valid range is 1 to 255. |
||
text-string |
Plain text authentication. There is no default value. |
||
text text-string |
Plain text authentication. The text-string argument is the authentication string and can be up to eight alphanumeric characters. There is no default value. |
||
md5 |
Message digest 5 (MD5) authentication. The arguments and keywords are as follows:
|
Command Default
VRRP authentication is disabled.
Command Modes
Interface configuration (config-if)
Command History
Release |
Modification |
---|---|
12.0(18)ST |
This command was introduced. |
12.0(22)S |
This command was integrated into Cisco IOS Release 12.0(22)S. |
12.2(15)T |
This command was integrated into Cisco IOS Release 12.2(15)T. |
12.2(14)S |
This command was integrated into Cisco IOS Release 12.2(14)S. |
12.3(14)T |
The md5 , key -string , 0 , 7 , and key -chain keywords were added. The text-string , key-string , and key-chain arguments were added. |
12.2(33)SRA |
This command was integrated into Cisco IOS Release 12.2(33)SRA. |
12.2(31)SB2 |
This command was integrated into Cisco IOS Release 12.2(31)SB2. |
12.2(31)SG |
This command was integrated into Cisco IOS Release 12.2(31)SG. |
12.2(17d)SXB |
This command was integrated into Cisco IOS Release 12.2(17d)SXB. |
Cisco IOS XE Release 2.1 |
This command was integrated into Cisco IOS XE Release 2.1. |
Usage Guidelines
VRRP does not accept a virtual router group number 0 and never has an empty group. The valid range for the VRRP group is 1 to 255.
When a VRRP packet arrives from another router in the VRRP group, its authentication string is compared to the string configured on the local system. If the strings match, the message is accepted. If they do not match, the packet is discarded. The authentication string is sent unencrypted in all VRRP messages when using the vrrp authentication text text-string option.
All routers within the VRRP group must be configured with the same authentication string. If the same authentication string is not configured, the routers in the VRRP group will not communicate with each other and any misconfigured router in the group will change its state to master.
If password encryption is configured with the service password-encryption command, the software saves the key-string as encrypted text.
Note |
Plain text authentication is not meant to be used for security. It simply provides a way to prevent a router that does not belong to a configured VRRP group from participating in it. |
The timeout seconds keyword and argument specify the duration that the VRRP group will accept message digests based on both the old and new keys. This option allows time for configuration of all routers in a group with the new key. VRRP route flapping can be minimized by changing the keys on all the routers, provided that the master router is changed last. The master router should have its key string changed no later than one holdtime period, specified by the vrrp timers advertise interface configuration command, after the backup routers. This procedure ensures that the backup routers do not time out the master router.
Examples
The following example shows how to configure an authentication text string of x30dn78k:
Router(config-if)# vrrp 1 authentication x30dn78k
The following example shows how to configure an MD5 key string:
Router(config)# interface Ethernet0/1
Router(config-if)# description ed1-cat5a-7/10
Router(config-if)# vrrp 1 ip 10.21.0.10
Router(config-if)# vrrp 1 priority 110
Router(config-if)# vrrp 1 authentication md5 key-string f00c4s
The key ID for key-string authentication is always zero. If a key chain is configured with a key ID of zero, then the following configuration will work:
Examples
Router(config)# key chain vrrp1
Router(config-keychain)# key 0
Router(config-keychain-key)# key-string 54321098452103ab
!
Router(config)# interface Ethernet0/1
Router(config-if)# vrrp 1 ip 10.21.0.10
Router(config-if)# vrrp 1 authentication md5 key-chain vrrp1
Examples
Router(config)# interface Ethernet0/1
Router(config-if)# vrrp 1 ip 10.21.0.10
Router(config-if)# vrrp 1 authentication md5 key-string 54321098452103ab