1 00:00:00,000 --> 00:00:10,000 So here’s switch 2, enable conf t int vlan 10 standby 2 00:00:10,000 --> 00:00:16,000 now it’s important that the same group number be used on both sides 3 00:00:16,000 --> 00:00:21,000 otherwise, we'll have 2 active routers in different groups 4 00:00:21,000 --> 00:00:25,000 and you'd want to do that if you want to split the load 5 00:00:25,000 --> 00:00:29,000 within a VLAN and use 2 separate IP addresses. 6 00:00:29,000 --> 00:00:31,000 but We won’t be doing that right now 7 00:00:31,000 --> 00:00:33,000 we wanted the election to take place 8 00:00:33,000 --> 00:00:37,000 between this 2 switches for the same virtual router. 9 00:00:37,000 --> 00:00:40,000 So we're going to specify IP address 10 00:00:40,000 --> 00:00:44,000 and the IP address in our case is 10.1.10.254 11 00:00:44,000 --> 00:00:48,000 we can now hit carriage return 12 00:00:48,000 --> 00:00:58,000 and we won’t change the priority by default, it is 100 13 00:00:58,000 --> 00:01:02,000 so if we configure that again as 100 14 00:01:02,000 --> 00:01:07,000 and type do sh run int vlan 10 15 00:01:07,000 --> 00:01:10,000 you’ll notice that the priority doesn’t display 16 00:01:10,000 --> 00:01:12,000 because that’s the default once again. 17 00:01:12,000 --> 00:01:15,000 So all I need to configure is that command 18 00:01:15,000 --> 00:01:18,000 and now when we type show standby 19 00:01:18,000 --> 00:01:25,000 we can see that for group 1 on VLAN 10 20 00:01:25,000 --> 00:01:28,000 the local router is the standby router 21 00:01:28,000 --> 00:01:31,000 the virtual IP address is 10.1.10.254 22 00:01:31,000 --> 00:01:35,000 that’s the virtual HSRP router that’s been configured. 23 00:01:35,000 --> 00:01:37,000 There’s the virtual MAC address 24 00:01:37,000 --> 00:01:43,000 hello and hold time are set to the defaults, make sure that you set them the same 25 00:01:43,000 --> 00:01:47,000 if you do change them, so make sure that it’s the same on both routers. 26 00:01:47,000 --> 00:01:50,000 Preemption is disabled in this example 27 00:01:50,000 --> 00:01:55,000 the active router is 10.1.10.1 and the priority is 200 28 00:01:55,000 --> 00:01:59,000 in other words, switch 1 is the active router 29 00:01:59,000 --> 00:02:04,000 and has a priority of 200, the local router is the standby router 30 00:02:04,000 --> 00:02:08,000 and has a default priority of 100. 31 00:02:08,000 --> 00:02:10,000 Back on switch 1 show standby 32 00:02:10,000 --> 00:02:13,000 shows us that the router is still active 33 00:02:13,000 --> 00:02:19,000 so the local router is active but the standby router of 10.1.10.2 34 00:02:19,000 --> 00:02:24,000 in other words, switch 2 is now shown with its priority of 100. 35 00:02:24,000 --> 00:02:30,000 So that’s how you configure basic HSRP 36 00:02:30,000 --> 00:02:34,000 on the active router, we've configured this 37 00:02:34,000 --> 00:02:38,000 and on the standby router, we only configure a single command. 38 00:02:38,000 --> 00:02:44,000 Now once we’ve done that on router 1, which is acting as our PC 39 00:02:44,000 --> 00:02:49,000 let’s see if we can ping the virtual router. 40 00:02:49,000 --> 00:02:52,000 So ping 10.1.10.254 the ping works 41 00:02:52,000 --> 00:03:00,000 and if I type sh arp IP address of virtual router, MAC address of virtual router. 42 00:03:00,000 --> 00:03:05,000 Now this thing doesn’t exist at the moment even if I turn that off. 43 00:03:05,000 --> 00:03:10,000 This router isn’t physically connected to our topology on GNS3 at all 44 00:03:10,000 --> 00:03:14,000 I’m only showing the icon here to show how it fits in the topology. 45 00:03:14,000 --> 00:03:17,000 So it’s not on, it's not physically connected anywhere 46 00:03:17,000 --> 00:03:24,000 but router 1 acting as PC 1 is able to ping that IP address 47 00:03:24,000 --> 00:03:27,000 because in actual fact it’s pinging switch 1 48 00:03:27,000 --> 00:03:32,000 so on switch 1, we can use the debug, debug ip icmp 49 00:03:32,000 --> 00:03:40,000 go back into router 1 and notice were getting output 50 00:03:40,000 --> 00:03:47,000 on the console of switch 1, its sending an echo reply back to 10.1.10.11 51 00:03:47,000 --> 00:03:55,000 which is router 1 acting as PC 1 from a source IP address of 10.1.10.254 52 00:03:55,000 --> 00:04:04,000 the virtual router's IP address so debug ip icmp on router 1 acting as our PC 53 00:04:04,000 --> 00:04:11,000 notice this PC believes that it's talking to this IP address 54 00:04:11,000 --> 00:04:15,000 and it believes its talking to this MAC address 55 00:04:15,000 --> 00:04:19,000 whereas in actual fact it's communicating with switch 1. 56 00:04:19,000 --> 00:04:23,000 Now before we run a test and test fail over 57 00:04:23,000 --> 00:04:27,000 we need to configure HSRP on VLAN 20 58 00:04:27,000 --> 00:04:29,000 and then we'll be able to test connectivity 59 00:04:29,000 --> 00:04:31,000 between router 1 and router 2 60 00:04:31,000 --> 00:04:35,000 and then verify what happens when an interface goes down 61 00:04:35,000 --> 00:04:39,000 I'll turn off debugging on switch 1 62 00:04:39,000 --> 00:04:44,000 go into VLAN 20 standby group number 63 00:04:44,000 --> 00:04:46,000 I’m going to specify 1 to show you 64 00:04:46,000 --> 00:04:50,000 that you can use the same group number in different VLANs 65 00:04:50,000 --> 00:04:52,000 but these are separated from each other 66 00:04:52,000 --> 00:04:54,000 because they're in different VLANs 67 00:04:54,000 --> 00:04:59,000 IP address 10.1.20.254 in this example 68 00:04:59,000 --> 00:05:02,000 so VLAN 20 virtual IP address 69 00:05:02,000 --> 00:05:06,000 that's all that I’m going to configure on switch 1 70 00:05:06,000 --> 00:05:13,000 I’d like to show you how preemption works 71 00:05:13,000 --> 00:05:15,000 so I’m going to wait a while 72 00:05:15,000 --> 00:05:18,000 so that this router can become the active router 73 00:05:18,000 --> 00:05:21,000 and then I'll enable preemption on switch 2 74 00:05:21,000 --> 00:05:26,000 to show you that it forces itself to become the active router 75 00:05:26,000 --> 00:05:29,000 for that VLAN when we enable preemption. 76 00:05:29,000 --> 00:05:33,000 So the status speak it did change to active 77 00:05:33,000 --> 00:05:36,000 but this output is when it was still in the speak stage. 78 00:05:36,000 --> 00:05:40,000 So active router is unknown, standby router is unknown 79 00:05:40,000 --> 00:05:45,000 local priority is 100, active virtual MAC address is unknown 80 00:05:45,000 --> 00:05:48,000 but when we do show standby again 81 00:05:48,000 --> 00:05:53,000 local router is now active, standby router is unknown 82 00:05:53,000 --> 00:05:58,000 so active router is the local router using this MAC address. 83 00:05:58,000 --> 00:06:02,000 So it’s the same MAC address on VLAN 10 and VLAN 20 84 00:06:02,000 --> 00:06:04,000 but it doesn’t cause a conflict 85 00:06:04,000 --> 00:06:08,000 because MAC address is on layer 2 addresses 86 00:06:08,000 --> 00:06:11,000 and are contained within the relevant VLAN 87 00:06:11,000 --> 00:06:14,000 so show run interface vlan 20 88 00:06:14,000 --> 00:06:19,000 that’s the config of a HSRP on switch 1 for VLAN 20 89 00:06:19,000 --> 00:06:24,000 on switch 2 now, int vlan 20 90 00:06:24,000 --> 00:06:38,000 standby group number 1 IP 10.1.20.254 standby 1 priority 200 91 00:06:38,000 --> 00:06:43,000 so let’s see if it forces itself to become active 92 00:06:43,000 --> 00:06:47,000 without the preemption keyword 93 00:06:47,000 --> 00:06:52,000 so do show standby preemption is currently disabled 94 00:06:52,000 --> 00:06:56,000 it’s in the speak state and just gone to standby 95 00:06:56,000 --> 00:07:03,000 so notice even though this router has a higher priority of 200 96 00:07:03,000 --> 00:07:06,000 the active router remains the active router 97 00:07:06,000 --> 00:07:09,000 because we haven’t put the preempt keyword in 98 00:07:09,000 --> 00:07:13,000 to force this router to become the active router 99 00:07:13,000 --> 00:07:19,000 we use the command standby 1 preempt 100 00:07:19,000 --> 00:07:25,000 and what we should see and it just happened over there. 101 00:07:25,000 --> 00:07:28,000 Notice state change to active 102 00:07:28,000 --> 00:07:33,000 so for VLAN 20 group 1 the state just changed 103 00:07:33,000 --> 00:07:36,000 and we can see that in the output. 104 00:07:36,000 --> 00:07:39,000 Do the show standby command again 105 00:07:39,000 --> 00:07:43,000 notice the local router is the active router for VLAN 20 106 00:07:43,000 --> 00:07:47,000 group 1 and the standby router is switch 1 107 00:07:47,000 --> 00:07:53,000 we can see as an example, that state change on switch 1 108 00:07:53,000 --> 00:07:57,000 so preemption forces the local switch in this example 109 00:07:57,000 --> 00:08:01,000 to be the active router for VLAN 20. 110 00:08:01,000 --> 00:08:05,000 So what have we done, switch 1 is the active router for VLAN 10 111 00:08:05,000 --> 00:08:10,000 switch 2 is the active router for VLAN 20 112 00:08:10,000 --> 00:08:14,000 we have configured HSRP on both VLANs in this example 113 00:08:14,000 --> 00:08:19,000 so the next step is to configure the default gateways on the PC's 114 00:08:19,000 --> 00:08:24,000 and then test connectivity when an interface goes down.