You are on page 1of 34

Internal

ODP500006 VRRP
Principle

ISSUE 1.0
www.huawei.com

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved


This course introduces the Virtual
Router Redundancy Protocol (VRRP).
VRRP specifies an election protocol that
dynamically assigns responsibility for a
Virtual Router to one of the VRRP
Routers on a LAN.

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 2


References

 RFC2338: Virtual Router Redundancy


Protocol
 VRP Operation Manual

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 3


Upon completion of this course, you will
be able to:

 Master the principle of VRRP

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 4


Chapter 1 VRRP Overview

Chapter 2 Protocol Packets and State Machine

Chapter 3 Special Topics

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 5


Why VRRP ?

Only one gateway, Internet


no redundancy
RTA

10.1.1.254/24

Ethernet

PCA PCB PCC PCD

10.1.1.1/24 10.1.1.2/24 10.1.1.3/24 10.1.1.4/24


10.1.1.254 10.1.1.254 10.1.1.254 10.1.1.254

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 6


What is VRRP
Internet

Virtual
RTA RTB
Router
10.1.1.251/24 E0/0 10.1.1.254 E0/0 10.1.1.252/24

Ethernet

PCA PCB PCC PCD

10.1.1.1/24 10.1.1.2/24 10.1.1.3/24 10.1.1.4/24


10.1.1.254 10.1.1.254 10.1.1.254 10.1.1.254

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 7


Virtual Router ID and Virtual IP Address

Virtual Router ID
configured on RTA is 1

IP Address of
Virtual Router 1

Virtual Router ID configured


on RTB is also 1

IP Address of Virtual Router


1 should be the same as
configured on RTA

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 8


Electing the Master
Internet

The Master The Backup


Virtual
RTA Router RTB
10.1.1.251/24 E0/0 10.1.1.254 E0/0 10.1.1.252/24
Priority = 200 Priority = 150

Ethernet

PCA PCB PCC PCD

10.1.1.1/24 10.1.1.2/24 10.1.1.3/24 10.1.1.4/24


10.1.1.254 10.1.1.254 10.1.1.254 10.1.1.254

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 9


Electing the Master

The Master

The Master has the


highest priority value

The Backup has lower


priority value

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 10


Special values of Priority ---- 255
Internet

IP Address Owner

Virtual
RTA RTB
Router
10.1.1.254/24 E0/0 10.1.1.254 E0/0 10.1.1.252/24

Ethernet

PCA PCB PCC PCD

10.1.1.1/24 10.1.1.2/24 10.1.1.3/24 10.1.1.4/24


10.1.1.254 10.1.1.254 10.1.1.254 10.1.1.254

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 11


Special values of Priority ---- 255

The Running Priority is


255 since this router is
the IP Address Owner

RTB is the Backup although its


Configured Priority is higher

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 12


Special values of Priority ---- 0
Deleting VRRP
configuration

The Priority value 0 indicates that


the current Master has stopped
participating in VRRP

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 13


Preempt_Mode and Timers

The Advertisement_Interval
is 1 second

The Preempt_Mode is TRUE

Time to delay when a higher


priority Backup preempts a
lower priority Master

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 14


Summary

 What is VRRP?

 Virtual Router; Virtual Router ID,


Virtual IP Address.
 Electing the Master.

 Special values of Priority.

 Preemption mode and Timers.

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 15


Chapter 1 VRRP Overview

Chapter 2 Protocol Packets and State Machine

Chapter 3 Special Topics

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 16


VRRP Packet Format

Only one packet type ---- ADVERTISEMENT


Only the Master can send VRRP Advertisements

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 17


IP Fields of VRRP Packets

Field Value

Source Address Physical IP interface address of the Master

Destination Address IP multicast address 224.0.0.18

TTL Must be 255

Protocol The IP protocol number is 0x70

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 18


Virtual Router MAC Address

00 00 5E 00 01 VRID

The last one byte of a Virtual Router MAC


Address is the VRID of this Virtual Router

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 19


Layer 2 fields of VRRP packets

Field Value

Destination MAC Address Multicast MAC Address 01-00-5E-00-00-12

Source MAC Address The Virtual Router MAC Address

Type 0x0800

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 20


Authentication

Auth Type Authentication Method

0 No Authentication

1 Simple Text Password

2 MD5 Password

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 21


Protocol State Machine

Initialize

Master Backup

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 22


Protocol State Machine

Initialize

Master Backup
Master_Down_Timer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 23


Protocol State Machine

Initialize

More prior Advertisement received


Master Backup

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 24


Summary

 VRRP Packet format

 IP fields of VRRP Packets

 Virtual Router MAC Address

 Layer 2 fields of VRRP Packets

 Authentication methods

 Protocol State Machine

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 25


Chapter 1 VRRP Overview

Chapter 2 Protocol Packets and State Machine

Chapter 3 Special Topics

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 26


Handling of ARP Requests
Requesting the MAC
Broadcast Address for 10.1.1.254

E0/0
RTA
10.1.1.251/24 1 DMAC SMAC 0806 DATA FCS

10.1.1.254
00-00-5E-00-01-01

PCA
E0/0 2 DMAC SMAC 0806 DATA FCS
RTB 10.1.1.1/24
10.1.1.252/24 10.1.1.254

The Master Virtual MAC


Unicast Address ARP Response

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 27


VRRP and ICMP Redirect Message

Loopback0 E0/0
Send ICMP Echo Message
1.1.1.1/32 10.1.1.251/24 Dst IP = 1.1.1.1
RTA 1 Dst MAC = 00-00-5E-00-01-01
10.1.1.254
00-00-5E-00-01-01

2 Send ICMP Redirect Message


E0/0 Src IP = 10.1.1.254 PCA
Loopback0
Src MAC = RTB's Interface MAC 10.1.1.1/24
2.2.2.2/32 10.1.1.252/24 Address 10.1.1.254
RTB

The Master

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 28


VRRP and ICMP Redirect Message
Using Virtual IP Address
as the source IP address

Using physical IP Address


as the source IP address

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 29


VRRP and ICMP Redirect Message

There are two ARP


entries on PCA

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 30


VRRP and ICMP Redirect Message

PCA adds a new route to destination


1.1.1.1/32, using 10.1.1.251 as the next hop

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 31


Sending IP packets by the Master

Type Source IP Address Source MAC Address

VRRP Advertisement Physical IP Interface Virtual MAC Address of


Address the Virtual Router

ICMP Redirect Message Virtual IP Addresses Physical Interface MAC


Physical Interface Address Address
Forwarding IP Packets Do not change Physical Interface MAC
Address

Sending IP Packets Physical IP Interface Physical Interface MAC


originated by the Master Address Address

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 32


Summary

 Handling of ARP Request

 Sending Redirect Messages

 Sending IP packets by the Master

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 33


Thank You
www.huawei.com

You might also like