1 00:00:11,060 --> 00:00:19,280 This is one of multiple IP addressing and subnetting scenarios rather than just working out the subnets 2 00:00:19,370 --> 00:00:21,130 for a scenario. 3 00:00:21,230 --> 00:00:28,340 We're gonna work them out and then configure the devices so that we can practically design and configure 4 00:00:28,760 --> 00:00:30,520 a Cisco IP network. 5 00:00:30,710 --> 00:00:35,150 So we've successfully configured this subnet. 6 00:00:35,150 --> 00:00:40,830 Now we need to configure this subnet and this gets a little bit more interesting because it's 192 7 00:00:40,850 --> 00:00:44,620 168 1 64 slice 26. 8 00:00:45,200 --> 00:00:48,160 So we already know what the subnet address is. 9 00:00:48,200 --> 00:00:51,660 Now we need to work out what the first host address is. 10 00:00:51,740 --> 00:00:55,040 So what is the first host for this network? 11 00:00:58,110 --> 00:00:59,940 Now to work out to the first host. 12 00:00:59,970 --> 00:01:06,680 You make the host portion zeros except for the last bit which is set to 1. 13 00:01:07,170 --> 00:01:14,960 But to work out the decimal value over here you need to look at the entire octet. 14 00:01:15,000 --> 00:01:21,770 So this is 64 because that's the network plus one is 65. 15 00:01:22,220 --> 00:01:24,600 So the first host is 65. 16 00:01:25,100 --> 00:01:27,230 What is the last host. 17 00:01:27,290 --> 00:01:34,890 The easiest way to work that out actually is to do broadcast first and then work out the last host. 18 00:01:34,920 --> 00:01:44,790 So for the broadcast what we do is we fill the host portion with binary ones. 19 00:01:44,900 --> 00:01:46,290 So what is that? 20 00:01:48,280 --> 00:01:55,460 It's 255 less 128 which is 127. 21 00:01:56,190 --> 00:02:01,360 So the broadcast address is 192 168 1 127. 22 00:02:01,410 --> 00:02:08,850 Now the last host is one less than the broadcast address. 23 00:02:08,970 --> 00:02:16,960 So for the last host, we set the host portion to binary ones except for the last bit. 24 00:02:17,210 --> 00:02:22,880 So what does that equal to, that's equal to 126. 25 00:02:22,890 --> 00:02:28,920 So let's assume that we configure the router with the last IP address in the subnet and then we're going 26 00:02:28,920 --> 00:02:35,360 to enable DCHP on the router to allocate IP addresses to the hosts. 27 00:02:35,450 --> 00:02:42,900 So here's router 2, on the fast ethernet interface I'm gonna no shut the interface and then I'm 28 00:02:42,900 --> 00:02:50,430 gonna configure an IP address as we worked out 192 168 1 126 29 00:02:50,610 --> 00:02:57,210 And then we need to specify the subnet mask 255 255 255 192, so can we ping 30 00:03:00,660 --> 00:03:01,530 our local address? 31 00:03:01,530 --> 00:03:03,780 Yes, we can. 32 00:03:03,780 --> 00:03:07,740 Now for host allocation let's use DHCP. 33 00:03:08,220 --> 00:03:17,440 So we'll create a DHCP pool with a name, New York and here we need to specify the network. 34 00:03:17,460 --> 00:03:22,360 So what is the network? It's 192 168 1 64 35 00:03:22,890 --> 00:03:29,260 And here we have an option we can either use slash 26 or the dotted decimal notation. 36 00:03:29,760 --> 00:03:40,420 So let's use CIDR or slash 26, do show run will allow us to see our configuration. 37 00:03:40,420 --> 00:03:44,350 So that's what we've done in the DHCP pool. 38 00:03:44,370 --> 00:03:47,080 Now we need to configure a default gateway. 39 00:03:47,360 --> 00:03:52,740 So our default gateway is gonna be 192 168 1 126. 40 00:03:52,920 --> 00:03:59,190 There are other options that we can specify in DHCP such as DNS server. 41 00:03:59,820 --> 00:04:05,530 And in this case, let's set the DNS server to the local router in the real world you probably have a 42 00:04:05,530 --> 00:04:07,280 separate DNS server. 43 00:04:07,870 --> 00:04:08,590 So show run 44 00:04:11,890 --> 00:04:19,279 there's the DHCP pool that we've configured we've configured the default gateway or default router and 45 00:04:19,279 --> 00:04:24,800 DNS server, now in the hosts 46 00:04:24,900 --> 00:04:26,700 let's see if they get IP addresses. 47 00:04:29,520 --> 00:04:36,260 So on the hosts we're gonna configure them to use DHCP rather than static IP addresses. 48 00:04:36,750 --> 00:04:44,830 So let's do that on both hosts or both PCs. 49 00:04:45,050 --> 00:04:47,200 Change them to use DHCP. 50 00:04:47,660 --> 00:04:54,130 And then let's start them up and let's see if they get an IP address from the DHCP server. 51 00:04:55,160 --> 00:04:57,590 Open up a console to both of them. 52 00:04:57,680 --> 00:05:05,680 So here you can see the first host got an IP address 192 168 1 65. 53 00:05:05,860 --> 00:05:11,200 And the second host got an IP address of 192 168 1 66. 54 00:05:11,200 --> 00:05:13,750 So can the second host ping the first host? 55 00:05:13,810 --> 00:05:15,950 Yes, it can. 56 00:05:16,310 --> 00:05:20,520 Will it be able to ping the default gateway. 57 00:05:20,560 --> 00:05:22,060 Let's try that. 58 00:05:22,720 --> 00:05:24,040 Yes, it can. 59 00:05:24,700 --> 00:05:32,410 So we've successfully configured the New York site with an IP address on the default gateway and we've 60 00:05:32,410 --> 00:05:34,530 set up a DHCP. 61 00:05:34,540 --> 00:05:41,390 Now one thing you wanna do when you set up a DHCP pool like this is specify the excluded address. 62 00:05:41,560 --> 00:05:49,130 We don't want the DHCP server to allocate its own address so we can use the command IP DHCP server 63 00:05:52,310 --> 00:05:55,990 or rather IP DHCP excluded address. 64 00:05:56,510 --> 00:06:04,910 And we can specify a range of addresses to exclude and this example will only exclude the local routers 65 00:06:04,970 --> 00:06:12,810 IP address so we excluded the local routers IP address which means that it won't be allocated through 66 00:06:12,810 --> 00:06:14,580 DHCP. 67 00:06:14,940 --> 00:06:20,520 I'll save the routers configuration and while we're here let's save router 1s configuration. 68 00:06:23,080 --> 00:06:27,300 OK, so at this point we've configured both San Francisco and New York. 69 00:06:27,430 --> 00:06:31,050 The next step is to configure the WAN connection. 70 00:06:31,060 --> 00:06:38,950 Now it's inefficient to use a subnet that supports 62 hosts for a network that only requires two. 71 00:06:39,640 --> 00:06:44,910 But for now, let's start off by using the subnet that we allocated. 72 00:06:45,460 --> 00:06:51,500 And then in a subsequent video, I'll show you how to optimize this, so on router 1 73 00:06:51,750 --> 00:06:57,120 let's allocate the first IP address in the subnet to the router. 74 00:06:57,400 --> 00:07:02,670 So that's essentially one more than the subnet address. 75 00:07:02,830 --> 00:07:07,990 So 129 and one more than that 76 00:07:10,430 --> 00:07:11,410 would be 130 77 00:07:14,870 --> 00:07:25,250 with our subnet mask so what you'll notice is the first IP address is one more than the subnet address and 78 00:07:25,250 --> 00:07:33,750 the last IP address is one less than the broadcast address so we need to no shut these two interfaces 79 00:07:34,560 --> 00:07:42,340 and what should happen now is router 1 should be able to ping router 2 which it can. 80 00:07:42,820 --> 00:07:50,330 So we've successfully configured the IP addresses on the WAN and on both LAN interfaces but to enable 81 00:07:50,330 --> 00:07:54,480 full connectivity in this network we need to run a routing protocol. 82 00:07:54,980 --> 00:08:04,850 And in this example, I'll run EIGRP and enable the EIGRP on network 192 168 1.0 83 00:08:04,910 --> 00:08:08,780 Now that is a class full network. 84 00:08:08,780 --> 00:08:17,720 In other words, it's looking at class C 192 168 1.0 and not to the subnet addresses on the side 85 00:08:17,720 --> 00:08:19,560 we'll do something similar. 86 00:08:19,650 --> 00:08:22,530 Network 192 168 1.0, I'll 87 00:08:22,610 --> 00:08:30,740 disable automatic summarization so that they don't automatically summarize any network's show IP EI 88 00:08:30,760 --> 00:08:36,630 GRP neighbor, notice a neighbor relationship is established to router 2 89 00:08:37,070 --> 00:08:38,780 and we should see something similar here. 90 00:08:38,780 --> 00:08:45,980 Show IP EIGRP neighbor, neighbor relationship is established to router 1 show IP route. 91 00:08:46,460 --> 00:08:54,130 Notice router 1 has 192 168 1.0 directly connected on fast 92 00:08:54,140 --> 00:09:02,950 ethernet 00 and 192 168 1 128 directly connected to serial to slash 0. 93 00:09:02,960 --> 00:09:04,700 Those are the two subnets. 94 00:09:04,700 --> 00:09:14,700 It's also learnt about network 192 168 1 64 from 192 168 1 130. 95 00:09:14,700 --> 00:09:22,100 In other words router 2, in the same way router 2 has 192 168 1 64 directly connected to fast 96 00:09:22,110 --> 00:09:30,720 Ethernet 0 slash 0 and 192 168 1 128 is directly connected to serial 2 slash 0. 97 00:09:30,920 --> 00:09:37,280 This router has learnt about a network through EIGRP from 192 168 1 129. 98 00:09:37,280 --> 00:09:44,570 In other words router 1 and it's learnt about network 192 168 1.0 so router 1 at this point should be able 99 00:09:44,570 --> 00:09:51,580 to ping PC 3 and PC 4, and the ping succeed. 100 00:09:52,650 --> 00:09:59,380 Now, if you remember PC 3 was allocated this IP address and we can confirm that by using the command 101 00:09:59,510 --> 00:10:06,470 IF config Ethernet0 is the IP address of PC 3, PC 4 IF config 102 00:10:06,510 --> 00:10:07,880 Eth 0 103 00:10:07,950 --> 00:10:20,360 There's the IP address of PC 4, so router 1 is able to ping both the PCs, now can PC one ping those 104 00:10:20,410 --> 00:10:25,450 PCs. So can we ping 192 168 1 65? 105 00:10:25,660 --> 00:10:26,900 Yes, we can. 106 00:10:27,130 --> 00:10:29,180 And 66? Yes, we can. 107 00:10:29,500 --> 00:10:35,010 Let's trace to 192 168 1 65. 108 00:10:35,070 --> 00:10:38,600 Notice the trace goes to 192 168 1 109 00:10:38,680 --> 00:10:42,660 62, router 1. 110 00:10:42,750 --> 00:10:51,090 Then it goes to 192 168 1 130 which is router 2 on the serial subnet and then it goes to 192 16 111 00:10:51,090 --> 00:10:55,570 8 165, which is PC 3. 112 00:10:55,590 --> 00:10:56,110 Be careful. 113 00:10:56,130 --> 00:10:59,220 These are separate subnets. 114 00:10:59,220 --> 00:11:04,660 These hosts are in different subnets, so that was an example of subnetting. 115 00:11:04,890 --> 00:11:11,680 We took a network, we created subnets, we worked out the subnet address, first host address, last host 116 00:11:11,680 --> 00:11:17,910 address and broadcast the address and we configured the network accordingly and then we tested that 117 00:11:17,910 --> 00:11:19,290 it worked. 118 00:11:19,290 --> 00:11:24,240 That was a simple example of a practical implementation of subnetting but it's really important that 119 00:11:24,240 --> 00:11:26,200 you know how to subnet. 120 00:11:26,210 --> 00:11:27,520 I hope you enjoyed this video. 121 00:11:27,660 --> 00:11:32,300 If you did please like it and please subscribe to my YouTube channel. 122 00:11:32,310 --> 00:11:33,930 I wish you all the very best.