11.13. Configuring VARP

Overview

Function Introduction

Virtual ARP (VARP) allows multiple switches to simultaneously route packets with the same destination MAC address. Each switch is configured with the same virtual MAC address for the the L3 interfaces configured with a virtual IP address. In MLAG configurations, VARP is preferred over VRRP because VARP working on active-active mode without traffic traverse peer link.

For ARP and GARP requests to virtual IP address, VARP will use the virtual MAC address to reply. The virtual MAC address is only used in the destination field of inbound packets and never used in the source field of outbound packets.Topology

Principle Description

N/A

Configuration

image

Fig. 11.37 VARP with MALG

The following configuration should be operated on all devices if the device ID is not specified.

step 1 Enter the configure mode

Switch# configure terminal

step 2 Set the virtual-router mac address

Switch(config)# ip virtual-router mac a.a.a

step 3 Enter the vlan configure mode and create the vlan

Switch(config)# vlan database
Switch(config-vlan)# vlan 2
Switch(config-vlan)# exit

step 4 Enter the interface configure mode and set the attributes of the interface

Switch(config)# interface eth-0-11
Switch(config-if)# switchport access vlan 2
Switch(config-if)# no shutdown
Switch(config-if)# exit

step 5 Create the vlan interface and set ip and virtual router ip

Configuring Switch1:

Switch(config)# interface vlan 2
Switch(config-if)# ip address 10.10.10.1/24
Switch(config-if)# ip virtual-router address 10.10.10.254
Switch(config-if)# exit

Configuring Switch2:

Switch(config-if)# interface vlan 2
Switch(config-if)# ip address 10.10.10.2/24
Switch(config-if)# ip virtual-router address 10.10.10.254
Switch(config-if)# exit

step 6 Exit the configure mode

Switch(config)# end

step 7 Validation

Display the result on Switch1.

Switch# show ip arp
Protocol Address Age (min) Hardware Addr Interface
Internet 10.10.10.1 - cef0.12da.8100 vlan2
Internet 10.10.10.254 - 000a.000a.000a vlan2

Display the result on Switch2.

Switch# show ip arp
Protocol Address Age (min) Hardware Addr Interface
Internet 10.10.10.2 - 66d1.4c26.e100 vlan2
Internet 10.10.10.254 - 000a.000a.000a vlan2

Application cases

N/A