HSRP Configuration on GNS3 is a continuation of our CCNA GNS3 Labs for Cisco IOS. we have done so far SSH configuration, DNS server setup, Telnet Access. Today we’ll do HSRP configuration. Hot Standby Router Protocol (HSRP) is a Cisco proprietary First Hop Redundancy Protocol (FHRP). HSRP works by simply configuring one or more routers to be part of HSRP group. One of the routers will act as Primary ( Active) router while the other as Secondary (Standby) router.
If the primary router (gateway) fails, the Standby router will take over as Active router. Physical routers configured as part of same HSRP group share same virtual gateway address. The router which is part of HSRP group with highest priority will be elected as the Active router. The default HSRP priority is 100. All network hosts on same subnet as the gateways must be assigned the Virtual IP address as their default gateway. The primary ( Active) router will be forwarding packets destined to the virtual gateway IP address of the HSRP group, secondary router performs this forwarding in the event that the Active gateway fails. There are two versions of HSRP supported by Cisco IOS software. Namely:
HSRP version 1:
- This is the default HSRP on Cisco IOS that is enabled when standby command is executed.
- It uses multicast address of 224.0.0.2
- It has Limited configurable HSRP groups of 255.
- Uses UDP port 1985 for sending and receiving Hello packets.
HSRP version 2:
- Uses multicast address 224.0.0.102 to send Hello messages.
- Uses UDP port number 1985
- Uses a Type/Length/Value (LTV) Hello packet format.
- HSRP groups 0-4095
HSRP preemption allows another gateway ( new router and member of HSRP group) with higher priority value to assume functionality of active gateway when Active router is already present for HSRP group.
In HSRP version 1, the virtual MAC address has a format 0000.0c07.acxx, where “xx” is the HSRP group number is hexadecimal format.
- The first 24 bits 0000:0c are vendor ID.
- Next 16 bits ( 07.ac) are HSRP ID.
The default Hello timer is 3 seconds and Hold Timer is 10 seconds (roughly 3 times the hello timer).
HSRP v2 mac address range is 0000:0C9F:F000 to 0000:009F:FFFF for virtual gateway address.
For our lab practice, we’ll use the topology below from GNS3.
Here are all the configurations to be performed.
R1 Configurations:
These are the commands to execute on R1 device.
config t
line console 0
exec-timeout 0 0
exit
interface e0/0
ip address 10.0.0.5 255.255.255.0
no shutdown
do wr
exit
Next we’ll add default route which is the IP address of Virtual router (VIP) and enable EIGRP routing protocol.
config term
ip route 0.0.0.0 0.0.0.0 10.0.0.3
router eigrp 10
network 0.0.0.0
exit
copy run start
end
R2 Configurations:
On R2 run the following commands:
config t
line console 0
no exec-timeout
exit
int f0/0
ip address 10.0.0.2 255.255.255.0
standby ip 10.0.0.3
no shutdown
do wr
exit
interface f0/1
ip address 192.168.1.2 255.255.255.0
no shut
end
Configure EIGRP routing protocol.
config t
router eigrp 10
network 0.0.0.0
end
R3 Configurations:
config t
line console 0
no exec-timeout
exit
interface f0/0
ip address 10.0.0.1 255.255.255.0
standby ip 10.0.0.3
standby priority 102
standby preempt
no shutdown
do wr
exit
int f0/1
ip address 192.168.1.1 255.255.255.0
no shut
end
EIGRP Configuration
config t
router eigrp 10
network 0.0.0.0
exit
wr
R4 Configurations:
config t
line console 0
exec-timeout 0 0
exit
interface e0/0
ip address 192.168.1.5 255.255.255.0
no shutdown
exit
Enabling EIGRP routing protocol.
config term
router eigrp 10
network 0.0.0.0
exit
copy run start
end
If you’ve captured you traffic with wireshirk and do a ping from R1 to R4, you’ll see timers, port number and VIP.
Currently, R3 is the Active router. If we shutdown the interface facing 10.0.0.0 network, R2 will take over as Active router handling tasks for VIP.
The following images illustrate that. Before R3 f0/0 interface shutdown
After shutting down R3 f0/0 interface. R3 interface shutdown
config t
interface f0/0
shutdown
R2 will take over as active router. This can be confirmed with show standby command in privileged mode of R2.
That’s all. Hope this has been informative for you.