Monday, January 30, 2017

VRRP - First Hop Redundancy Protocol



VRRP enables hosts on a LAN to make use of redundant routing platforms on that LAN without requiring more than the static configuration of a single default route on the hosts

The VRRP routing platforms share the IP address corresponding to the default route configured on the hosts. At any time, one of the VRRP routing platforms is the master (active) and the others are backups

 

Implementation


A virtual router must use 00-00-5E-00-01-XX as its Media Access Control (MAC) address. The last byte of the address (XX) is the Virtual Router IDentifier (VRID), which is different for each virtual router in the network. This address is used by only one physical router at a time, and it will reply with this MAC address when an ARP request is sent for the virtual router's IP address.
Physical routers within the virtual router must communicate within themselves using packets with multicast IP address 224.0.0.18 and IP protocol number 112.

Routers have a priority of between 1-255 and the router with the highest priority will become the master. The default priority is 100, for address owner the priority is always 255.


Lab

Below is given a simple lab that anyone can try at home with GNS3 to effectively understand the working of VRRP. 


The configurations and outputs after configs on the Routers are as below:

Configs and Outputs when VIP is set to nonphysical interface IP



Configs When VIP is owner IP




One more thing to remember is that VRRP uses Gratious ARP packets to advertise itself as master initially inorder to populate the host arp entries. 
Also GARP packets are used by backup when it transitions from Backup to master. 
The packet format is as below. 


Also to understand Better , have a look at the packet captures from the lab. 

VRRP Control Packet


VRRP Data Packet 

BGP Notification Message

NOTIFICATION messages are sent when there is a fatal error condition. If a NOTIFICATION message is sent, the BGP peer session is torn down and reset.

Below is Notification message packet capture


Details of the Error codes are documented in the table below.

BGP Update Message

UPDATE messages are used to exchange routes between peers.

Below is a packet capture showing Update Message



BGP KEEPALIVE messages

BGP Keepalive Packet Capture

KEEPALIVE messages are sent periodically (every 60 seconds by default) to ensure that the remote peer is still available. If a router does not receive a KEEPALIVE from a peer for a Hold-time period (by default, 180 seconds), the router declares that peer dead.


BGP Open Message

BGP Open Message Packet Capture

BGP forms its peer relationships through a series of messages. First, an
OPEN message is sent between peers to initiate the session. The OPEN
message contains several parameters:
• BGP Version – must be the same between BGP peers
• Local AS Number
• BGP Router ID