OcNOS-DC : Layer 3 Guide : Virtual Router Redundancy Protocol Command Reference : VRRP Commands
VRRP Commands
This chapter describes the commands for VRRP.
enable
accept-mode
Use this command to enable accept mode for the session
Use the no parameter with this command to restore the default setting.
Command Syntax
accept-mode true
accept-mode false
Parameter
None
Default
By default, accept mode for the session is disabled
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
The example below shows how to set and unset the accept mode.
#configure terminal
(config)#router vrrp 2 eth0
(config-router)#accept-mode false
advertisement-interval
Use this command to configure the advertisement interval of a virtual router. This is the length of time, in seconds, between each advertisement sent from the master to its backup(s). The master virtual router sends VRRP advertisements to other VRRP routers in the same group. The advertisements communicate the priority and state of the master virtual router. The VRRP advertisements are encapsulated in IP packets and sent to the multicast address assigned to the VRRP group (224.0.0.18). Advertisements are sent every second by default.
Note: VRRP Master router and backup routers should be configured with the same advertisement interval. If there is a mismatch in the configuration, VRRP goes to the INIT state.
Use the no parameter with this command to restore the default setting.
Command Syntax
advertisement-interval <5-4095>
no advertisement-interval
Parameter
<5-4095>
Specify the advertisement interval in centi-seconds (in multiples of 5) when VRRPv3 is enabled
Default
By default, advertisements are sent every second
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
The example below shows how to configure an advertisement interval of 50 centi-seconds for the virtual router with VR ID 2 on interface eth0.
#configure terminal
(config)#router ip vrrp 2 eth0
(config-router)#advertisement-interval 50
authentication text
Authenticates VRRPv2 packets received from other routers in the group. If configured authentication, all routers within the VRRP group must use the same authentication string. Authentication is supported only for VRRPv2 packets. V2-compatibility must be enabled.
If both master and backup having same authentication, then one node act as master and another node act as a backup based on priority. If both master and backup having different authentication, both nodes acting as a master.
Use the no parameter with this command to remove an authentication.
Command Syntax
authentication text TEXT-STRING
no authentication text
Parameter
TEXT-STRING
Password, maximum eight alphanumeric characters
Default
By default, authentication is disabled.
Command Mode
Router mode
Applicability
This command was introduced in OcNOS version 4.2.
Examples
#configure terminal
(config)#router vrrp 1 eth3
(config-router)#v2-compatible
(config-router)#authentication text abc_123
(config-router)#end
 
#configure terminal
(config)#router vrrp 1 eth3
(config-router)#no authentication text
(config-router)#end
 
 
circuit-failover
Use this command to enable the VRRP circuit-failover feature.
Use the no form of this command to disable this feature.
Command Syntax
circuit-failover IFNAME <1-253>
no circuit-failover (IFNAME|)
Parameters
IFNAME
Interface of the router that is monitored by the virtual router. This is usually an upstream interface. Should the interface go down, another router, configured as backup within the VRRP group, may take over as a master.
<1-253>
Priority delta value. The value by which the virtual router decrements its priority value during a circuit failover event. Configure this value to be greater than the difference of priorities between the master and backup routers.
Default
By default, circuit failover is disabled.
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
The example below shows how to configure circuit failover for the VRRP session with VR ID 1. Interface eth1 is considered the monitored interface.
#configure terminal
(config)#router vrrp 1 eth0
(config-router)#circuit-failover eth1 30
 
 
debug vrrp
Use this command to specify debugging options for VRRP.
Use the no parameter with this command to disable debugging.
Command Syntax
debug vrrp (all|event|packet [send|recv|])
no debug vrrp (all|event|packet [send|recv|])
Parameters
all
Specify debugging options for all VRRP events.
event
Specify debugging options for VRRP event troubleshooting.
packet
Specify debugging options for VRRP packets
send
Specify the debug option set for sent packets.
recv
Specify the debug option set for received packets.
Command Mode
Configure mode and Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
The example below shows how to enable all VRRP debug options.
#configure terminal
(config)#debug vrrp all
 
The example below shows how to enable debugging options for VRRP events.
#configure terminal
(config)#debug vrrp events
 
The example below shows how to enable debug options for VRRP packets sent.
#configure terminal
(config)#debug vrrp packet send
The example below shows how to enable debug options for VRRP packets received.
#configure terminal
(config)#debug vrrp packet recv
disable
Use this command to disable a VRRP session on the router (to stop the router from participating in virtual routing). When this command is configured, a backup Router assumes the Role of Master depending on its priority.
Command Syntax
disable
Parameters
None
Default
By default, VRRP session on the router is disabled
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
The example below shows how to disable a VRRP session.
#configure terminal
(config)#router vrrp 1 eth0
(config-router)#disable
enable
Use this command to enable a VRRP session on the router (to make it participate in virtual routing). To make any changes to the VRRP configuration, first disable the router from participating in virtual routing using the disable command.
Note: Configure the virtual IP address and define an interface for the VRRP session (using the virtual-ip and interface commands) before using this command.
Command Syntax
enable
Parameters
None
Default
By default, VRRP session on the router is disabled
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
The example below shows how to enable a VRRP session with VR ID 1 on interface eth0.
#configure terminal
(config)#router vrrp 1 eth0
(config-router)#enable
 
operational-ip
Use this command to set the primary IPv4 address.
Use the no parameter with this command to remove a primary IPv4 address.
Command Syntax
operational-ip A.B.C.D
no operational-ip
Parameters
A.B.C.D
IPv4 address.
Default
No default value is specified
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config)#router vrrp 1 eth0
(config-router)#operational-ip 1.2.3.4
preempt-mode
Use this command to configure preempt mode. If set to true, the highest priority backup is always the master when the default master is unavailable. If set to false, a higher priority backup does not preempt a lower priority backup which is acting as master.
When the master router fails, the backup routers come online in priority order — highest to lowest. Preempt mode set to true allows a higher priority backup router to relieve a lower priority backup.
By default, a preemptive scheme is enabled whereby a higher priority backup virtual router that becomes available takes over for the backup virtual router that was elected to become master virtual router. This preemptive scheme can be disabled using the preempt-mode false command. If preemption is disabled, the backup virtual router that is currently elected as Master does not transition to backup again when the alternate backup router with higher priority becomes available.
Command Syntax
preempt-mode (true|false)
Parameters
true
Specify that preemption is enabled.
false
Specify that preemption is disabled.
Default
By default, preempt mode is true
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
The example below shows how to enable the preempt mode.
#configure terminal
(config)#router vrrp 1 eth0
(config-router)#preempt-mode false
 
#configure terminal
(config)#router vrrp 1 eth0
(config-router)#preempt-mode true
priority
Use this command to configure the priority of a virtual router. The value of 255 (decimal) is reserved for the router that owns the IPvX address associated with the virtual router. The value of 0 (zero) is reserved for the Master router to indicate it is releasing responsibility for the virtual router. Higher values indicate higher priorities. Priority value to be used by this VRRP router in Master election
If the priority is high, the highest priority acts as a master. If the priority is low, lowest priority which is acting as backup.
Use the no parameter with this command to remove a priority and set the default value.
Command Syntax
priority <1-254>
no priority
Parameter
<1-254>
Priority of a virtual router.
Default
100 (non-owner)
255 (owner)
Command Mode
Router mode
Applicability
This command was introduced in OcNOS version 4.2.
Examples
The example below shows how to configure priority 50 for the virtual router with VR ID 2 on interface eth0.
#configure terminal
(config)#router ip vrrp 2 eth0
(config-router)#priority 200
 
router vrrp
Use this command to enable a VRRP routing process.
Use the no form of this command to disable a VRRP routing process.
Command Syntax
router vrrp <1-255> IFNAME
no router vrrp <1-255> IFNAME
Parameters
<1-255>
Virtual router identifier
IFNAME
Interface name
Default
No default value is specified
Command Mode
Configure mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#configure terminal
(config)#router vrrp 1 eth0
show debugging vrrp
Use this command to display the set VRRP debugging option.
Command Syntax
show debugging vrrp
Parameters
None
Command Mode
Exec mode and Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#show debugging vrrp
VVRRP debugging status:
VRRP event debugging is on
VRRP packet debugging is on
show running-config router vrrp
Use this command to show the running configuration for VRRP.
Command Syntax
show running-config router vrrp
Parameters
None
Command Mode
Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
The example below shows the running configuration of VRRP. Virtual Router is configured as Master and Owner of IP address.
#show running-config router vrrp
!
router vrrp 1 eth0
virtual-ip 39.0.0.24 owner
advertisement-interval 5
preempt-mode false
enable
!
show vrrp
Use this command to display a list of virtual router identifiers that are configured on the router.
Command Syntax
show vrrp
Parameters
None
Command Mode
Exec mode and Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#show vrrp
 
R1#show vrrp
VrId <1>
State is Master
Virtual IP is 10.10.12.6 (IP owner)
Interface is eth0
Priority is 255
Advertisement interval: 5 centi sec
Preempt mode is TRUE
R2#show vrrp
VrId <1>
State is Backup
Virtual IP is 10.10.12.6 (Not IP owner)
Interface is eth0
Priority is 100
Advertisement interval: 5 centi sec
Preempt mode is TRUE
 
Table 1-82 Explains the show command output fields.
Table 1-82: show vrrp output fields
Field
Description
VrID
Type of vr identifier by the system on the interface.
State
VRRP State:
Master — The interface is acting as the master router interface.
Backup —The interface is acting as the backup router interface.
Virtual IP
List of virtual IP addresses configured on the interface.
Interface
Name of the logical interface.
Priority
Configured VRRP priority for the interface.
Advertisement interval
Configured VRRP advertisement interval.
Preempt mode
Whether preemption is allowed on the interface.
 
show vrrp summary
Use this command to display a brief list of virtual router identifiers that are configured on the router.
Command Syntax
show vrrp summary
Parameters
None
Command Mode
Exec mode and Privileged Exec mode
Applicability
This command was introduced in OcNOS-SP version 4.2.
Example
#show vrrp summary
VRRP Version: 3
VMAC enabled
Backward Compatibility disabled
 
Interface Admin IpVersion VRGroup VRState Priority VIP InterfaceIp
eth3 Up IPv4 255 Master 255 66.0.0.1 66.0.0.1
eth3 Up IPv6 1 Master 250 fe80::1 fe80::2
Total Number of IPv4 VRRP group 1
Total Number of IPv6 VRRP group 1
 
Table 1-83 explains the show command output fields.
Table 1-83: show vrrp summary output fields
Field
Description
interface
Interface name on which vrrp session is active.
Admin
Administrative state of the session Up/Down.
IpVersion
Internet protocol version IPv4 or IPv6.
VRGroup
Vrrp Group the router is part of.
priority
Configured VRRP priority for the interface.
VRState
VRRP State:
Master - The interface is acting as the master router interface.
Backup -The interface is acting as the backup router interface.
VIP
List of virtual IP addresses configured on the interface.
InterfaceIp
Primary IP address on the interface.
show vrrp <1-255>
Use this command to display VRRP information for a virtual router.
Command Syntax
show vrrp <1-255> IFNAME
Parameters
<1-255>
Virtual router identifier
IFNAME
Interface name
Command Mode
Exec mode and Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
R1#show vrrp 7 xe1
VRRP Version: 3
 
VMAC enabled
 
Backward Compatibility disabled
 
Address family IPv4
 
VRRP Id: 7 on interface: xe1
 
State: AdminUp - Master
 
Virtual IP address: 10.10.10.81 (Owner)
 
Priority is 255
 
Advertisement interval: 100 centi sec
 
Master Advertisement interval: 100 centi sec
 
Skew time: 0 centi sec
 
Accept mode: FALSE
 
Preempt mode: TRUE
 
Multicast membership on IPv4 interface xe1: JOINED
 
 
 
 
 
R2#show vrrp 7 xe1
 
VRRP Version: 3
 
VMAC enabled
 
Backward Compatibility disabled
 
Address family IPv4
 
VRRP Id: 7 on interface: xe1
 
State: AdminUp - Backup
 
Virtual IP address: 10.10.10.81 (Not-Owner)
 
Priority is 100
 
Advertisement interval: 100 centi sec
 
Master Advertisement interval: 100 centi sec
 
Skew time: 0 centi sec
 
Accept mode: FALSE
 
Preempt mode: TRUE
 
Multicast membership on IPv4 interface xe1: JOINED
show vrrp (global | ipv4) statistics
Use this command to display VRRP global or ipv4 router statistics.
Command Syntax
show vrrp (global | ipv4 ) statistics
Parameters
global
Global (VRRP Router)
ipv4
VRRP IPv4 router
Command Mode
Exec mode and Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.8.
Example
#show vrrp global statistics
RRP Global Statistics
Checksum Errors : 0
Version Errors : 0
VRid Errors : 0
Discontinuity Time: 00 hour, 00 min, 00 sec
 
 
#sh vrrp ipv4 statistics
Address family IPv4
VRRP Id: 1 on interface: xe1
Master Transitions: 0
Advertisements Rcvd: 0
Pkts Rcvd with IP TTL Errors: 0
Pkts Rcvd with Zero Priority: 0
Pkts Sent with Zero Priority: 0
Pkts Rcvd with Invalid TYPE: 0
Pkts Rcvd with Packet Length Errors: 0
Pkts Rcvd with IP Count Mismatch: 0
Discontinuity Time: 00 hour, 00 min, 00 sec
Refresh Rate: 1000 ms
snmp restart vrrp
Use this command to restart SNMP in Virtual Routing Redundancy Protocol (VRRP).
Command Syntax
snmp restart vrrp
Parameters
None
Default
By default, SNMP restart is disabled
Command Mode
Configure mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#configure terminal
(config)#snmp restart vrrp
 
switch-back-delay
Use this command to set a switch-back delay timer for the master VRRP router. This feature prevents the original master VRRP router from transitioning back to the master state after coming back online until the configured delay timer has expired.
Command Syntax
switch-back-delay <1-500000>
no switch-back-delay
Parameters
<1-500000>
Specify a switch-back delay in milliseconds.
Command Mode
Router mode
Default
By default, the switch-back delay is set to 0
Applicability
This command was introduced before OcNOS version 1.3.
Examples
The example below shows how to set a switch-back delay timer of 7000 milliseconds.
#configure terminal
(config)#router vrrp 5 eth1
(config-router)#switch-back-delay 7000
 
virtual-ip
Use this command to set the virtual IP address for the VRRP virtual router as VRRP Owner. This is the IP address used by end hosts to address their default gateway.
The VRRP Owner of the Virtual IP address only responds to packets destined to the Virtual IP address (for example, ICMP packets destined to the Virtual IP address).
Use the no parameter with this command to remove a virtual IP address assignment.
Syntax Description
virtual-ip A.B.C.D (owner|)
no virtual-ip
Parameters
A.B.C.D
Specify the virtual IP address of the interface that participates in virtual routing.
owner
Specify the IP address as the owner.
Default
No default value is specified
Command Mode
Router mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
The example below shows how to configure the router as VRRP owner.
#configure terminal
(config)#router vrrp 1 eth0
(config-router)#virtual-ip 10.10.20.30 owner
The example below removes the virtual IP address assignment.
#configure terminal
(config)#router vrrp 1 eth0
(config-router)#no virtual-ip
vrrp compatible-v2
Use this command to enable the backward-compatibility feature. When enabled, both VRRPv3 and VRRPv2 inter-operation are supported.
Command Syntax
vrrp compatible-v2 (enable| disable)
Parameters
enable
Enable VRRPv2 inter-operation
disable
Disable VRRPv2 inter-operation
Default
By default, vrrp compatible-v2 is enabled
Command Mode
Configure mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#configure terminal
(config)#vrrp compatible-v2 enable
vrrp vmac
Use this command to enable or disable Virtual MAC (VMAC).
This command affects all VRRP groups in a router. On a single network segment, multiple VRRP groups can be configured, each using a different VMAC. The use of VMAC addressing allows for faster switchover when a backup router assumes the master role. When this command is used to enable a VMAC, the virtual router forwards packets with a special-purpose multicast VMAC address (0:0:5e:0:01:<VR ID>). Otherwise, it forwards with is interface’s physical address.
The VMAC address is assigned to a router interface at the time the VRRP group is enabled in the router.
Command Syntax
vrrp vmac (enable|disable)
Parameters
enable
Enable virtual MAC addressing.
disable
Disable virtual MAC addressing and use physical MAC addressing.
Default
By default, VMAC is disabled
Command Mode
Configure mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
The example below shows how to enable a virtual MAC address on the router.
#configure terminal
(config)#vrrp vmac enable
The example below shows how to disable a virtual MAC address on the router.
#configure terminal
(config)#vrrp vmac disable