VRRP Commands
This chapter describes the commands for VRRP.
accept-mode
Use this command to enable/disable accept mode for the session.
Controls whether a VRRP master node will accept/respond to packets addressed to the Virtual-IP address as its own address if it is not the Virtual-IP Owner.
Command Syntax
accept-mode true
accept-mode false
Parameter
None
Default
By default, accept-mode for the session is enabled
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
# configure terminal
(config)#router vrrp 2 eth2
(config-router)#accept-mode True
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: Higher-priority master routers with slower transmission rates than their backup routers are unstable. This is because low-priority nodes configured to faster rates could come online and decide they should be masters before they have heard anything from the higher-priority master with a slower rate. When this happens, it is temporary: once the lower-priority node does hear from the higher-priority Mmaster, it will relinquish mastership.
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
Use this command to enable authentication of VRRPv2 packets received from other routers in the group.
If configured, all routers within the VRRP group must use the same authentication string.
Authentication is supported only for VRRPv2 packets. V2-compatibility must be enabled.
Use the no form of this command to remove text 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
(config)#
(config)#router vrrp 1 eth3
(config-router)#v2-compatible
(config-router)#authentication text abc_123
(config-router)#end
#
(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 parameter with this command to disable this feature.
Command Syntax
circuit-failover [IFNAME] |<1-253>
no circuit-failover [IFNAME] |<1-253>
Parameters
IFNAME
Specify an 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>
Specify the 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 feature 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
ipv4-exclude-pseudo-header
Use this command to exclude the pseudo-header in IPv4 VRRPv3 checksum calculation on the VRRP group in router mode to support IPv4 VRRPv3 interoperability.
Note: Use this command when checksum errors are observed with other vendors for VRRPv3.
Use the no form of this command to delete the VRRP IPv4 checksum pseudo-header exclude configuration from the VRRP group on the router.
Command Syntax
ipv4-exclude-pseudo-header
Parameter
None
Default
Disabled
Command Mode
Router mode
Applicability
This command was introduced in OcNOS-SP version 2.4.
Examples
#configure terminal
(config)#router vrrp 2 eth2
(config-router)#ipv4-exclude-pseudo-header
#configure terminal
(config)#router vrrp 2 eth2
(config-router)#no ipv4-exclude-pseudo-header
ip pim redundancy
Use this command to set the priority for which a router is elected as the designated router (DR).
Note: This command should be applied to the all related VRRP routers with identical priority values.
Command Syntax
ip pim redundancy <1-255> vrrp dr-priority <0-4294967294>
no ip pim redundancy vrrp
Parameter
<1-255>
VRRP virtual router identifier
<0-4294967294>
DR priority
Command Mode
Interface mode
Applicability
This command was introduced in OcNOS version 4.0.
Examples
#configure terminal
(config)#interface eth0
(config-if)#ip pim redundancy 1 vrrp dr-pripiroty 900
(config)#interface eth0
(config-if)#no ip pim redundancy vrrp
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 to use by this VRRP router in master election. The value of 255 (decimal) is reserved for the router that owns the IP 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.
Use the no parameter with this command to restore the default setting.
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 50
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 vrrpv6
Use this command to show the running configuration for VRRPv6.
Command Syntax
show running-config router vrrpv6
Parameters
None
Command Mode
Exec mode
Applicability
This command was introduced before OcNOS version 3.0.
Example
#show running-config vrrpv6
!
vrrp vmac disable
!
!
router ipv6 vrrp 1 eth1
virtual-ipv6 fe80::c0
enable
!
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-91 Explains the show command output fields.
Table 1-91: 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 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-92 explains the show command output fields.
Table 1-92: 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
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
#show vrrp 7 eth0
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
VRRP Global Statistics
Checksum Errors : 0
Version Errors : 0
VRid Errors : 0
Discontinuity Time: 00 hour, 00 min, 00 sec
#show 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
track decrement
Use this command to decrement the priority value during a down event.
Use the no form of this command to not decrement the priority value during a down event.
Command Syntax
track <0-500> decrement <1-253>
no track <1-500>
Parameters
<1-500>
Identifier of the tracked object.
<1-253>
Priority delta value. The value by which the virtual router decrement its priority value during a down event. Configure this value to be greater than the difference of priorities between the master and backup routers.
Command Mode
VRRP router Mode
Applicability
This command was introduced in OcNOS version 5.1
Example
(config)#router vrrp 1 eth1
(config-router)#virtual-ip 11.0.0.5
(config-router)#track 1 decrement 30
undebug vrrp
Use this command to disable debugging options for VRRP.
Command Syntax
undebug vrrp (all|event|packet [send|recv|])
no undebug 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
Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#undebug vrrp all
The example below shows how to disable debug options for VRRP events.
#undebug vrrp events
The example below shows how to disable debug options for VRRP packets sent.
#undebug vrrp packet send
The example below shows how to disable debug options for VRRP packets received.
#undebug vrrp packet recv
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 (owner|)
Parameters
A.B.C.D
Virtual IP address of the interface that participates in virtual routing.
owner
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 ipv4-exclude-pseudo-header
Use this command to excludes the pseudo-header in IPv4 VRRPv3 checksum calculation on the VRRP groups in configuration mode to support IPv4 VRRPv3 interoperability.
Note: Use this command when checksum errors are observed with other vendors for VRRPv3.
Command Syntax
vrrp ipv4-exclude-pseudo-header (enable| disable)
Parameters
enable
Enable ipv4-exclude-pseudo-header
disable
Disable ipv4-exclude-pseudo-header
Default
By default, VRRP includes the pseudo header in checksum calculation.
Command Mode
Configure mode
Applicability
This command was introduced in OcNOS-SP version 2.4.
Examples
#configure terminal
(config)#vrrp ipv4-exclude-pseudo-header enable
#configure terminal
(config)#vrrp ipv4-exclude-pseudo-header disable
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