You are on page 1of 23

Virtual Router Redunda

ncy Protocol
VRRP

ZTE University univ.zte.com.cn


TheinformationcontainedinthefileissolelypropertyofZTEcorporation.Anykindofdisclosingwithoutpermissionisprohibited.
The Problem

R1

10.0.0.1/16

Default GW = 10.0.0.1/16
ZTE University univ.zte.com.cn
TheinformationcontainedinthefileissolelypropertyofZTEcorporation.Anykindofdisclosingwithoutpermissionisprohibited.
The Solution - VRRP

R1 VIP: R2
10.0.0.1/16
10.0.0.1/16 10.0.0.2/16

Default GW = 10.0.0.1/16
ZTE University univ.zte.com.cn
TheinformationcontainedinthefileissolelypropertyofZTEcorporation.Anykindofdisclosingwithoutpermissionisprohibited.
VRRP Introduction

End host systems on a LAN are often configured


to send packets to a statically configured default
router.
If this default router becomes unavailable, all the
hosts that use it as their first hop router become
isolated on the network.
VRRP groups several physical routers into a
VRRP virtual router, and assigns a virtual IP and a
MAC addresses to the virtual router, which are
then used as a default gateway by the end devices.

ZTE University univ.zte.com.cn


TheinformationcontainedinthefileissolelypropertyofZTEcorporation.Anykindofdisclosingwithoutpermissionisprohibited.
VRRP Overview

All routers in the VR group communicate to each


other using IP multicast.
Every VR group is identified by a VRID, which is
configured on all participants.
To minimize network traffic, only the Master for each
virtual router sends periodic VRRP Advertisement
messages.
If the Master become unavailable then the highest
priority Backup will transition to Master after a short
delay and will take over servicing the virtual IP and
MAC addresses.

ZTE University univ.zte.com.cn


TheinformationcontainedinthefileissolelypropertyofZTEcorporation.Anykindofdisclosingwithoutpermissionisprohibited.
VRRP Packet Format

4 bytes

4 bits 4 bits 8 bits 8 bits 8 bits

Version Type Virtual Router ID Priority Count IP Addrs

Auth Type Adver Int Checksum

IP Address (1)

IP Address (n)

Authentication Data (1)

Authentication Data (2)

ZTE University univ.zte.com.cn


TheinformationcontainedinthefileissolelypropertyofZTEcorporation.Anykindofdisclosingwithoutpermissionisprohibited.
IP Field Descriptions

Field Description
Source Address The primary IP address of the interface the packet
is being sent from.
Destination The IP multicast address as assigned by the IANA
Address for VRRP is 224.0.0.18
TTL The TTL must be set to 255.
Protocol The IP protoco is 112 (decimal).
Version The VRRP protocol version of this packet.
Type The type field specifies the type of this VRRP
packet. The only packet type defined in this
version of the protocol is: 1 ADVERTISEMENT
Virtual Router ID The Virtual Router Identifier (VRID) field identifies the
(VRID) virtual router this packet is reporting status for.

ZTE University univ.zte.com.cn


TheinformationcontainedinthefileissolelypropertyofZTEcorporation.Anykindofdisclosingwithoutpermissionisprohibited.
IP Field Descriptions

Field Description
Priority The priority field specifies the sending VRRP
router's priority for the virtual router. Higher
values equal higher priority.
Count IP Address The number of IP addresses contained in this
VRRP advertisement.
Authentication Type The authentication type field identifies the
authentication method being utilized: 0 = No
Authentication, 1 = Simple Text Password, 2 = IP
Authentication Header
No Authentication The use of this authentication type means that
VRRP protocol exchanges are not authenticated.
IP Authentication The use of this authentication type means the VRRP
Header protocol exchanges are authenticated using the
mechanisms defined by the IP Authentication Header.

ZTE University univ.zte.com.cn


TheinformationcontainedinthefileissolelypropertyofZTEcorporation.Anykindofdisclosingwithoutpermissionisprohibited.
IP Field Descriptions

Field Description
Advertisement The Advertisement interval indicates the time
Interval (Adver Int) interval (in seconds) between ADVERTISEMENTS.
Default = 1 sec.
Checksum The checksum field is used to detect data
corruption in the VRRP message.
IP Address(es) One or more IP addresses that are associated with
the virtual router.
Authentication Data The authentication string is currently only utilized
for simple text authentication. There is no default
value for this field.

ZTE University univ.zte.com.cn


TheinformationcontainedinthefileissolelypropertyofZTEcorporation.Anykindofdisclosingwithoutpermissionisprohibited.
ip-redundancy create

Format
ip-redundancy create vrrp <vrid> interface
<interface>

To create a virtual router with an identifier (V


RID) of 1 on interface test1
zte(config)# ip-redundancy create vrrp 1 interface test1

ZTE University univ.zte.com.cn


TheinformationcontainedinthefileissolelypropertyofZTEcorporation.Anykindofdisclosingwithoutpermissionisprohibited.
ip-redundancy associate

Format
ip-redundancy associate vrrp <vrid>
interface <interface> address <ipaddr/mask>

To add IP address/mask 1.2.3.4/16 to the


list of IP addresses associated with
virtual router 1 on interface test1
zte(config)# ip-redundancy associate vrrp 1 interface test1
address 1.2.3.4/16

ZTE University univ.zte.com.cn


TheinformationcontainedinthefileissolelypropertyofZTEcorporation.Anykindofdisclosingwithoutpermissionisprohibited.
ip-redundancy set

Format
ip-redundancy set vrrp <vrid> interface <interface>
priority <number>|adv-interval <number> |preempt-
mode (default)|disabled|auth-type none|text auth-key
<key>
To specify 200 as the priority used by virtual router 1 on
interface test1
zte(config)# ip-redundancy set vrrp 1 interface test1 priority 200

To set the advertisement interval to 3 seconds


zte(config)# ip-redundancy set vrrp 1 interface test1 adv-interval 3

ZTE University univ.zte.com.cn


TheinformationcontainedinthefileissolelypropertyofZTEcorporation.Anykindofdisclosingwithoutpermissionisprohibited.
ip-redundancy start vrrp

Format
ip-redundancy start vrrp <vrid> interface
<interface>

To start virtual router 1 on interface test1


zte(config)# ip-redundancy start vrrp 1

ZTE University univ.zte.com.cn


TheinformationcontainedinthefileissolelypropertyofZTEcorporation.Anykindofdisclosingwithoutpermissionisprohibited.
Examples

To prevent a Backup router from taking over


as Master from a Master router that has a
lower priority
zte(config)# ip-redundancy set vrrp 1 interface test1 preempt-mode
disabled

To authenticate VRRP exchanges on virtual


router 1 on interface test1 with a password
of zte
zte(config)# ip-redundancy set vrrp 1 interface test1 auth-type
text auth-key zte

ZTE University univ.zte.com.cn


TheinformationcontainedinthefileissolelypropertyofZTEcorporation.Anykindofdisclosingwithoutpermissionisprohibited.
ip-redundancy show

Format
ip-redundancy show vrrp interface
<interface> [id <vrid>] [verbose]

To display all information about virtual routers


on interface test1
zte(config)# ip-redundancy show vrrp interface test1

To display VRRP statistics for virtual router 100


on interface test1
zte(config)# ip-redundancy show vrrp 100 interface test1 verbose

ZTE University univ.zte.com.cn


TheinformationcontainedinthefileissolelypropertyofZTEcorporation.Anykindofdisclosingwithoutpermissionisprohibited.
ip-redundancy trace

Format
ip-redundancy trace vrrp events|state-transit
ions|packet-errors|all enabled|disabled
To display a message whenever a VRRP packet
error is encountered

zte(config)# ip-redundancy trace vrrp packet-errors enabled

ZTE University univ.zte.com.cn


TheinformationcontainedinthefileissolelypropertyofZTEcorporation.Anykindofdisclosingwithoutpermissionisprohibited.
ip-redundancy clear vrrp-stats

Format
ip-redundancy clear vrrp-stats interface <int
erface> [id <vrid>]

To clear statistics for virtual router 1 on interf


ace test1
zte(config)# ip-redundancy clear vrrp-stats interface test1 id 1

ZTE University univ.zte.com.cn


TheinformationcontainedinthefileissolelypropertyofZTEcorporation.Anykindofdisclosingwithoutpermissionisprohibited.
Configuring VRRP

Basic VRRP configuration


Interface Addr. = 10.0.0.1/16 Interface Addr. = 10.0.0.2/16
VRID=1; Addr. = 10.0.0.1/16 VRID=1; Addr. = 10.0.0.1/16

R1 VRID = 1 R2

Master 10.0.0.1/16 Backup

Default Route = 10.0.0.1/16

ZTE University univ.zte.com.cn


TheinformationcontainedinthefileissolelypropertyofZTEcorporation.Anykindofdisclosingwithoutpermissionisprohibited.
Configuration of Router R1

Interface Addr. = 10.0.0.1/16 Interface Addr. = 10.0.0.2/16


VRID=1; Addr. = 10.0.0.1/16 VRID=1; Addr. = 10.0.0.1/16

R1 VRID = 1 R2

Master 10.0.0.1/16 Backup

Default Route = 10.0.0.1/16

1: interface create ip test address-netmask 10.0.0.1/16 port et.1.1


2: ip-redundancy create vrrp 1 interface test
3: ip-redundancy associate vrrp 1 interface test address 10.0.0.1/16
4: ip-redundancy start vrrp 1 interface test
ZTE University univ.zte.com.cn
TheinformationcontainedinthefileissolelypropertyofZTEcorporation.Anykindofdisclosingwithoutpermissionisprohibited.
Configuration for Router R2

Interface Addr. = 10.0.0.1/16 Interface Addr. = 10.0.0.2/16


VRID=1; Addr. = 10.0.0.1/16 VRID=1; Addr. = 10.0.0.1/16

R1 VRID = 1 R2

Master 10.0.0.1/16 Backup

Default Route = 10.0.0.1/16

1: interface create ip test address-netmask 10.0.0.2/16 port et.1.1


2: ip-redundancy create vrrp 1 interface test
3: ip-redundancy associate vrrp 1 interface test address 10.0.0.1/16
4: ip-redundancy start vrrp 1 interface test
ZTE University univ.zte.com.cn
TheinformationcontainedinthefileissolelypropertyofZTEcorporation.Anykindofdisclosingwithoutpermissionisprohibited.
Symmetrical Configuration

Master for VRID= 1, Backup for VRID=2 Master for VRID= 2, Backup for VRID=1

Interface Addr. = 10.0.0.1/16 Interface Addr. = 10.0.0.2/16


VRID=1; Addr. = 10.0.0.1/16 VRID=1; Addr. = 10.0.0.1/16
VRID=2; Addr. = 10.0.0.2/16 VRID=2; Addr. = 10.0.0.2/16

R1 VRID = 1 VRID = 2 R2

Master 10.0.0.1/16 10.0.0.2/16 Backup

Default Route = 10.0.0.1/16 Default Route = 10.0.0.2/16

ZTE University univ.zte.com.cn


TheinformationcontainedinthefileissolelypropertyofZTEcorporation.Anykindofdisclosingwithoutpermissionisprohibited.
Configuration of Router R1

Master for VRID=1 Backup for VRID=2 Master for VRID=2 Backup for VRID=1
Interface Addr. = 10.0.0.1/16 Interface Addr. = 10.0.0.2/16
VRID=1; Addr. = 10.0.0.1/16 VRID=1; Addr. = 10.0.0.1/16
VRID=2; Addr. = 10.0.0.2/16 VRID=2; Addr. = 10.0.0.2/16

R1 VRID = 1 VRID = 2 R2

Master 10.0.0.1/16 10.0.0.2/16 Backup

Default Route = 10.0.0.1/16 Default Route = 10.0.0.2/16

1: interface create ip test address-netmask 10.0.0.1/16 port et.1.1


2: ip-redundancy create vrrp 1 interface test
3: ip-redundancy create vrrp 2 interface test
4: ip-redundancy associate vrrp 1 interface test address 10.0.0.1/16
5: ip-redundancy associate vrrp 2 interface test address 10.0.0.2/16
6: ip-redundancy start vrrp 1 interface test
7: ip-redundancy start vrrp 2 interface test
ZTE University univ.zte.com.cn
TheinformationcontainedinthefileissolelypropertyofZTEcorporation.Anykindofdisclosingwithoutpermissionisprohibited.
Configuration of Router R2

Master for VRID=1 Backup for VRID=2 Master for VRID=2 Backup for VRID=1
Interface Addr. = 10.0.0.1/16 Interface Addr. = 10.0.0.2/16
VRID=1; Addr. = 10.0.0.1/16 VRID=1; Addr. = 10.0.0.1/16
VRID=2; Addr. = 10.0.0.2/16 VRID=2; Addr. = 10.0.0.2/16

R1 VRID = 1 VRID = 2 R2

Master 10.0.0.1/16 10.0.0.2/16 Backup

Default Route = 10.0.0.1/16 Default Route = 10.0.0.2/16

1: interface create ip test address-netmask 10.0.0.2/16 port et.1.1


2: ip-redundancy create vrrp 1 interface test
3: ip-redundancy create vrrp 2 interface test
4: ip-redundancy associate vrrp 1 interface test address 10.0.0.1/16
5: ip-redundancy associate vrrp 2 interface test address 10.0.0.2/16
6: ip-redundancy start vrrp 1 interface test
7: ip-redundancy start vrrp 2 interface test
ZTE University univ.zte.com.cn
TheinformationcontainedinthefileissolelypropertyofZTEcorporation.Anykindofdisclosingwithoutpermissionisprohibited.

You might also like