Sunteți pe pagina 1din 6

HSRP configuration with GNS3: Step by step | NetJNL

1 de 6

https://netjnl.wordpress.com/2013/08/10/hsrp-configuration-with-gns3-...

NetJNL
Networks and Computer Security

HSRP configuration with GNS3: Step by step


By javiernl90 on August 10, 2013

i
3 Votes
You can nd the spanish post in: Conguracin de HSRP en GNS3 (Asegurando alta disponibilidad
de routers Cisco): Paso a paso (h+ps://netjnl.wordpress.com/2013/08/03/hot-standby-router-protocolhsrp-conguracion-por-gns3/)

What is HSRP (Hot Standby Router Protocol)?


It is a layer 3 protocol of the OSI model, developed by Cisco to provide redundancy at this level and
at the Gateway, between two or more Cisco devices.
HSRP uses a virtual MAC and IP address, which used in the event of a failure in any of the
congured routers.

Operation
It uses a router in Active mode (primary) and another in Standby mode (secondary).
These routers communicate by sending packets hello, from the primary router to router set to
standby. If for a certain time the primary router doesnt send any packets, the secondary router will
be active, taking responsibility for the congured virtual IP.

14-04-2015 10:15

HSRP configuration with GNS3: Step by step | NetJNL

https://netjnl.wordpress.com/2013/08/10/hsrp-configuration-with-gns3-...

There are ve states in HSRP:


1. Initial: Is the initial state of the router when the interface is lifted.
2. Listen: It just listen packets hello and knows the virtual IP.
3. Speak: In this state, its may send packets hello and participate to the choice of primary router
(Active) or secundario (Passive).
4. Standby: Is the router in passive mode but it can switch to active mode when the circumstances
change.
5. Active: It is the primary router responsible for sending packets to the congured virtual IP.

Configuration
The example set by GNS3 tool, has the following schema:

(h+ps://netjnl.les.wordpress.com/2013/08/hsrp.png)
The conguration of routers 2 and 4, which are respectively in Active mode (primary) and Standby
(secondary), is the following

R2(config)#int f0/0
R2(config-if)#ip address 10.0.0.2 255.255.255.248
R2(config-if)#standby ip 10.0.0.4
R2(config-if)#standby preempt
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#exit
R2#wr

The virtual IP will be 10.0.0.4


The standby mode of preempt, makes the router with the highest priority becomes the active
router. In the event that both priorities are the same, then the router with the highest IP address will
become the active router.
The priority by default is 100.
Se+ings are saved with the command wr

2 de 6

14-04-2015 10:15

HSRP configuration with GNS3: Step by step | NetJNL

3 de 6

https://netjnl.wordpress.com/2013/08/10/hsrp-configuration-with-gns3-...

R4#configure terminal
R4(config)#int f0/0
R4(config-if)#ip add 10.0.0.3 255.255.255.248
R4(config-if)#standby 0 ip 10.0.0.4
R4(config-if)#standby priority 99
R4(config-if)#no shutdown
R4(config-if)#exit
R4(config)#exit
R4#wr
Building configuration...
[OK]

The priority by default is 100, so to ensure that it has lower priority than the active router it must be
lower. In this case 99 for example
Se+ings are saved with the command wr

You must repeat the same process for the other subnet (10.0.0.8), following
the same steps.

The router configurations 1 and 3, follow the same basic configuration as


explained in: Configurar una red de routers Cisco con GNS3
(https://netjnl.wordpress.com/2013/08/01/configuracion-de-red-en-routerscisco/)

Check configuration
To verify conguration, proceed to see the conguration of the router 4 by the command show
standby before and after connecting the router 2.
Before disconnecting R2, it shows how their state is Standby among other parameters:

14-04-2015 10:15

HSRP configuration with GNS3: Step by step | NetJNL

https://netjnl.wordpress.com/2013/08/10/hsrp-configuration-with-gns3-...

R4#show standby
FastEthernet0/0 - Group 0
State is Standby
4 state changes, last state change 00:00:18
Virtual IP address is 10.0.0.4
/***********Salida omitida**********/
Active router is 10.0.0.2, priority 100 (expires in 7.948 sec)
Standby router is local
Priority 99 (configured 99)

After disconnecting the router 2 router, it is shown as active router and it also shows how the router
in standby status is unknown. Since there are none at the moment:

R4#show standby
FastEthernet0/0 - Group 0
State is Active
/******Salida omitida****/
Active router is local
Standby router is unknown
Priority 99 (configured 99)
IP redundancy name is "hsrp-Fa0/0-0" (default)
FastEthernet0/1 - Group 0

You can also check the conguration, it can show the current conguration using the command
show running-cong for example Router 2:

interface FastEthernet0/0
ip address 10.0.0.2 255.255.255.248
duplex auto
speed auto
standby ip 10.0.0.4
standby preempt
!
interface FastEthernet0/1
ip address 10.0.0.9 255.255.255.248
duplex auto
speed auto
standby ip 10.0.0.12
standby preempt
!

Current router conguration 4:

4 de 6

14-04-2015 10:15

HSRP configuration with GNS3: Step by step | NetJNL

https://netjnl.wordpress.com/2013/08/10/hsrp-configuration-with-gns3-...

interface FastEthernet0/0
ip address 10.0.0.3 255.255.255.248
duplex auto
speed auto
standby ip 10.0.0.4
standby priority 99
!
interface FastEthernet0/1
ip address 10.0.0.10 255.255.255.248
duplex auto
speed auto
standby ip 10.0.0.12
standby priority 99
!

Check Connection
It veries the connection of Router 1 to the other network, with routers 2 and 4 connected or
disconnected any of them:

R1#ping 10.0.0.10
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.0.10, timeout is 2
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max
R1#ping 10.0.0.12
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.0.12, timeout is 2
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max

seconds:
= 20/59/96 ms

seconds:
= 28/58/88 ms

You should also check the connection in the opposite way from the router 3 to 1.

Javier Nieto Len

REFERENCES

5 de 6

14-04-2015 10:15

HSRP configuration with GNS3: Step by step | NetJNL

6 de 6

https://netjnl.wordpress.com/2013/08/10/hsrp-configuration-with-gns3-...

h+p://www.networksorcery.com/enp/protocol/hsrp.htm (h+p://www.networksorcery.com
/enp/protocol/hsrp.htm)
h+p://www.redescisco.net/v2/art/redundancia-entre-routers-con-hsrp/ (h+p://www.redescisco.net
/v2/art/redundancia-entre-routers-con-hsrp/)
h+p://www.ciscopress.com/articles/article.asp?p=766858&seqNum=4 (h+p://www.ciscopress.com
/articles/article.asp?p=766858&seqNum=4)
h+p://www.gns3.net/ (h+p://www.gns3.net/)
h+p://www.cisco.com/ (h+p://www.cisco.com/)
Posted in: Cisco, GNS3, Networks, Protocols | Tagged: Cisco, Cisco Systems, Gateway, Hot Standby
Router Protocol, IP address, MAC address, Router, Standby Router Protocol, Virtual IP address

One response
Conguracin de HSRP en GNS3 (Asegurando alta disponibilidad de routers Cisco): Paso a
paso | NetJNL August 13, 2013 at 10:04 am | Reply
[] Se puede encontrar el post en Ingls en: HSRP conguration with GNS3: Step by step []

Blog at WordPress.com. The Retro-Fi3ed Theme.


Follow

Follow NetJNL
Build a website with WordPress.com

14-04-2015 10:15