in this lab i just use 1 vlan, it didn't work when i have multiple vlan. will work around to solve this problem.
primary gateway is on R1, everytime R1 fail, R2 will take over the gateway.
configure sub interface for fa 0/1 on R1
interface FastEthernet0/1
no ip address
duplex auto
speed auto
!
interface FastEthernet0/1.1
description MG VLAN
encapsulation dot1Q 1 native //follow the vlan number, in this case HSRP for vlan 1
ip address 172.16.1.2 255.255.255.0
standby 1 ip 172.16.1.9 //choose a group number, must be same with the other side
standby 1 priority 150 //default value is 100, higher number got the priority to be primary
configure sub interface for fa 0/0 on R2
interface FastEthernet0/0
no ip address
duplex auto
speed auto
!
interface FastEthernet0/0.1
encapsulation dot1Q 1 native
ip address 172.16.1.3 255.255.255.0
standby 1 ip 172.16.1.9
configure the password for telnet (line vty) on all devices to test the telnet connectivity later
line vty 0 4
password cisco
login
give an ip address for interface vlan 1 on switch (routed interface for this vlan)
interface Vlan1
ip address 172.16.1.1 255.255.255.0
set port to be trunked to the router
interface GigabitEthernet0/4
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface GigabitEthernet0/5
switchport trunk encapsulation dot1q
switchport mode trunk
everything should work fine now, let's try
make sure both physical gateway and the HSRP/logical gateway are pingable from DLS1
previously we configure so R1 will have the higher priority, so it'll always be the primary. to confirm this, telnet to 172.16.1.9 from DLS1
good, now everything work as it should. what happen if the primary fail? and how long does it takes before HSRP notice and reroute the traffic? let's do the continuous ping from DLS1 to 172.16.1.9 and disconnect DLS1->R1 connection to know how many packet will be dropped before they change to secondary
by default HSRP will send hello packet to it's peer every 3 second, if the peer didn't reply within 3 hello packet then it's assumed as death, then secondary gateway will take over.
show standby to see the details for the standby configuration
cheers !
This comment has been removed by the author.
ReplyDeletehi there, nice meeting with you another Malaysian and great effort for your works. :) Drop by my site too, hope you find something useful. take care and cya... ^_^
ReplyDeletehttp://itcertguides.blogspot.com/
thanks mate ^_^ nice to meet u
ReplyDeleteHi,
ReplyDeleteNice work. Do you have a contact email? Would like to ask you something. Thanks
Hi all
ReplyDeleteI have subinterface on one router and another router without subinterface .
Are HSRP work with same the configuration above?
This comment has been removed by the author.
ReplyDelete