cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
604
Views
4
Helpful
5
Replies

HSRP Configuration Basic

khnrjm
Level 1
Level 1

I am a little confused about the HSRP protocol. I would like some help with this. In the CCNA tutorial, the HSRP protocol is configured on the interface port itself (e.g. Gi0/0/0).

However, in an enterprise environment, this is not what I have been experienced. Here it is configured on a vlan interface.

CCNA example:

R1(config)#interface GigabitEthernet 0/0/0
R1(config-if)#ip address 192.168.1.2 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#standby 1 ip 192.168.1.1

Enterprise example:

interface GigabitEthernet1/0/4
description routerBackup Gi1/0/4
switchport trunk allowed vlan 225, 240, 260, 400
switchport mode trunk
switchport nonegotiate
logging event trunk-status
no snmp trap link-status
service-policy output SOFTMAX
!

interface Vlan225
description Prod_Vlan225
ip address 10.185.245.253 255.255.255.0
ip helper-address 10.97.3.11
ip helper-address 10.160.160.5
ip helper-address 10.160.75.4
no ip redirects
no ip proxy-arp
standby version 2
standby 0 ip 10.185.245.254
standby 0 timers 1 3
standby 0 preempt

My question is what is the difference between the two methods. Which one do you prefer in a live environment? Which is more preferable?

Thank you for your answer in advance.

5 Replies 5

First config is for Pure L3 router 

Second one is for L3SW (L2 SW but routing is enable)

mkazam001
Level 3
Level 3

Hi,
You configure HSRP to provide redundancy for your VLAN Default Gateway/s.
The IP address can be configured direclty on a L3 switch (using the no switchport cmd) or a router port,
as in your R1 example or it can be configured on an SVI (switched virtual interface) as in your enterprise example.
If you configure the IP on the physical ports themselves then you may run out of ports, so these are often configured on the SVIs
or logical interfaces as you can then use a trunk port to allow multiple VLANs across it.
You can also do the same on routers using a single physical interface & multiple logical sub-interfaces for the different VLANs.
regards
kazam

Joseph W. Doherty
Hall of Fame
Hall of Fame

HSRP is known as a FHRP (first hop reduncy protocol), i.e. a protocol generally used with gateway interfaces.

As both physical ports (like your CCNA example) or other interface kinds (like your Enterprise SVI example) can be used as a gateway interface, both are legitimate case examples.  (If fact, you can mix and match such interface kinds in a HSRP group.)

So, as to which is preferred depends on your needs and equipment being used.

If fact, if you were working in a mixed vendor environment, you would likely be using VRRP.  Or, even in a Cisco only environment, GLBP might be a better choice in some cases.  Or, if using some form of virtual switch, you wouldn't need a FHRP at all.

BTW, your Enterprise example uses HSRPv2, which it a improved variant which you may, or may not, see being used in real-world networks.  (In the real-world there's much inertia to upgrading configurations unless there's a compelling reason to do so.)

As others have mentioned its just the features and functionality needed either in real life or a lab scenario. If this is for an exam it should be obvious which one is needed/used. As you can see my screenshot below the same commands are entered on a switch under an interface VLAN and one is done on a router. The router has "slightly" more functionality like BFD support and more authentication modes for VRRP. Other higher end L3 switches may provide the same functionality as the routers do. 

Left: Router                              Right: Switch

DavidRuess_1-1696525024480.png

 

-David

khnrjm
Level 1
Level 1

I appreciate all for your replies!

Review Cisco Networking for a $25 gift card