Pages

Wednesday, March 31, 2010

Tuning HSRP - GNS3


configure PC, R1, R2 and R4 as below
PC
PC(config)#no ip routing
PC(config)#int fa 0/0
PC(config-if)#ip add 10.1.1.10 255.255.255.0
PC(config-if)#no shut

R1
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip add 10.1.1.1 255.255.255.0
R1(config-if)#no shut

R1(config)#int serial 0/0
R1(config-if)#ip add 172.16.1.2 255.255.255.252
R1(config-if)#clock rate 64000
R1(config-if)#no shut

R1(config)#router eigrp 1
R1(config-router)#no auto-summary
R1(config-router)#net 0.0.0.0
R2
R2(config)#int fa 0/0
R2(config-if)#ip add 10.1.1.2 255.255.255.0
R2(config-if)#no shut

R2(config)#int ser 0/0
R2(config-if)#ip add 172.16.2.2 255.255.255.252
R2(config-if)#clock rate 64000
R2(config-if)#no shut

R2(config)#router eigrp 1
R2(config-router)#no auto-summary
R2(config-router)#net 0.0.0.0
R4
R4(config)#int ser 0/0
R4(config-if)#ip add 172.16.1.1 255.255.255.252
R4(config-if)#no shut

R4(config-if)#int ser 0/1
R4(config-if)#ip add 172.16.2.1 255.255.255.252
R4(config-if)#no shut

R4(config-if)#int lo 0
R4(config-if)#ip add 192.168.1.1 255.255.255.255
R4(config-if)#

R4(config)#router eigrp 1
R4(config-router)#no auto-summary
R4(config-router)#net 0.0.0.0

make sure PC can ping all the interfaces on R1, R2 and R4 !! if can’t, troubleshoot it accordingly

create standby interface for PC and point the PC’s gateway to this address
R1(config)#interface fastEthernet 0/0
R1(config-if)#standby 1 ip 10.1.1.99
R1(config-if)#standby 1 priority 150
done for R1. 3rd line is to set R1 to have the higher priority, default value is 100. Configure same for R2 accept the 3rd line, leave default value for R2
R2(config)#interface fastEthernet 0/0
R2(config-if)#standby 1 ip 10.1.1.99

configure default-gateway for PC
PC(config)#ip default-gateway 10.1.1.99

let’s verify our configuration are working correctly
1st let check the prioritytraceroute from PC to 172.16.2.1  result should showing as below, since we set Interface 10.1.1.1 to have the higher priority
PC#traceroute 172.16.2.1
1  10.1.1.1 20 msec 16 msec
  2 172.16.1.1 40 msec 100 msec *
R1#sh stan
FastEthernet0/0 - Group 1
  State is Active
    17 state changes, last state change 00:00:47
  Virtual IP address is 10.1.1.99
  Active virtual MAC address is 0000.0c07.ac01
    Local virtual MAC address is 0000.0c07.ac01 (default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 0.224 secs
  Preemption disabled
  Active router is local
  Standby router is 10.1.1.2, priority 100 (expires in 8.972 sec)
  Priority 150 (configured 150)
  IP redundancy name is "hsrp-Fa0/0-1" (default)

then make sure failover are working fine, do continuous ping to 172.16.2.1, then shutdown Int Fa 0/0 on R1, Fa 0/0 on R2 (10.1.1.2) should be the active standby router now, there should be about 10 second of down time. that’s is the default hold time before interface considered as death. later we’ll tune this value to make it shorter
Protocol [ip]:
Target IP address: 172.16.2.1
Repeat count [5]: 99999
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 99999, 100-byte ICMP Echos to 172.16.2.1, timeout is 2 seconds:
.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.....!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.
Success rate is 93 percent (104/111), round-trip min/avg/max = 24/60/100 ms
traceroute again to verify the path is thru 10.1.1.2
1 10.1.1.2 24 msec 8 msec 16 msec
2 172.16.2.1 52 msec 64 msec *

bring up again the 10.1.1.1 interface, then issue command show standby on R1, notice that 10.1.1.2 still the active standby router even we already set 10.1.1.1 to have the higher priority
R1#show standby
FastEthernet0/0 - Group 1
  State is Listen
    18 state changes, last state change 00:04:12
  Virtual IP address is 10.1.1.99
  Active virtual MAC address is 0000.0c07.ac01
    Local virtual MAC address is 0000.0c07.ac01 (default)
  Hello time 3 sec, hold time 10 sec
  Preemption disabled
  Active router is 10.1.1.2, priority 100 (expires in 9.888 sec)
  Standby router is unknown
  Priority 150 (configured 150)
  IP redundancy name is "hsrp-Fa0/0-1" (default)

to make sure the active standby go back to the primary everytime it’s come back alive again, configure as below
R1(config)#int fa 0/0
R1(config-if)#standby 1 preempt
use all the method that we already discuss above to verify all the configuration are running as it should

tune hello and holdtime, Cisco recommended to set the value of holdtime three time more than hello time
R1(config)#int fa 0/0
R1(config-if)#standby 1 timers 1 3
set the same on R2 Int Fa 0/0

verify this by continuous ping then shutdown 10.1.1.1, you’ll see shorter down time
Sending 99999, 100-byte ICMP Echos to 172.16.2.1, timeout is 2 seconds:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!..!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.
Success rate is 97 percent (97/100), round-trip min/avg/max = 12/58/104 ms

3 comments:

  1. i configured my GNS3 exactly like your description, unfortunately at the Traceroute Part it still uses the
    10.1.1.2 router...

    and this is also different, the Routers seem not to see whos the standby router? (pinging works fine...)

    R1#show standby
    FastEthernet0/0 - Group 1
    State is Active
    2 state changes, last state change 00:12:27
    Virtual IP address is 10.1.1.99
    Active virtual MAC address is 0000.0c07.ac01
    Local virtual MAC address is 0000.0c07.ac01 (v1 default)
    Hello time 3 sec, hold time 10 sec
    Next hello sent in 2.148 secs
    Preemption disabled
    Active router is local
    Standby router is unknown
    Priority 250 (configured 250)
    IP redundancy name is "hsrp-Fa0/0-1" (default)

    ReplyDelete
  2. please what router IOS image did you use for this topology? I'd like to try this out too. Thanks.

    ReplyDelete
  3. please post how to configure private vlans?

    ReplyDelete