Configuring Virtual Router Redundancy Protocol


The configuration of the VRRP protocol is tied to the creation and configuration of vRouters. It requires entering various parameters such as a VRRP priority, a VRRP ID to uniquely identify the virtual router, etc.


Configuring VRRP Priority


The priority is a value used by the VRRP master election process.


The valid priority range is 1-254, where 1 is the lowest priority and 254 is the highest priority.


The default value is 100. Higher values indicate higher priority for the master router election, therefore a backup router (also called a slave) can be configured for example with a priority value lower than the default.


Configuring the VRRP ID


A virtual router is identified by its virtual router identifier (VRID) and by a set of virtual IPv4 and/or IPv6 address(es).


Each virtual IPvX address is paired to a MAC address in the 00-00-5E-00-01-XX address range where the last byte of the address (XX) corresponds to the VRID.


The VRID is also used to tag and differentiate protocol messages exchanged by VRRP routers.


The virtual router identifier is a user-configurable parameter with a value between 1 and 255. There is no default value.


In the configuration this parameter has to be associated to a vRouter entity and to the VRRP interface, as shown in the example below.


Example Configuration


In this example two switches, named switch1 and switch2, are going to share a subnet and VLAN over which to set up VRRP’s virtual router function (with an ID of 10):


  • VLAN 100 with IP address range 192.168.11.0/24


The corresponding vRouters are going to share a common vNET:


  • The vrrp-router vNET with scope fabric


To configure VRRP, start with switch1 and create a vRouter that is associated with the aforementioned vNET and a VRRP ID of 10. Before configuring the vrouter-create command, you must create the corresponding vnet:


CLI (network-admin@switch) > vrouter-create name vrrp-rtr1 vnet vrrp-router router-type hardware hw-vrrp-id 10 enable


Add a vRouter interface that corresponds to the router’s own real IP address:


CLI (network-admin@switch) > vrouter-interface-add vrouter-name vrrp-rtr1 ip 192.168.11.3 netmask 24 vlan 100 [if data]


The above command will output a message such as:


Added interface eth0.100 with ifIndex 24

 

You can also use the vrouter-interface-show command to check the name of the newly created interface (eth0.100):


CLI (network-admin@switch) > vrouter-interface-show


format all layout vertical

vrouter-name: vrrp-rtr1

nic: eth0.100

ip: 192.168.11.3/24

assignment: static

mac: 66:0e:94:dd:18:c4

vlan: 100

vxlan: 0

if: data

alias-on:

exclusive: no

nic-config: enable

nic-state: up


Create the VRRP interface on the master switch with virtual IP 192.168.11.2, VRRP ID 10 and default priority (100):


CLI (network-admin@switch1) > vrouter-interface-add vrouter-name vrrp-rtr1 ip 192.168.11.2 netmask 24 vlan 100 [if data] vrrp-id 10 vrrp-primary eth0.100 vrrp-priority 100

 

The above command will output a message such as:


Added interface eth1.100 with ifIndex 25

 

 

Then create a vRouter and an interface (with real IP 192.168.11.4) also on switch2:


CLI (network-admin@switch) > vrouter-create name vrrp-rtr2 vnet vrrp-router router-type hardware hw-vrrp-id 10 enable


CLI (network-admin@switch) > vrouter-interface-add vrouter-name vrrp-rtr2 ip 192.168.11.4 netmask 24 vlan 100 [if data]


Use the vrouter-interface-show command to check the name of the newly created interface (eth3.100):


CLI (network-admin@switch2) > vrouter-interface-show format all layout vertical


vrouter-name: vrrp-rtr2

nic: eth3.100

ip: 192.168.11.4/24

assignment: static

mac: 66:0e:94:21:a9:6c

vlan: 100

vxlan: 0

if: data

alias-on:

exclusive: no

nic-config: enable

nic-state: up

 

Create the VRRP interface for the backup switch with the same VIP 192.168.11.2, same VRRP ID (10) and a lower-than-default priority (say, 50):


CLI (network-admin@switch2) > vrouter-interface-add vrouter-name vrrp-rtr2 ip 192.168.11.2 netmask 24 vlan 100 [if data] vrrp-id 10 vrrp-primary eth3.100 vrrp-priority 50

 

Display the information about the VRRP setup:


CLI (network-admin@switch2) > vrouter-interface-show format all layout vertical


vrouter-name: vrrp-rtr1

nic: eth0.100

ip: 192.168.11.3/24

assignment: static

mac: 66:0e:94:dd:18:c4

vlan: 100

vxlan: 0

if: data

alias-on:

exclusive: no

nic-config: enable

nic-state: up

vrouter-name: vrrp-rtr1

nic: eth1.100

ip: 192.168.11.2/24

assignment: static

mac: 00:00:5e:00:01:0a

vlan: 100

vxlan: 0

if: data

alias-on:

exclusive: no

nic-config: enable

nic-state: up

vrrp-id: 10

vrrp-primary: eth0.100

vrrp-priority: 100

vrrp-state: master

vrouter-name: vrrp-rtr2

nic: eth3.100

ip: 192.168.11.4/24

assignment: static

mac: 66:0e:94:21:54:07

vlan: 100

vxlan: 0

if: data

alias-on:

exclusive: no

nic-config: enable

nic-state: up

vrouter-name: vrrp-rtr2

nic: eth4.100

ip: 192.168.11.2/24

assignment: static

mac: 00:00:5e:00:01:0a

vlan: 100

vxlan: 0

if: data

alias-on:

exclusive: no

nic-config: enable

nic-state: down

vrrp-id: 10

vrrp-primary: eth3.100

vrrp-priority: 50

vrrp-state: slave

 

When you intentionally disable the master’s VRRP interface, the backup interface becomes the new master:


vrouter-name: vrrp-router2

nic: eth4.100

ip: 192.168.11.2/24

assignment: static

mac: 00:00:5e:00:01:0a

vlan: 100

vxlan: 0

if: data

alias-on:

exclusive: no

nic-config: enable

nic-state: up

vrrp-id: 10

vrrp-primary: eth3.100

vrrp-priority: 50

vrrp-state: master

 

When you re-enable the disabled interface on the former master, that interface becomes the master again, and the second interface returns to be a backup (slave):


vrouter-name: vrrp-router2

nic: eth4.100

ip: 192.168.11.2/24

assignment: static

mac: 00:00:5e:00:01:0a

vlan: 100

vxlan: 0

if: data

alias-on:

exclusive: no

nic-config: enable

nic-state: down

vrrp-id: 10

vrrp-primary: eth3.100

vrrp-priority: 50

vrrp-state: slave

 

 

north
    keyboard_arrow_up
    keyboard_arrow_down
    description
    print
    feedback
    support
    business
    rss_feed
    south