HSRP is designed to increase the redundancy in LAN gateways. It does this by creating a Virtual MAC address and Virtual IP address.
One router of the "group" is elected as the "active" and the other the "standby", therefore once the "active" router, say for example gets accidentally turned off, the "standby" takes over.
Here is the picture of the lab:

Here is the important configuration:
R2
interface FastEthernet0/0
 ip address 10.0.0.2 255.255.255.0
 duplex auto
 speed auto
!This is the virtual ip group 1
 standby 1 ip 10.0.0.253
!I want this router to be the active router
 standby 1 priority 12
!Take over active when your priority is higher
 standby 1 preempt
!Any name here
 standby 1 name Load1
!When this interface goes down, decrease my priority by 10
 standby 1 track Serial0/0
!This is the virtual ip group 2
 standby 2 ip 10.0.0.254
!I want this router to be the standby router
 standby 2 priority 11
!Take over active when your priority is higher
 standby 2 preempt
!Any name here
 standby 2 name Load2
!When this interface goes down, decrease my priority by 10
 standby 2 track Serial0/0
R3
interface FastEthernet0/0
 ip address 10.0.0.3 255.255.255.0
 duplex auto
 speed auto
 standby 1 ip 10.0.0.253
 standby 1 priority 11
 standby 1 preempt
 standby 1 name Load1
 standby 1 track Serial0/0
 standby 2 ip 10.0.0.254
 standby 2 priority 12
 standby 2 preempt
 standby 2 name Load2
 standby 2 track Serial0/0
Note that for the load balancing to work 50% of the devices have 10.0.0.253 as their default gateway and the other 50% have 10.0.0.254.
Enjoy :)
No comments:
Post a Comment