Sie sind auf Seite 1von 34

Internal

ODA040009
VRRP Principle
ISSUE 1.5

HUAWEI TECHNOLOGIES CO., LTD.

www.huawei.com

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 need VRRP ?


Only one gateway,
no redundancy

Internet
RTA

10.1.1.254/24

Ethernet

PCA
10.1.1.1/24
10.1.1.254

PCC

PCB

10.1.1.2/24
10.1.1.254

HUAWEI TECHNOLOGIES CO., LTD.

PCD

10.1.1.3/24
10.1.1.254

All rights reserved

Page 6

10.1.1.4/24
10.1.1.254

What is VRRP
Internet

Virtual
Router
10.1.1.254

RTA
10.1.1.251/24 E0/0

RTB
E0/0 10.1.1.252/24

Ethernet

PCA
10.1.1.1/24
10.1.1.254

PCC

PCB

10.1.1.2/24
10.1.1.254

HUAWEI TECHNOLOGIES CO., LTD.

PCD

10.1.1.3/24
10.1.1.254

All rights reserved

Page 7

10.1.1.4/24
10.1.1.254

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
Router
10.1.1.254

RTA
10.1.1.251/24 E0/0
Priority = 200

RTB
E0/0 10.1.1.252/24
Priority = 150

Ethernet

PCA
10.1.1.1/24
10.1.1.254

PCC

PCB

10.1.1.2/24
10.1.1.254

HUAWEI TECHNOLOGIES CO., LTD.

PCD

10.1.1.3/24
10.1.1.254

All rights reserved

Page 9

10.1.1.4/24
10.1.1.254

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
Router
10.1.1.254

RTA
10.1.1.254/24 E0/0

RTB
E0/0 10.1.1.252/24

Ethernet

PCA
10.1.1.1/24
10.1.1.254

PCC

PCB

10.1.1.2/24
10.1.1.254

HUAWEI TECHNOLOGIES CO., LTD.

PCD

10.1.1.3/24
10.1.1.254

All rights reserved

Page 11

10.1.1.4/24
10.1.1.254

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

No Authentication

Simple Text Password

MD5 Password

HUAWEI TECHNOLOGIES CO., LTD.

All rights reserved

Page 21

Protocol State Machine


Initialize
p s
tu i
ar rity
St rio
P
55
t2
no

p s
tu ity i
r
a r
St rio
P

5
25

Master

HUAWEI TECHNOLOGIES CO., LTD.

Backup

All rights reserved

Page 22

Protocol State Machine


Initialize

wn
do
ut
Sh

Master

Backup
Master_Down_Timer

HUAWEI TECHNOLOGIES CO., LTD.

All rights reserved

Page 23

Protocol State Machine


Initialize
n
w
do
t
u
h
S

More prior Advertisement received


Master

HUAWEI TECHNOLOGIES CO., LTD.

Backup

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 ARP Requests


Broadcast

RTA

Requesting the MAC


address for 10.1.1.254

E0/0
10.1.1.251/24

1 DMAC SMAC 0806 DATA FCS

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

RTB

The Master

E0/0

2 DMAC SMAC 0806 DATA FCS

10.1.1.252/24

Unicast

HUAWEI TECHNOLOGIES CO., LTD.

Virtual MAC
Address
All rights reserved

PCA
10.1.1.1/24
10.1.1.254

ARP Response
Page 27

VRRP and ICMP Redirect Message

Loopback0
1.1.1.1/32

E0/0
RTA

10.1.1.251/24
1

Send ICMP Echo Message


Dst IP = 1.1.1.1
Dst MAC = 00-00-5E-00-01-01

10.1.1.254
00-00-5E-00-01-01
Loopback0
2.2.2.2/32

E0/0
RTB

10.1.1.252/24

Send ICMP Redirection Message


PCA
Src IP = 10.1.1.254
Src MAC = RTB's Interface MAC 10.1.1.1/24
10.1.1.254
Address

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
Address

Virtual MAC Address of


the Virtual Router

ICMP Redirect Message Virtual IP Addresses

Physical Interface MAC


Physical Interface Address Address

Forwarding IP Packets

Do not change

Sending IP Packets
Physical IP Interface
originated by the Master Address

HUAWEI TECHNOLOGIES CO., LTD.

All rights reserved

Physical Interface MAC


Address
Physical Interface MAC
Address

Page 32

Summary

Handling 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

Das könnte Ihnen auch gefallen