1 00:00:11,140 --> 00:00:19,360 This is one of multiple IP addressing and subnetting scenarios rather than just working out the subnets 2 00:00:19,450 --> 00:00:21,290 for a scenario. 3 00:00:21,310 --> 00:00:28,390 We're gonna work them out and then configure the devices so that we can practically design and configure 4 00:00:28,810 --> 00:00:34,590 a Cisco IP network. In the previous video, we configured those GNS3 network 5 00:00:34,780 --> 00:00:39,720 and we proved that devices can ping one another, as an example. 6 00:00:40,760 --> 00:00:47,280 Ubuntu 1 or PC 1 can ping both Ubuntu 3 and Ubuntu 4. 7 00:00:47,720 --> 00:00:52,340 In other words, this host can ping these hosts on the right-hand side. 8 00:00:52,370 --> 00:00:59,210 Now, one of the things that we did was we configured the serial link with this subnet 192 168 9 00:00:59,210 --> 00:01:01,870 1 128 slash 26. 10 00:01:01,970 --> 00:01:09,530 Now that subnet can support 62 hosts that's a waste of IP addresses when in actual fact a serial link 11 00:01:09,590 --> 00:01:12,830 only requires two IP addresses. 12 00:01:12,830 --> 00:01:20,960 So we allocated this full subnet to the serial link the host portion currently contains six bits 13 00:01:21,890 --> 00:01:29,630 to the power of 6 minus 2 gives you the option to configure 62 host addresses but we only require 14 00:01:29,660 --> 00:01:30,350 two. 15 00:01:30,470 --> 00:01:41,000 So actually all we need are two bits in the host portion which will give us the option of having two 16 00:01:41,000 --> 00:01:44,030 host addresses in a subnet. 17 00:01:44,030 --> 00:01:50,060 Again, there are two formulas for network you use the formula 2 to the power of x, where x is the number 18 00:01:50,060 --> 00:01:55,220 of bits for host you use 2 to the power of x minus 2. 19 00:01:55,300 --> 00:01:58,380 2 is the number of bits in the host portion. 20 00:01:58,640 --> 00:02:05,220 We have to subtract two because we need a network address and a broadcast address in IP version 4. 21 00:02:05,750 --> 00:02:12,480 So 2 to the power of 2 minus 2 gives us 4 minus 2 which equals 2. 22 00:02:13,370 --> 00:02:23,050 So taking this subnet which we've currently got configured on the serial link lets subnet it further. 23 00:02:23,120 --> 00:02:31,730 So as an example on router 1 currently, show IP interface serial 2 slash zero. 24 00:02:32,120 --> 00:02:40,990 Shows us that 192 168 1 129 slash 26 is configured on the serial interface and that's because 25 00:02:42,270 --> 00:02:46,680 we configured this address on the serial interface. 26 00:02:46,680 --> 00:02:50,120 Now let's change that and optimize the subnet. 27 00:02:50,430 --> 00:03:00,910 So we only need two bits for the host portion so we can extend the subnet portion as follows. 28 00:03:02,060 --> 00:03:07,420 Now we are taking a already configured subnet and we're subnetting it again. 29 00:03:07,580 --> 00:03:14,230 So I'm gonna denote this portion as the network portion because that's what we were given. 30 00:03:14,300 --> 00:03:20,810 This is the new subnet portion and this is the new host portion. 31 00:03:20,970 --> 00:03:24,690 So that's what we had originally. 32 00:03:24,780 --> 00:03:27,660 We've now changed it to slash 30. 33 00:03:28,200 --> 00:03:32,040 So this would be then new first subnet 34 00:03:35,100 --> 00:03:44,400 the second subnet would not be 128 we'd have to cycle through the binary options so we'd make this a 35 00:03:44,410 --> 00:03:47,330 one which in decimal is four. 36 00:03:47,580 --> 00:03:50,190 So 128 plus four 37 00:03:50,560 --> 00:03:54,690 And let me update the subnet mask portion while we're here. 38 00:03:55,030 --> 00:03:59,690 So that's the new subnet mask. 39 00:03:59,780 --> 00:04:05,570 So this would be 128 plus 4 which is 132. 40 00:04:05,600 --> 00:04:09,380 So that would be the second Subnet. 41 00:04:09,440 --> 00:04:17,290 Now you might notice a trend here the difference between 128 and 132 is 4. 42 00:04:17,329 --> 00:04:26,810 So the third subnet would be 132 plus 4 which would be 136 if you wanted to work out the binary you 43 00:04:26,810 --> 00:04:35,550 would cycle through the various options so current on this wire no current on this wire. 44 00:04:35,760 --> 00:04:42,630 That's an 8 in decimal, so 128 Plus 8 in decimal is 136. 45 00:04:42,660 --> 00:04:49,020 So if I were you I'd only work out say the first two or three subnets and then just see the pattern. 46 00:04:49,170 --> 00:04:51,190 These are incrementing in fours. 47 00:04:51,240 --> 00:04:53,820 So the next one would be 140. 48 00:04:53,820 --> 00:05:00,470 So just look at the pattern and it'll be a lot easier to work out the next subnet. 49 00:05:00,470 --> 00:05:05,160 Now some other tricks that you can use if this is the next subnet. 50 00:05:06,090 --> 00:05:13,700 Then the first subnet broadcast address is one less than the next subnet. 51 00:05:13,910 --> 00:05:16,340 The next subnet is 132. 52 00:05:16,340 --> 00:05:20,140 So this subnets broadcast address is 131 53 00:05:23,980 --> 00:05:32,440 again to work out the broadcast address you fill the host portions with one,s so this is 128 plus 54 00:05:32,500 --> 00:05:39,900 two plus one or it's one less than the next subnet. 55 00:05:39,940 --> 00:05:45,310 So that's the new first subnet broadcast address. 56 00:05:45,460 --> 00:05:53,050 So the first host address is one more than the subnet address so it'll be 192 57 00:05:55,910 --> 00:06:07,070 in binary it looks like that the new first subnet last host is one less than the broadcast address so 58 00:06:07,070 --> 00:06:10,410 the broadcast address is 131. 59 00:06:10,490 --> 00:06:15,810 So this will be 130 in binary you fill 60 00:06:15,940 --> 00:06:22,940 the host portion with binary ones except for the last bit, here we've only got two bits. 61 00:06:23,000 --> 00:06:25,580 This is on and this is off. 62 00:06:25,640 --> 00:06:30,380 So that gives you the last host in the subnet. 63 00:06:30,450 --> 00:06:38,700 So that's an example of taking a subnet that we've created from a previous subnet and subnetting it 64 00:06:38,700 --> 00:06:42,380 again to get new subnets in the network. 65 00:06:43,340 --> 00:06:52,820 So currently on our network we are using a 26 here what we'll do you change that to slash 30 with the 66 00:06:52,820 --> 00:06:56,760 first host being 192 168 1 29 slash 30. 67 00:06:56,840 --> 00:07:03,520 And the second host being 192 168 1 130 slash 30. 68 00:07:03,640 --> 00:07:13,470 So that's the IP address on the first host or first router. 69 00:07:13,630 --> 00:07:22,060 This is the IP address on the second router we're gonna stay with 129 and 130 but we're gonna 70 00:07:22,060 --> 00:07:29,680 change the subnet mask its interface serial 2 slash 0 IP address 192 168 1 129 71 00:07:32,020 --> 00:07:46,340 and this now needs to be mask is a slash 30 because it's 8 plus 8 plus 8 plus 6 so slash 30 72 00:07:46,350 --> 00:07:46,920 mask. 73 00:07:49,560 --> 00:07:57,470 So this needs to change to 192 168 1 128 slash 30 that's the mask you'll often find on several 74 00:07:57,470 --> 00:08:02,280 links because it supports two host addresses. 75 00:08:02,290 --> 00:08:09,560 So again this is a slash 30 mask because we've got 30 binary ones in the subnet mask. 76 00:08:09,580 --> 00:08:18,990 So this is 255.255.255.252 77 00:08:19,200 --> 00:08:24,150 So this is gonna be 252 as the IP address. 78 00:08:24,360 --> 00:08:32,429 Notice the relationship goes down has come up again but we will probably have problems running it that 79 00:08:32,490 --> 00:08:33,100 way. 80 00:08:34,580 --> 00:08:38,000 So this side also needs to be 252. 81 00:08:38,030 --> 00:08:48,780 In other words, a slash 30 relationship has come up show IP interface serial 2 slash 0. 82 00:08:48,950 --> 00:08:58,350 Notice the mask now used is a slash 30 and on this side show IP interface serial 2 slash 0. 83 00:08:58,520 --> 00:09:05,660 Notice the mask used is a slash 30, So can router 1 ping router 2? 84 00:09:05,980 --> 00:09:06,780 Yes, it can 85 00:09:10,430 --> 00:09:16,880 Can PC 1 still ping PC 3? Yes, It can and can it ping 86 00:09:19,700 --> 00:09:22,790 PC 4? Yes, it can. 87 00:09:22,790 --> 00:09:31,040 So let's trace to 192 168 1 65. 88 00:09:31,100 --> 00:09:35,500 You can see it goes to router 1, router 2 89 00:09:35,930 --> 00:09:45,740 and then the remote PC so we've successfully updated the subnets in this topology to only use two IP 90 00:09:45,740 --> 00:09:48,590 addresses on the serial link. 91 00:09:48,590 --> 00:09:56,160 The reason for doing that is we can increase the number of subnets that we have. 92 00:09:56,170 --> 00:10:04,620 So rather than only having one subnet we've now increased the number of subnets to 2 to the power 93 00:10:04,620 --> 00:10:05,340 of 4. 94 00:10:05,540 --> 00:10:14,770 So we've actually got 16 separate subnets that we can use each of which support 2 host addresses. 95 00:10:14,790 --> 00:10:16,240 Hope you enjoyed this video. 96 00:10:16,390 --> 00:10:21,350 If you did please like it and please subscribe to my YouTube channel. 97 00:10:21,430 --> 00:10:23,520 I wish you all the very best.