IP Routing – VRRP

clear vrrp counters

To clear the VRRP counters, use the clear vrrp counters command in Privileged EXEC mode.

Syntax

clear vrrp counters [interface-id]

Parameters

  • interface-id—(Optional) Interface Identifier.

Default Configuration No description.

Command Mode

Privileged EXEC mode

User Guidelines

Use this command without the identifier-id argument to clear the VRRP counters of all interfaces where Virtual routers are running.

Use this command with the identifier-id argument to clear the VRRP counters of the specified interface.

Example

The following example shows how to clear the counters of all VRRP virtual routers running on VLAN 10:

switchxxxxxx# clear vrrp counters vlan10

show vrrp

To display a brief or detailed status of one or all configured VRRP virtual routers, use the show vrrp command in Privileged EXEC mode.

Syntax

show vrrp [all | brief | interface interface-id]

Parameters

  • all—(Optional) Provides VRRP virtual router information about all VRRP virtual routers, including virtual routers in disable status. If no keyword is configured, the all keyword is applied.
  • brief—(Optional) Provides a summary view of the VRRP virtual router information
  • interface interface-id—(Optional) Interface identifier

Command Mode

Privileged EXEC mode

User Guidelines

Use this command with the all keyword or without keywords to display the VRRP status of all configured VRRP virtual routers.

Use this command with the identifier-id argument to clear the VRRP counters of the specified interface.

Examples

Example 1. The following example displays a detailed VRRP status of all configured VRRP virtual routers:

switchxxxxxx# show vrrp Interface: VLAN 10 Virtual Router 1 Virtual Router name CLUSTER1 Supported version is VRRPv3 State is Master Virtual IP addresses are 10.2.0.10, 10.3.0.10(down) Source IP address is 10.3.0.20 is down; a default Source IP address of 10.2.0.10 is applied Virtual MAC address is 00:00:5e:00:01:01 Advertisement interval is 3.000 sec Preemption enabled Priority is 100 Master Router is 10.3.0.20 (local), priority is 100 Master Advertisement interval is 3.000 sec Master Down Interval is 10.828 sec Interface: VLAN 10 Virtual Router 2 Supported version is VRRPv3 State is Master Virtual Router name CLUSTER2 Virtual IP addresses are 10.4.0.20, 10.5.0.20 Source IP address is 10.4.0.20(default) Virtual MAC address is 00:00:5e:00:01:02 Advertisement interval is 1.000 sec Preemption enabled Priority is 255 Master Router is 10.4.0.20 (local), priority is 255 Master Advertisement interval is 1.000 sec Master Down Interval is 3.629 sec Skew Time is 1.000 sec Interface: VLAN 50 Virtual Router 1 Supported version is VRRPv3 State is Backup Virtual Router name CLUSTER3 Virtual IP addresses are 10.6.0.10 Source IP address is 10.6.0.20(default) Virtual MAC address is 00:00:5e:00:01:01 Advertisement interval is 1.000 sec Preemption enabled Priority is 95 Master Router is 10.6.0.10, priority is 255 Master Advertisement interval is 1.000 sec Master Down Interval is 3.629 sec Skew Time is 0.628 sec Interface VLAN 400 Virtual Router 4 Supported version is VRRPv3 State is Initializing Virtual Router name CLUSTER4 Virtual IP addresses are 10.7.0.10 Source IP address is 10.7.0.20 Virtual MAC address is 00:00:5e:00:01:03 Advertisement interval is 1.000 sec Preemption enabled Priority is 150

Example 2. The following example displays a detailed VRRP status of VRRP virtual routers running on VLAN 10:

switchxxxxxx# show vrrp interface vlan10 Interface: VLAN 10 Virtual Router 1 Virtual Router name CLUSTER1 Supported version is VRRPv3 State is Master Virtual IP addresses are 10.2.0.10, 10.3.0.10 Source IP address is 10.3.0.20 Virtual MAC address is 00:00:5e:00:01:01 Advertisement interval is 3.000 sec Preemption enabled Priority is 100 Master Router is 10.3.0.10 (local), priority is 100 Master Advertisement interval is 3.000 sec Master Down Interval is 10.828 sec Interface: VLAN 10 Virtual Router 2 Supported version is VRRPv3 State is Master Virtual Router name CLUSTER2 Virtual IP addresses are 10.4.0.10, 10.5.0.10 Source IP address is 10.4.0.10 Virtual MAC address is 00:00:5e:00:01:02 Advertisement interval is 1.000 sec Preemption enabled Priority is 95 Master Router is 10.4.0.10 (local), priority is 95 Master Advertisement interval is 1.000 sec Master Down Interval is 3.629 sec

Example 3. The following example displays a brief VRRP status of all configured VRRP virtual routers:

switchxxxxxx# show vrrp brief State (S): I - Initialize; M - Master; B - Backup Preempt (P): Y - Yes; N - No Interface VR  Virtual        Pri Timer P St Ver Source address        Master Address                            Address              Address --------- --- -------------- --- ----- - -- --- ---------------      ----------------- VLAN 10    1 10.2.0.10       100 3000  Y M  3   10.3.0.10             10.3.0.10              10.3.0.10 VLAN 10    2 10.4.0.10       255 1000  Y M  3   10.4.0.10             10.4.0.10 10.5.0.10 VLAN 50    1 10.6.0.10       95  1000  Y B   3   10.6.0.10             10.6.0.60 VLAN 400   4 10.7.0.20       150 1000  Y I   3   10.7.0.10

show vrrp counters

To display the VRRP counters, use the show vrrp counters command in Privileged EXEC mode.

Syntax

show vrrp counters [interface-id]

Parameters

  • interface-id—(Optional) Interface Identifier.

Command Mode

Privileged EXEC mode

User Guidelines

Use the show vrrp counters command without the identifier-id argument to display the VRRP counters of all interfaces where Virtual routers are running.

Use the show vrrp counters command with the identifier-id argument to display the VRRP counters of the specified interface.

Example

The following example display the counters of all virtual routers defined on VLAN 100:

switchxxxxxx# show vrrp counters vlan 100 vlan 100 Invalid checksum: 0 Invalid Packet Length: 0 Invalid TTL: 0 Invalid VRRP Packet Type: 0 Invalid VRRP ID: 0 Invalid Protocol Number: 0 Invalid IP List: 0 Invalid Interval: 0 Invalid Authentication: 0

vrrp description

To assign a description to the VRRP virtual router, use the vrrp description command in Interface Configuration mode. To return to the default, use the no format of the command.

Syntax

vrrp vrid description text no vrrp vrid description

Parameters

  • vrid—Virtual router identifier on the interface for which VRRP is being defined. The range is 1-255.
  • text—Text that describes the purpose or use of the virtual router. The parameter may contain 0-160 characters.

Default Configuration No description.

Command Mode

Interface Configuration mode

Example

The following example shows how to assign a VRRP description to the specified VRRP virtual router:

switchxxxxxx(config)# interface vlan 10
switchxxxxxx(config-if)# vrrp 1 description router1
switchxxxxxx(config-if)# exit

vrrp ip

To define an IP address of a virtual router, use the vrrp ip command in Interface Configuration mode. To remove the IP address, use the no format of the command.

Syntax

vrrp vrid ip ip-address

no vrrp vrid ip [ip-address]

Parameters

  • vrid—Virtual router identifier on the interface for which VRRP is being defined. The range is 1-255.
  • ip-address—Virtual router’s IP address.

Command Mode

Interface Configuration mode

User Guidelines

A virtual router comes into existence when it has one or more participating VRRP routers. To participate in a specific virtual router as a VRRP router, use vrrp ip to configure an existing IP interface with the identifier and the IP address(es) of the virtual router. The IP interface of the VRRP router and the virtual router must be in the same IP subnet.

A VRRP router that is the owner if the virtual router’s IP address(es) is also the VRRP router real IP address at the IP interface. There is only one owner for all virtual router’s IP address(es). A VRRP router participates in a virtual router when it is configured with the first virtual router’s IP address and does not participate when the virtual router IP address is removed.

A virtual router entity in a VRRP router is created in the shutdown state. Use the no vrrp shutdown command to enable it.

To defined more than one virtual router’s IP address, the command should be applied for each configured IP address.

Each VRRP router in the virtual router should be configured with the same set of IP addresses.

If the ip-address parameter is omitted in the no format of the CLI command, all the IP addresses of the virtual router are removed, leading to the virtual router entity in the VRRP router being removed too.

The switch supports up to 255 VRRP routers.

Example

The following example shows how to define a VRRP virtual router:

switchxxxxxx(config)# interface vlan 10
switchxxxxxx(config-if)# vrrp 1 ip 192.168.2.1
switchxxxxxx(config-if)# exit

vrrp preempt

To enable Virtual Router Redundancy Protocol (VRRP) preemption, use the vrrp preempt command in Interface Configuration mode. To return to the default, use the no format of the command.

Syntax vrrp vrid preempt no vrrp vrid preempt

Parameters

  • vrid—Virtual router identifier on the interface for which VRRP is being defined. The range is 1-255.

Command Mode

Interface Configuration mode

Default Configuration

Preemption is enabled by default.

User Guidelines

By default, the VRRP router being configured with this command will take over as Master virtual router for the group if it has a higher priority than the current master virtual router.

Note: The router that is the IP address owner will preempt, regardless of the setting of this command.

Example

The following example shows how to disable VRRP preemption to the specified VRRP virtual router:

switchxxxxxx(config)# interface vlan 10
switchxxxxxx(config-if)# no vrrp 1 preempt
switchxxxxxx(config-if)# exit

vrrp priority

To define Virtual Router Redundancy Protocol (VRRP) priority, use the vrrp priority command in Interface Configuration mode. To return to the default, use the no format of the command.

Syntax

vrrp vrid priority priority no vrrp vrid priority

Parameters

  • vrid—Virtual router identifier on the interface for which VRRP is being defined. The range is 1-255.
  • priority—Virtual router priority. The range is 1-254.

Command Mode

Interface Configuration mode

Default Configuration

The default for owner is 255 and for non-owner it is 100.

User Guidelines

The priority of the owner cannot be changed. It is always 255.

Example

The following example shows how to set VRRP priority:

switchxxxxxx(config)# interface vlan 10
switchxxxxxx(config-if)# vrrp 1 priority 110
switchxxxxxx(config-if)# exit

vrrp shutdown

To disable the VRRP virtual router on the interface (meaning that it changes its status to Initialize), use the vrrp shutdown command in Interface Configuration mode. To return to the default, use the no format of the command.

Syntax vrrp vrid shutdown no vrrp vrid shutdown

Parameters

  • vrid—Virtual router identifier on the interface for which VRRP is being defined. The range is 1-255.

Default Configuration Disabled.

Command Mode

Interface Configuration mode

User Guidelines

When a VRRP virtual router is disabled on an interface, its configuration is not removed.

Example

The following example shows how to enable a specified virtual router:

switchxxxxxx(config)# interface vlan 10
switchxxxxxx(config-if)# no vrrp 1 shutdown
switchxxxxxx(config-if)# exit

vrrp source-ip

To define a real VRRP address that will be used as the source IP address of VRRP messages, use the vrrp source-ip command in Interface Configuration mode. To return to the default, use the no format of the command.

Syntax

vrrp vrid source-ip ip-address no vrrp vrid source-ip Parameters

  • vrid—Virtual router identifier on the interface for which VRRP is being defined. The range is 1-255.
  • ip-address—VRRP router’s IP address: one of IP addresses of VRRP router defined on the same interface.

Default Configuration

Lowest VRRP router’s IP address defined on the interface.

Command Mode

Interface Configuration mode

User Guidelines

Example

The following example shows how to define a source ip address to the specified VRRP virtual router:

switchxxxxxx(config)# interface vlan 10
switchxxxxxx(config-if)# vrrp 1 source-ip 192.168.2.1
switchxxxxxx(config-if)# exit

vrrp timers advertise

To define the interval between successive advertisements by the Master VRRP virtual router, use the vrrp timers advertise command in Interface Configuration mode. To return to the default, use the no format of the command.

Syntax

vrrp vrid timers advertise [msec] interval no vrrp vrid timers advertise

Parameters

  • vrid—Virtual router identifier on the interface for which VRRP is being defined. The range is 1-255.
  • msec—(Optional) Changes the unit of the advertisement time from seconds to milliseconds. Without the keyword, the advertisement interval is in seconds.
  • interval—Time interval between successive advertisements. If keyword msec is present then the valid range is 50 to 40950 milliseconds. If keyword msec is omitted then the valid range is 1 to 40 seconds.

Command Mode

Interface Configuration mode

Default Configuration

1 second

User Guidelines

If the advertisement interval is configured in msec, the operation advertisement interval will be the configured advertisement interval round down to the nearest seconds for VRRP v2 and to the nearest centiseconds (10ms) for VRRP v3.

Example

The following example shows how to set VRRP timer advertise of 500 msec to specified VRRP virtual router:

switchxxxxxx(config)# interface vlan 10
switchxxxxxx(config-if)# vrrp 1 timers advertise msec 500
switchxxxxxx(config-if)# exit

vrrp version

To define the supported VRRP version, use the vrrp version command in Interface Configuration mode. To return to the default, use the no format of the command.

Syntax

vrrp vrid version 2 | 3 | 2&3 no vrrp vrid version

Parameters

  • vrid—Virtual router identifier on the interface for which VRRP is being defined. The range is 1-255.
  • 2—VRRPv2 specified by RFC3768 is supported. Received VRRPv3 messages are dropped by the VRRP virtual router. Only VRRPv2 advertisements are sent.
  • 3—VRRPv3 specified by RFC5798 is supported without VRRPv2 support (8.4, RFC5798). Received VRRPv2 messages are dropped by the VRRP virtual router. Only VRRPv3 advertisements are sent.
  • 2&3—VRRPv3 specified by RFC5798 is supported with VRRPv2 support (8.4, RFC5798). Received VRRPv2 messages are treated by the VRRP virtual router. VRRPv3 and VRRPv2 advertisements are sent.

Default Configuration Version 2.

Command Mode

Interface Configuration mode

User Guidelines

Version 2&3 is intended for upgrade scenarios and is not for permanent deployment. Please refer to VRRP 3 standard for version 2 and version 3 interoperability.

Example

The following example shows how to define VRRP version to specified VRRP virtual router:

switchxxxxxx(config)# interface vlan 10
switchxxxxxx(config-if)# vrrp 1 version 2
switchxxxxxx(config-if)# exit

Was this article helpful?

Related Articles

Leave A Comment?