cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6130
Views
0
Helpful
3
Replies

HSRP Secondary address

aretsu
Level 1
Level 1

Hello,

Just a question about HSRP best practices:

I have two routers running HSRP on different IP segments using secondary IP addresses, with the following configuration:

ROUTER 1:

interface FastEthernet0/0

ip address 172.16.1.2 255.255.255.0 secondary

ip address 192.168.1.2 255.255.255.0

standby 1 ip 172.16.1.1

standby 1 priority 120

standby 1 preempt

standby 2 ip 192.168.1.1

standby 2 priority 120

standby 2 preempt

ROUTER 2:

interface FastEthernet0/0

ip address 172.16.1.3 255.255.255.0 secondary

ip address 192.168.1.3 255.255.255.0

standby 1 ip 172.16.1.1

standby 1 priority 106

standby 1 preempt

standby 2 ip 192.168.1.1

standby 2 priority 106

standby 2 preempt

I see that there is the possibility to configure HSRP with secondary addresses, like this:

ROUTER 1:

standby 1 ip 172.16.1.1 secondary

standby 1 ip 192.168.1.1

standby 1 priority 120

standby 1 preempt

ROUTER 2:

standby 1 ip 172.16.1.1 secondary

standby 1 ip 192.168.1.1

standby 1 priority 106

standby 1 preempt

What would be the recommendation for this? Is there a best practice for this situation?

Thanks a lot!

Alex

3 Replies 3

Alex,

Here's what CCO says about the secondary keyword.

-----------------------x---------------------

(Optional) The keyword secondary means the IP address is a secondary hot standby router interface. If neither router is designated as a secondary or standby router and no priorities are set, the primary IP addresses are compared and the higher IP address is the active router, with the next highest as the standby router.

-------------------x-----------------------

As you can see from the above explanation the keyword forces that device to be the standby router for that group. In other words, this command is an alternative to designate one device as the active router and the other one as a secondary/standby router.

Hence, you can't use the second configuration as that would force both devices to be the standby router for 172.16.1.0/24 subnet.

Hope this helps!

Sundar

Thanks for your answer Sundar, however it is not very clear for me yet, I looked at the command reference and see the following description for the secondary keyword:

(Optional) Indicates the IP address is a secondary Hot Standby router interface. Useful on interfaces with primary and secondary addresses; you can configure primary and secondary HSRP addresses.

It also presents an example for the configuration:

ip address 1.1.1.1. 255.255.255.0

ip address 1.2.2.2. 255.255.255.0 secondary

ip address 1.3.3.3. 255.255.255.0 secondary

ip address 1.4.4.4. 255.255.255.0 secondary

standby ip 1.1.1.254

standby ip 1.2.2.254 secondary

standby ip 1.3.3.254 secondary

As you can see there are multiple IP addresses and under the HSRP configuration there are also multiple IP Addresses under the same HSRP group.

As far as I can see my example is basically the same as this one.

Could you help me with this.

Thanks!

Alex

Alex,

Thanks for bringing it up!!

I tried the same setup in my lab, the one command lookup tool shows, and that confirms your suspicion. Yes, the 'standby ip

[secondary]' command works in conjunction with secondary address and the router that's active for primary subnet becomes the active router for all the secondary subnets as well.

BTW, all the standby addresses, including the ones with secondary keyword, have to be configured under the same group for this to work. If you decide to choose this configuration, don't forget to configure the 'standby preempt' command on the active router as the example doesn't show it.

Hopefully, this should help you decide whether this is the configuration you need.

Hope this helps!

Regards,

Sundar

Review Cisco Networking for a $25 gift card