1
00:00:00,000 --> 00:00:05,000
So here’s switch 1 sh ip int brief

2
00:00:05,000 --> 00:00:11,000
We can see the IP address of switch 1 on VLAN 10 is 10.1.10.1

3
00:00:11,000 --> 00:00:15,000
sh standby

4
00:00:15,000 --> 00:00:21,000
shows me that this switch is the active router for VLAN 10

5
00:00:21,000 --> 00:00:31,000
so what I'll do now started ping from router 1 to router 2

6
00:00:31,000 --> 00:00:36,000
but make that continuous for the thousand pings

7
00:00:36,000 --> 00:00:40,000
so conf t interface vlan 10

8
00:00:40,000 --> 00:00:42,000
if I press enter to shut that down

9
00:00:42,000 --> 00:00:45,000
I'll start the continuous ping on router 1

10
00:00:45,000 --> 00:00:49,000
and now shut that interface on switch 1.

11
00:00:49,000 --> 00:00:54,000
As you can see here the state went from Active to Init

12
00:00:54,000 --> 00:00:56,000
and we're losing pings on router 1

13
00:00:56,000 --> 00:01:09,000
we now however getting successful pings through do show standby on switch 1

14
00:01:09,000 --> 00:01:18,000
notice, notice this switch has a state of Init because the interface is down

15
00:01:18,000 --> 00:01:23,000
so active routers are known, standby routers are known on VLAN 20

16
00:01:23,000 --> 00:01:28,000
it is still the standby router however on switch 2

17
00:01:28,000 --> 00:01:31,000
sh standby

18
00:01:31,000 --> 00:01:37,000
shows me that this switch is now the active router

19
00:01:37,000 --> 00:01:39,000
these standby routers are known.

20
00:01:39,000 --> 00:01:44,000
so once again at the moment router 1 can still ping router 2

21
00:01:44,000 --> 00:01:48,000
and router 2 can still ping router 1.

22
00:01:48,000 --> 00:01:52,000
We’ve just shut down VLAN 10 on switch 1

23
00:01:52,000 --> 00:01:57,000
which means that router 1 cannot ping switch 1 on VLAN 10

24
00:01:57,000 --> 00:02:01,000
and we can prove that by doing a ping to 10.1.10.1

25
00:02:01,000 --> 00:02:05,000
the IP address of switch 1 on VLAN 10

26
00:02:05,000 --> 00:02:07,000
notice the pings are failing

27
00:02:07,000 --> 00:02:13,000
and that’s because the interface is shutdown on switch 1.

28
00:02:13,000 --> 00:02:26,000
But router 1 acting as PC 1 is still able to communicate to the virtual router

29
00:02:26,000 --> 00:02:33,000
because switch 2 is now replying as the virtual router

30
00:02:33,000 --> 00:02:37,000
and is forwarding traffic on behalf of the virtual router.

31
00:02:37,000 --> 00:02:39,000
So on switch 2 as an example

32
00:02:39,000 --> 00:02:42,000
if we do debug ip icmp

33
00:02:42,000 --> 00:02:47,000
and router 1 pings that virtual IP address

34
00:02:47,000 --> 00:02:50,000
notice we see the output on switch 2

35
00:02:50,000 --> 00:02:53,000
switch 2 is acting as the virtual router

36
00:02:53,000 --> 00:02:58,000
and router 1 believes it's still talking to this HSRP device.

37
00:02:58,000 --> 00:03:01,000
So now let’s do the reverse process

38
00:03:01,000 --> 00:03:06,000
we'll do a ping again from router 1 to router 2

39
00:03:06,000 --> 00:03:10,000
through the network and let's see what happens

40
00:03:10,000 --> 00:03:14,000
when we bring up the VLAN interface on switch 1.

41
00:03:14,000 --> 00:03:21,000
So do the ping again, no shut on switch 1

42
00:03:21,000 --> 00:03:28,000
sh standby do sh standby

43
00:03:28,000 --> 00:03:31,000
Now notice its went from listen to active

44
00:03:31,000 --> 00:03:37,000
all I was doing that so the local router is the active router

45
00:03:37,000 --> 00:03:40,000
the standby router is unknown at the moment.

46
00:03:40,000 --> 00:03:47,000
Standby router is switch 2 and pings are now succeeding.

47
00:03:47,000 --> 00:03:55,000
So we were able to prove that router 1 acting as PC 1

48
00:03:55,000 --> 00:03:57,000
can ping router 2 acting as PC 2

49
00:03:57,000 --> 00:04:03,000
through this network even when we bring down one of the interfaces

50
00:04:03,000 --> 00:04:10,000
now you may be thinking that it takes too long for the pings to continue

51
00:04:10,000 --> 00:04:14,000
but that’s space on this timers which we can change.

52
00:04:14,000 --> 00:04:16,000
The default hello timer's 3 seconds

53
00:04:16,000 --> 00:04:18,000
and the default hold timers is 10 seconds.

54
00:04:18,000 --> 00:04:24,000
At the moment, we didn’t change the config of HSRP timers

55
00:04:24,000 --> 00:04:26,000
we just left them at the default

56
00:04:26,000 --> 00:04:31,000
but I could type standby 1 timers

57
00:04:31,000 --> 00:04:34,000
and I can actually specify millisecond timers

58
00:04:34,000 --> 00:04:39,000
but for now just specify a hello timer of 1 second

59
00:04:39,000 --> 00:04:42,000
and a hold timer of 3 seconds.

60
00:04:42,000 --> 00:04:49,000
So copy that config and go into switch 2 vlan 10

61
00:04:49,000 --> 00:04:54,000
and change the timers so do show run interface vlan 10

62
00:04:54,000 --> 00:05:01,000
that’s the config of HSRP on switch 2 VLAN 10

63
00:05:01,000 --> 00:05:05,000
and do sh run int vlan 10 on switch 1

64
00:05:05,000 --> 00:05:08,000
that’s the config on switch 1.

65
00:05:08,000 --> 00:05:11,000
So let’s do the test again

66
00:05:11,000 --> 00:05:16,000
int vlan 10 before I press enter here

67
00:05:16,000 --> 00:05:18,000
let’s do a ping again

68
00:05:18,000 --> 00:05:22,000
pings are succeeding shutdown the interface

69
00:05:22,000 --> 00:05:26,000
notice we only lost 2 pings in this example

70
00:05:26,000 --> 00:05:28,000
because I reduce the timers.

71
00:05:28,000 --> 00:05:32,000
Switch 1 went from Active to Init

72
00:05:32,000 --> 00:05:39,000
switch 2 notice on VLAN 10 groups 1 and from standby to active.

73
00:05:39,000 --> 00:05:44,000
So we’ve managed to improve the performance

74
00:05:44,000 --> 00:05:48,000
with a last only 2 pings in this topology

75
00:05:48,000 --> 00:05:52,000
now once again you can reduce the packets lost even more

76
00:05:52,000 --> 00:05:56,000
by using millisecond timers rather than second timers.

77
00:05:56,000 --> 00:06:01,000
But for this topology and for the CCNA those timers are good enough.

78
00:06:01,000 --> 00:06:05,000
So I'll do the ping again and then no shut the interface

79
00:06:05,000 --> 00:06:08,000
let’s see how many pings we lose here

80
00:06:08,000 --> 00:06:15,000
so interface has come up we’ve gone from Listen to Active

81
00:06:15,000 --> 00:06:20,000
do show standby

82
00:06:20,000 --> 00:06:23,000
local router is the active router

83
00:06:23,000 --> 00:06:29,000
standby router is switch 2 and we didn’t lost any pings at all.

84
00:06:29,000 --> 00:06:32,000
So that’s a much better response in what we have previously.

85
00:06:32,000 --> 00:06:36,000
That’s an example of HSRP in a switch environment

86
00:06:36,000 --> 00:06:39,000
showing you what happens when an interface or switch goes down.

87
00:06:39,000 --> 00:06:42,000
I shutdown an interface

88
00:06:42,000 --> 00:06:45,000
rather than rebooting the switch just to make it happen quicker

89
00:06:45,000 --> 00:06:48,000
and allow us to see changes more easily

90
00:06:48,000 --> 00:06:50,000
but you would see something similar

91
00:06:50,000 --> 00:06:55,000
if you rebooted an entire switch or router when using HSRP.
