HSRP Configuration – Both Sides of Router

ciscofhrphsrppacket-tracerrouter

i tried to create a simple network topology to test the Hot standby router protocol gateway for "server2" and "server3", and the architecture is shown in the figure below.

rp

i would like to clarify some doubts before configuring the hsrp group and settings, and hope someone could answer:

  1. in this topology, i should configure a HSRP group on interface 0/0/1(192.168.1.0 network) of router7 and router8, and configure another HSRP group on interface 0/0/0(172.24.0.0 network) of router7 and router8 to allow the connectivity between server2 and server3?

  2. does the HSRP group mean the some interfaces of some routers(g0/0/0 of R7 & R8)? or it mean the whole router devices are included(R7 & R8)?

  3. is it possible to configure one-way HSRP in this topology and also assure connectivity between servers? e.g. HSRP virtual gateway for server3 only

  4. can a HSRP group include more than one standby router?

thanks for answring the dumb questions:|


Edit:

here's the configuration of the HSRP, as shown in figure below

enter image description here

i designed a virtual gateway for server3, some settings on g0/0/0 of R7 & R8 and made R7 as active while R8 as standby, but for server2 i only gave it a common gateway which is 192.168.1.3 on R8 with no HSRP; the connectivity between server2 & server3 is fine.

however, i found that if Router8 does down then the connectivity between servers will loss. so if i want to ensure the gateway redundency for both servers then i should set HSRP group on both sides of the gateway?

another question is, why does the command "preempt" necessary to set? i thought the standby router will automatically perform the preemption?

sorry for the unclear questions that previously asked.

thanks in advance!!!

Best Answer

  1. in this topology, i should configure a HSRP group on interface 0/0/1(192.168.1.0 network) of router7 and router8, and configure another HSRP group on interface 0/0/0(172.24.0.0 network) of router7 and router8 to allow the connectivity between server2 and server3?

HSRP is configured per interface, and the interface must be able to connect to the corresponding router interface on the same LAN because they must communicate on the LAN to determine which is the active router.

  1. does the HSRP group mean the some interfaces of some routers(g0/0/0 of R7 & R8)? or it mean the whole router devices are included(R7 & R8)?

An HSRP group is per interface, and you can have multiple groups per interface.

  1. is it possible to configure one-way HSRP in this topology and also assure connectivity between servers? e.g. HSRP virtual gateway for server3 only

I really do not understand what you mean by "one-way HSRP." HSRP needs to communicate between the routers on a LAN, otherwise, they will both think they are the active router. HSRP has nothing to do with connectivity between the servers, other than to fool each server into thinking it is communicating with a real router instead of a virtual router.

  1. can a HSRP group include more than one standby router?

No. You can have more than two routers in a standby group, but there will be one active and one standby router. When the active router is down, the standby assumes the active role, and a new standby router is elected.


Cisco has a lot of documents about HSRP, for example: Hot Standby Router Protocol Features and Functionality.


If you provide your configurations, we could help explain what may not work.


Edit:

however, i found that if Router8 does down then the connectivity between servers will loss. so if i want to ensure the gateway redundency for both servers then i should set HSRP group on both sides of the gateway?

Yes, Set up HSRP on both sides, but the HSRP group on the other side of the routers will be a different HSRP group, even if you use the same group number, because it will be configured on a different interface.

another question is, why does the command "preempt" necessary to set? i thought the standby router will automatically perform the preemption?

Preempt is an interesting subject. If the active router cannot communicate with the standby router, then the standby router will become active. Preempt lets the standby router become active if the active router priority falls below the standby router priority, even if the standby and active routers can still communicate. You can do this if you use tracking for an interface:

R7:

track 1 interface GigabitEthernet0/0/1
!
interface GigabitEthernet0/0/0
 standby 1 ip 172.24.0.254
 standby 1 priority 105
 standby 1 track 1 decrement 10   ! decrements the priority by 10 if G0/0/1 goes down
 standby 1 preempt delay 10       ! preempts with a delay to counter bouncing interfaces
!

R8:

track 1 interface GigabitEthernet0/0/1
!
interface GigabitEthernet0/0/0
 standby 1 ip 172.24.0.254
 standby 1 priority 100
 standby 1 track 1 decrement 10   ! decrements the priority by 10 if G0/0/1 goes down
 standby 1 preempt delay 10       ! preempts with a delay to counter bouncing interfaces
!

You can use preempt on both routers so that it will fail back to the first router if the priority gets back higher than the original standby router. You can use a delay on the preempt to keep the active router from bouncing back and forth with a flaky circuit or interface.

Do the same thing for the other router interfaces, but track the opposite interfaces (different tracking number), and you should be able to pull any cable, down any interface, or kill any router, and the connectivity between the servers should remain. You may lose a few seconds of connectivity, but it will come back. When you restore what you failed, it should switch back to the original.


A good design would include a direct link between the two routers with, at least a couple of static routes on each, pointing to the other router. The directly connected interfaces will prevent the use of the static routes until an interface goes down, but then a static router for the down interface will be installed in the routing table of the router with the failed interface, pointing to the other router. You could also use a routing protocol between the two routers.