1 00:00:00,000 --> 00:00:05,000 Now you could configure a PC with 2 default gateways 2 00:00:05,000 --> 00:00:09,000 in other words set the default gateway to switch 1 3 00:00:09,000 --> 00:00:12,000 and switch 2 but that doesn’t work very well in windows 4 00:00:12,000 --> 00:00:14,000 and other operating systems 5 00:00:14,000 --> 00:00:18,000 so I can go to my local area connection, go to properties 6 00:00:18,000 --> 00:00:23,000 change the properties for IPv4 7 00:00:23,000 --> 00:00:26,000 and try and configure multiple default gateways 8 00:00:26,000 --> 00:00:29,000 but that’s not going to work very well at all. 9 00:00:29,000 --> 00:00:37,000 So it’s better to set the PC's to use a single default gateway 10 00:00:37,000 --> 00:00:41,000 which in this case is the HSRP virtual router 11 00:00:41,000 --> 00:00:45,000 and it’s important to remember that this is a virtual router 12 00:00:45,000 --> 00:00:49,000 not a physical router it doesn’t actually exist in our topology 13 00:00:49,000 --> 00:00:54,000 but these PC's will be configured to talk 14 00:00:54,000 --> 00:00:58,000 to the relevant virtual IP addresses in the same VLAN 15 00:00:58,000 --> 00:01:01,000 and 1 of the physical switches will forward the traffic 16 00:01:01,000 --> 00:01:03,000 on behalf of the virtual router. 17 00:01:03,000 --> 00:01:06,000 That’s once again determined through an election 18 00:01:06,000 --> 00:01:11,000 the device with the highest priority will become the forwarder for a VLAN. 19 00:01:11,000 --> 00:01:17,000 So as an example, we'll configure switch 1 with the priority of 200 on VLAN 10 20 00:01:17,000 --> 00:01:21,000 and switch 2 with the priority of 200 on VLAN 20 21 00:01:21,000 --> 00:01:25,000 to ensure that switch 1 becomes the active forwarder 22 00:01:25,000 --> 00:01:28,000 or active router for VLAN 10 23 00:01:28,000 --> 00:01:31,000 and switch 2 becomes the active router for VLAN 20 24 00:01:31,000 --> 00:01:34,000 we'll then test that failover actually takes place 25 00:01:34,000 --> 00:01:37,000 by doing a continuous ping between our PC's. 26 00:01:37,000 --> 00:01:41,000 Here’s the console of switch 1 at the moment 27 00:01:41,000 --> 00:01:43,000 sh ip int brief 28 00:01:43,000 --> 00:01:46,000 shows us the IP addresses configured 29 00:01:46,000 --> 00:01:52,000 on the relevant Switch Virtual Interfaces or SVIs on the switch. 30 00:01:52,000 --> 00:01:54,000 We'll start with VLAN 10 31 00:01:54,000 --> 00:01:57,000 so that’s the IP address configured on switch 1 32 00:01:57,000 --> 00:01:59,000 I'm going to type conf t 33 00:01:59,000 --> 00:02:01,000 to go to global config mode 34 00:02:01,000 --> 00:02:03,000 and then I’ll go to interface VLAN 10 35 00:02:03,000 --> 00:02:09,000 pressing question mark we can see the option standby 36 00:02:09,000 --> 00:02:15,000 which allows us to configure HSRP, so standby ? 37 00:02:15,000 --> 00:02:20,000 You can create multiple groups that allow you to split 38 00:02:20,000 --> 00:02:25,000 the sharing of who is the active router within a VLAN 39 00:02:25,000 --> 00:02:29,000 I’m not going to do that here, I'll simply creates a group of 1. 40 00:02:29,000 --> 00:02:34,000 Now you may want to make the group number the same as the VLAN number. 41 00:02:34,000 --> 00:02:38,000 In this case, I’m not going to do that because I simply want to show you 42 00:02:38,000 --> 00:02:43,000 that the same group number can be used on multiple VLANs 43 00:02:43,000 --> 00:02:47,000 so standby 1 specify an IP address 44 00:02:47,000 --> 00:02:51,000 and in this case, it’s the IP address of our virtual router 45 00:02:51,000 --> 00:02:55,000 which is going to be 10.1.10.254 for VLAN 10 46 00:02:55,000 --> 00:02:58,000 this HSRP router once again doesn’t exist 47 00:02:58,000 --> 00:03:02,000 we're simply configuring the virtual router. 48 00:03:02,000 --> 00:03:13,000 In this case, I’m going to configure a priority rather a standby priority 49 00:03:13,000 --> 00:03:21,000 of 200 the default is 100 but I want to influence the priority 50 00:03:21,000 --> 00:03:26,000 to ensure that switch 1 becomes the active router for VLAN 10. 51 00:03:26,000 --> 00:03:36,000 we can see already that this switch become the active router for VLAN 10 group 1 52 00:03:36,000 --> 00:03:44,000 if I do a show command, standby 1 preemption 53 00:03:44,000 --> 00:03:48,000 what preemption does is ensure that switch 1 54 00:03:48,000 --> 00:03:52,000 becomes the active router when it’s up, so switch 1 went down 55 00:03:52,000 --> 00:03:56,000 and switch 2 then became the active router, while switch 1 is down 56 00:03:56,000 --> 00:04:01,000 when switch 1 comes back again preemption will ensure that switch 1 57 00:04:01,000 --> 00:04:03,000 becomes the active router again 58 00:04:03,000 --> 00:04:06,000 so it will basically force itself to become the active device. 59 00:04:06,000 --> 00:04:10,000 we can view HSRP information by using the command show standby 60 00:04:10,000 --> 00:04:16,000 as you can see here VLAN 10 has group 1 configured 61 00:04:16,000 --> 00:04:19,000 the local router is the active router 62 00:04:19,000 --> 00:04:22,000 the virtual IP address is configured as follows. 63 00:04:22,000 --> 00:04:25,000 The active virtual MAC address is this 64 00:04:25,000 --> 00:04:28,000 so this is an HSRP MAC address 65 00:04:28,000 --> 00:04:36,000 this virtual router on VLAN 10 is using this MAC address. 66 00:04:36,000 --> 00:04:42,000 This portion of the MAC address is the HSRP well known MAC address 67 00:04:42,000 --> 00:04:47,000 so that is a reserved address for HSRP and this portion of the MAC address 68 00:04:47,000 --> 00:04:51,000 is a hexadecimal representation of the group number. 69 00:04:51,000 --> 00:04:57,000 Now we created group 1, so in hexadecimal, it's shown us 01 70 00:04:57,000 --> 00:05:02,000 if we had created a group of group 10 it would show us 0A 71 00:05:02,000 --> 00:05:05,000 A being hexadecimal for 10. 72 00:05:05,000 --> 00:05:09,000 Hello's are sent every 3 seconds, the hold-time is 10 seconds. 73 00:05:09,000 --> 00:05:14,000 at the moment, no hello's are being received from switch 2 74 00:05:14,000 --> 00:05:16,000 so switch 1 has become the active forwarder 75 00:05:16,000 --> 00:05:19,000 if there are multiple routers in the topology 76 00:05:19,000 --> 00:05:22,000 they will send keep-alive to each other 77 00:05:22,000 --> 00:05:26,000 and that is how they know whether the other device is available 78 00:05:26,000 --> 00:05:28,000 as an example, when switch 2 is configured 79 00:05:28,000 --> 00:05:32,000 it should be receiving hello's from switch 1 every 3 seconds 80 00:05:32,000 --> 00:05:37,000 if it doesn’t for a period of 10 seconds, it will become the active router. 81 00:05:37,000 --> 00:05:41,000 So it will move from standby to active and we'll test that in a moment. 82 00:05:41,000 --> 00:05:45,000 preemption is enabled the active router is the local router, 83 00:05:45,000 --> 00:05:49,000 the standby router currently is unknown 84 00:05:49,000 --> 00:05:53,000 we haven’t configured switch 2 with HSRP 85 00:05:53,000 --> 00:05:57,000 so switch 1 doesn’t know about any standby router 86 00:05:57,000 --> 00:06:00,000 at the moment, the local priority of the router is 200 87 00:06:00,000 --> 00:06:04,000 and this is the group name which is the default group name. 88 00:06:04,000 --> 00:06:08,000 So let’s configure switch 2 and see what happens in the election 89 00:06:08,000 --> 00:06:10,000 we'll configure switch 2 for VLAN 10 90 00:06:10,000 --> 00:06:15,000 and then we'll configure both routers with HSRP on VLAN 20.