How to Use Secondary IP Addresses With HSRP

Step 1 – Decide how many groups that you need. The first group is the primary Internet protocol (IP) on the interface. Any additional IPs are secondary entries and each IP has its own group. This group includes the range of IPs that the hosts will also fall under. The first IP of the range is for the standby IP of the “virtual router” and is passed back and forth between the two switches. The next two IPs are for the interface on each router that will participating in the group. All other IPs in the range belong to the hosts that are connected to the switch.

Step 2 – Identify what IPs you will be using for each group. Dividing (subnetting) IPs to ensure that there is not an IP conflict takes time and math skills. Waiting until the last minute to assign IPs for the maintenance can put you in a crunch for time. Plan on one subnet per group to keep the hosts on their own local area network (LAN). Hosts need one IP address each so be sure to include the three IPs to cover your two interfaces and the virtual router ID. Allocation for the interface is needed to ensure you are not short on host addresses.

Step 3 – Configure the new group under the existing interfaces. If you already have HSRP deployed in your network it will look similar to the following:

 

 

 

interface Ethernet4

 

IP address 192.168.0.2 255.255.255.0

 

standby 10 IP 192.168.0.1

 

standby preempt

 

standby 10 priority 172

 

standby 10 authentication password

 

standby 10 timers 2 6

 

To add a secondary or another group add the following commands

 

“IP address 192.168.40.2 255.255.255.0 secondary” (adds the new scope)

 

“standby 30 IP 192.168.40.1” (adds the gateway or first IP for the virtual router to group 30)

 

“standby 30 authentication route” (adds the password to group 30)

 

 

 

Group numbers 0-255 can be used and each interface will support up to 15 different groups.  The Group numbers that are used do not have to be in any certain order.  You can jump around and skip numbers in between or follow contiguous number schemes but no there is no benefit either way.  The rule of only 16 groups applies on a per interface basis and you must reuse the same group numbers on the next interface.

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.