Vous êtes sur la page 1sur 9

The Host Standby Router Protocol (HSRP).

The Host Standby Router Protocol (HSRP) is a Cisco proprietary protocol, as detailed
in RFC 2281. HSRP provides gateway redundancy by sharing IP and MAC addresses
between redundant gateways. The protocol consists of virtual MAC and IP addresses
that are shared between two or more routers that belong to the same HSRP group.

How HSRP works.


HSRP can be configured on a cisco router as a virtual router to be used in the
routing of packets when the active router interface fails. Basically, what HSRP does is
to stand in as a backup router, standing by for when the active router gateway
interface fails.
This virtual router is configured with a single IP address (layer 3) and MAC
address (layer 2) which is shared among two or more router on a LAN segment.
The IP address of the virtual router is configured as the default gateway for the clients
on a specific IP segment. When frames are sent from the clients to the default
gateway, the clients will use ARP to resolve the MAC address that is associated with
the IP address of the default gateway. The ARP then replies with the MAC address of
the virtual router. Frames that are sent to the MAC address of the virtual router can
then be physically processed by any active or standby router that is part of that virtual
router group.
HSRP can be classified as a redundancy protocol that provide a mechanism for
determining which router should take the active role in forwarding traffic and
determining when that role must be taken over by a standby router.

HSRP Terms.

Active router: The router that is currently forwarding packets for the virtual router
Standby router: The primary backup router
Standby group: The set of routers participating in HSRP that jointly emulate a virtual
router
The primary function of the HSRP standby router (virtual) is to monitor the
functioning status of the HSRP group and to quickly assume packet-forwarding
.responsibility if the active router fails

:These are the steps that take place when a router or Layer-3 device (switch) fails
.The standby router stops receiving hello messages from the forwarding router
.The standby router assumes the role of the forwarding router

.2

.1

Because the new forwarding router (standby router) assumes both the IP and
.3
MAC addresses of the virtual router, the connected network devices see no disruption
.in service

Using the diagram above we are going to configure R1 and R2 for HSRP using the
virtual IP address of 10.1.20.1
R1 will be configured as the Active HSRP default-gateway and R2 will be configured
.as Standby
.The Preempt command is configured on both routers

HSRP on R1
R1(config)# interface Gi0/0
R1(config-if)# ip address 10.1.20.2 255.255.255.0
R1(config-if)# standby 1 ip 10.1.20.1
R1(config-if)# standby 1 priority 110
R1(config-if)# standby 1 preempt
HSRP on R2
R2(config)# interface Gi0/0
R2(config-if)# standby 1 ip 10.1.20.1
R2(config-if)# standby 1 preempt

?What is Virtual Router Redundancy Protocol VRRP

Unlike HSRP which is Cisco proprietary, VRRP is a Redundancy Protocol which


.operates in a network with multi-vendor devices
VRRP offers the same benefits of HSRP, VRRP operates similar to HSRP by electing
an active router called the Master among a group of routers that stores a configured
.virtual IP and MAC address
Similar with HSRP, when there is a failure on the active router interface, VRRP would
trigger the standby router (backup) to then become the Master and subsequently
.forward the clients traffic
.VRRP uses multicast (224.0.0.18) for its hello mechanism and elections
.How VRRP Works

.VRRP Router Priority


An important feature of the VRRP redundancy operation is the VRRP router priority.
VRRP Priority defines the role that each VRRP router plays and what happens if the
.virtual router master fails
If a VRRP active router is configured with the IP address of the virtual router and the
.IP address of the physical interface, this router will function as a virtual router master
You use the vrrp priority command to enable the a VRRP router to functions as a
virtual router as well as a backup should the virtual router master fails. You can
configure the priority of each virtual router backup with a value of 1 through 254
.using the vrrp priority command
For example, if Router A, the virtual router master in a vrrp group fails, an election
process takes place to determine if virtual router backups B or C should take over. If
Routers B and C are configured with the priorities of 90 and 100, respectively, Router
.B is elected to become virtual router master because it has the higher priority
If Routers B and C are both configured with the priority of 100, the virtual router
.backup with the higher IP address is elected to become the virtual router master
.VRRP Preemption
Unlike in HSRP, VRRP preemption is enabled by default, which enables a higher
priority virtual router backup that becomes accessible to take over from the virtual
.router backup that was elected to become virtual router master
However, pre-emption can be disabled using the no vrrp preempt command. If
preemption is disabled, the virtual router backup that is elected to become virtual

router master remains the master until the original virtual router master recovers and
.becomes master again
.VRRP Advertisements
The virtual router (master) sends VRRP advertisements to other VRRP routers in the
same group. The priority and state of the virtual router master are carried in the
.advertisements
The VRRP advertisements are encapsulated in IP packets and sent to the IP Version
.multicast address assigned to the VRRP group
Advertisements are sent every second by default; you can also configure what
.intervals you want the adverts sent

How to configure VRRP on Cisco Router.

.We are going to use the topology below for an vrrp configuration example
we will configure VRRP on R1 and R2 using the virtual IP address 10.1.20.1 and
. priority command with the value 10 on R1

R1(config)# interface Gi0/0


R1(config-if)# ip address 10.1.20.2 255.255.255.0
R1(config-if)# vrrp 10 ip 10.1.20.1
R1(config-if)# vrrp 10 priority 100

R1(config-if)# end
R2
R2(config)# interface Gi0/0
R2(config-if)# ip address 10.1.20.3 255.255.255.0
R2(config-if)# vrrp 10 ip 10.1.20.1
R2(config-if)# end
From the above, we configured VRRP on R1 and R2 using the virtual IP address
. 10.1.20.1 and priority command with the value 10 on R1
You can see that the vrrp group preempt command is not used because preempt is
.enabled by default for VRRP
If you need to turn preempting off for any circumstance, use the command no vrrp
.group preempt

Understanding Gateway Load Balancing Protocol (GLBP)

Gateway Load Balancing Protocol (GLBP) is a Cisco proprietary solution for


.redundancy and load balancing in an IP network
GLBP allow automatic selection and simultaneous recovery from first hop router
.failures
GLBP provides load balancing over multiple (router) gateways using a single virtual
.IP address and multiple virtual MAC addresses
Each host is configured with the same virtual IP address, and all routers in the virtual
.router group participate in forwarding packets
.How GLBP Works

GLBP works by making use of a single virtual IP address, which is configured as the
.default gateway on the hosts
The different routers that assume the forwarding role use different virtual MAC
.addresses for the same virtual IP address which is used to forward packets
Unlike HSRP and VRRP, GLBP does not use a single virtual MAC address for the
entire group. Instead, the AVG assigns different virtual MAC addresses to each of the
.physical routers in the group
There are two types of routers in a GLBP group use in redundancy and load
:balancing
:Active Virtual Gateway(AVG)
Within a GLBP group,one virtual router (gateway) is elected as the Active Virtual
Gateway(AVG), and its responsible for the operation of the protocol. This AVG router
has the highest priority value or IP address in the group, it responds to all ARP
.requests for MAC addresses which it send to the virtual router IP address
Active Virtual Forwarder (AVF)
A router within a GLBP group is elected as Active Virtual Forwarder (AVF) This AVF
is responsible for forwarding packets sent to the mac address returned by the AVG
.router. Multiple active virtual forwarders can exist for each GLBP group
So, when a client needs to send packet to known default gateway (AVG) with
configured IP address, it requests for the MAC address by sending an ARP (address
.resolution protocol) request on the subnet

The AVG will respond to these ARP requests with the virtual MAC address of each
.active virtual forwarders, based on a configured load sharing algorithm

.Types of GLBP load Balancing Mechanism

: There are two load-balancing mechanism that is used with GLBP. These including
Round-robin: The default one. Each AVF in turn is included in address resolution .1
.replies for the virtual IP address
Host-dependent: Based on the MAC address of a host where the same forwarder is .2
.always used for a particular host
.Weighted: Based on weight dependent share of user between routers
GLBP Load Balancing mechanism States.

.There are different states for AVG and AVF in a GLBP group
:AVG is having six states. These including
.Disabled : means no Virtual IP address configured -1
Initial : means the virtual IP address configured but virtual gateway configuration is -2
.incomplete

.Listen : receiving hello messages and ready to speak state if AVG unavailable 3
.Speak : means the Virtual gateway is attempting to become the AVG 4
.Standby : ready to become the next AVG 5
Active : means the current AVG and responsible for responding to ARP requests 6
.for the virtual IP address
:AVF is having four states. These including
.Disabled : means no Virtual MAC address assigned -1
Initial : The virtual MAC address is OK but virtual forwarder configuration is 2
.incomplete
Listen : Virtual forwarder is receiving hello and ready to active state if AVF 3
.unavailable
Active : current AVF and responsible for forwarding packets sent to the virtual 4
.forwarder MAC address
Benefits of GLBP

Allows full use of resources on all devices without the administrative burden of *
creating multiple groups
Provides a single virtual IP address and multiple virtual MAC addresses *
Routes traffic to single gateway shared evenly across multiple routers *
Provides automatic rerouting in the event of any failure *
Summary
Active Virtual Router (AVG) .1
.Assigns Mac Address to the member of GLBP group <
Responds to ARP requests <
Virtual Forwarders (AVF) .2
Forwards for given Mac address <

Vous aimerez peut-être aussi