1 00:00:00,000 --> 00:00:05,000 Now that we’ve explain the Why for subnetting, let’s look at the how. 2 00:00:05,000 --> 00:00:09,000 I believe the best way to do the Subnetting is to use the binary method 3 00:00:09,000 --> 00:00:12,000 with some of the extra shortcuts that I’m gonna show you in following slides. 4 00:00:12,000 --> 00:00:16,000 The binary method ensures that you can subnet any scenario 5 00:00:16,000 --> 00:00:20,000 thrown at you and extra shortcuts make it quicker and easier to do the subnetting. 6 00:00:20,000 --> 00:00:24,000 It’s important to understand that subnetting involves stealing or 7 00:00:24,000 --> 00:00:28,000 taking bits away from the host portion of address and then allocating those 8 00:00:28,000 --> 00:00:32,000 stolen bits if you like to the network portion of a new address 9 00:00:32,000 --> 00:00:37,000 so we are taking bits away from the host portion and allocating those bits to the 10 00:00:37,000 --> 00:00:43,000 network portion to allow us to create multiple or new subnet out of a single subnet. 11 00:00:43,000 --> 00:00:46,000 There are 2 important rules that you need to remember 12 00:00:46,000 --> 00:00:53,000 when asked for the number of hosts use the formula, host equals 2 to the n - 2 13 00:00:53,000 --> 00:00:57,000 I’ve already demonstrated that formula in the previous slide 14 00:00:57,000 --> 00:01:01,000 but it’s important to remember that when looking for hosts use this formula 15 00:01:01,000 --> 00:01:07,000 2 to the n - 2, and note please that you count the host bits from right to left 16 00:01:07,000 --> 00:01:11,000 so we'll gonna be stealing bits from the host portion allocating those bits 17 00:01:11,000 --> 00:01:15,000 to the network portion but to work out the number of hosts that can be supported on 18 00:01:15,000 --> 00:01:20,000 the subnet you count the number of bits from the right hand side to 19 00:01:20,000 --> 00:01:25,000 the left hand side, When asked to work out the subnets for a specific 20 00:01:25,000 --> 00:01:31,000 number of networks or subnets, use the formula 2 to the n and you count the network 21 00:01:31,000 --> 00:01:34,000 bits from the left hand side to the right hand side. 22 00:01:34,000 --> 00:01:36,000 A lot of people get really confused by this. 23 00:01:36,000 --> 00:01:41,000 Please remember the formula for host is 2 to the n - 2 24 00:01:41,000 --> 00:01:46,000 The reason why we deduct 2 is that an address needs to be allocated for the subnet 25 00:01:46,000 --> 00:01:49,000 and another address has to be allocated for the broadcast address. 26 00:01:49,000 --> 00:01:53,000 So you lost 2 addresses or remaining addresses can be used 27 00:01:53,000 --> 00:01:56,000 as addresses applied to hosts. 28 00:01:56,000 --> 00:02:01,000 When working out the number of networks, you do not subtract 2 29 00:02:01,000 --> 00:02:04,000 you are working out networks or subnets rather than host addresses 30 00:02:04,000 --> 00:02:07,000 so you do not deduct 2 from the formula. 31 00:02:07,000 --> 00:02:11,000 Also remember when as for host you count from the right to the left 32 00:02:11,000 --> 00:02:15,000 when ask for network you count from the left to the right. 33 00:02:15,000 --> 00:02:19,000 If you don’t follow this procedure you’re answers will be wrong. 34 00:02:19,000 --> 00:02:22,000 Now this is another shortcut table that I would write down 35 00:02:22,000 --> 00:02:26,000 before starting my exam to save on time. 36 00:02:26,000 --> 00:02:29,000 In the real world we obviously have calculators to help us but in the exam 37 00:02:29,000 --> 00:02:32,000 there are no calculators so you’ve got a work it out in your head. 38 00:02:32,000 --> 00:02:35,000 In tables like this will save you a lot of time and effort 39 00:02:35,000 --> 00:02:39,000 2 to the power of 1 equals 2, 2 to the power of 2 equals 4 40 00:02:39,000 --> 00:02:43,000 2 to the power of 3 equals 8, 2 to the power of 4 equals 16 41 00:02:43,000 --> 00:02:45,000 2 to the power of 5 equals 32 and so forth and so on 42 00:02:45,000 --> 00:02:49,000 until we get to 2 to the power of 10 which equals 1024. 43 00:02:49,000 --> 00:02:23,000 Now you might not able to work this out quite comfortably but for a sanity check 44 00:02:23,000 --> 00:02:57,000 I would suggest that you write it down before starting your exam. 45 00:02:57,000 --> 00:03:01,000 Ok here's an example, let say ABC limited has been allocated 46 00:03:01,000 --> 00:03:08,000 the subnet of 10.1.1.0/24 for a small office in London 47 00:03:08,000 --> 00:03:13,000 Paul the networkadministrator needs to split this subnet into smaller subnets 48 00:03:13,000 --> 00:03:17,000 where ach subnets support 14 host or machines. 49 00:03:17,000 --> 00:03:21,000 He asked you to help him because he is not quite sure how to do subnetting. 50 00:03:21,000 --> 00:03:24,000 So that will be an example of a scenario that we need to solve. 51 00:03:24,000 --> 00:03:38,000 The first thing you need to decide is which formula you will gonna use. 52 00:03:38,000 --> 00:03:32,000 2 the power of n or 2 to the power of n - 2, now because the question is asking 53 00:03:32,000 --> 00:03:36,000 for the number of hosts or machines in this example. 54 00:03:36,000 --> 00:03:40,000 we use the formula 2 to the n - 2 and we also remember 55 00:03:40,000 --> 00:03:43,000 to count from the right hand side to the left hand side. 56 00:03:43,000 --> 00:03:48,000 So in step 2 we need to work out how many bits are required to cover 57 00:03:48,000 --> 00:03:51,000 the number of host in this example or networks in other example. 58 00:03:51,000 --> 00:03:59,000 So we have been ask to support 14 host or 14 machines as seen here in the question. 59 00:03:59,000 --> 00:04:02,000 To work out the number of bits that are required you can refer back to this 60 00:04:02,000 --> 00:04:06,000 table so 2 to the power of 4 equals 16. 61 00:04:06,000 --> 00:04:11,000 Now remember, we are using the formula 2 to the n - 2 because we have been asked 62 00:04:11,000 --> 00:04:22,000 for hosts, so 2 to the power of 4 - 2 equals 16 - 2 which gives us a result of 14 63 00:04:22,000 --> 00:04:24,000 So 4 binary bits will allow us to support 14 hosts per subnet. 64 00:04:24,000 --> 00:04:27,000 So we now know that we need to steal 4 bits 65 00:04:27,000 --> 00:04:31,000 from the host portion of the address and allocate that for the 66 00:04:31,000 --> 00:04:36,000 network portion to create multiple subnets each which support 14 hosts. 67 00:04:36,000 --> 00:04:40,000 So in step 3 what you need to do is convert the host portion 68 00:04:40,000 --> 00:04:42,000 of the original network into binary. 69 00:04:42,000 --> 00:04:50,000 We were given network 10.1.1.0/24 or it could be written as 10.1.1.0 70 00:04:50,000 --> 00:04:58,000 with the mask of 255.255.255.0, now the first 3 octets is network and the last 71 00:04:58,000 --> 00:05:03,000 octet is host base on that subnet mask, please refer to the IP addressing section 72 00:05:03,000 --> 00:05:05,000 of this course if your not sure how to determine 73 00:05:05,000 --> 00:05:08,000 which part of the address is network and which part is host. 74 00:05:08,000 --> 00:05:12,000 So we are only gonna convert the host portion of the address into binary. 75 00:05:12,000 --> 00:05:17,000 For speed and efficiency purposes there is no need to convert 76 00:05:17,000 --> 00:05:19,000 the network portion of the address into binary 77 00:05:19,000 --> 00:05:24,000 so our address will look as follows: 10.1.1.8 binary 0's 78 00:05:24,000 --> 00:05:28,000 So the host portion is 8 bits and we only need 4 bits 79 00:05:28,000 --> 00:05:31,000 in the host portion to support 14 hosts. 80 00:05:31,000 --> 00:05:36,000 So counting from the right hand side we count 4 binary bits which takes us 81 00:05:36,000 --> 00:05:41,000 to this point and we can draw a line down to differentiate between 82 00:05:41,000 --> 00:05:44,000 the subnet portion and the host portion, please note a line 83 00:05:44,000 --> 00:05:48,000 can also be drawn to the right of the network portion, this was 84 00:05:48,000 --> 00:05:54,000 the original subnet that we were given so we cannot manipulate this portion. 85 00:05:54,000 --> 00:05:59,000 We can only manipulate the host portion and allocate part of the host portion 86 00:05:59,000 --> 00:06:03,000 to the subnet and part of the host portion to the new host portion. 87 00:06:03,000 --> 00:06:08,000 So we are only giving 4 bits to the host portion and the remaining 4 bits 88 00:06:08,000 --> 00:06:12,000 have been stolen and allocated to the subnet portion. 89 00:06:12,000 --> 00:06:16,000 Think "S" in subnet equals "S" in stolen 90 00:06:16,000 --> 00:06:21,000 so 4 bit’s have been allocated to the subnet portion. 91 00:06:21,000 --> 00:06:25,000 The next step is to work out the new subnet mask. 92 00:06:25,000 --> 00:06:28,000 To work out the subnet mask you count the number of bits 93 00:06:28,000 --> 00:06:32,000 that are network or subnet ignoring the host bits. 94 00:06:32,000 --> 00:06:35,000 So from the left hand side we gonna count the number of bits in the network portion 95 00:06:35,000 --> 00:06:40,000 of the address and the number of bits in the subnet portion of the address. 96 00:06:40,000 --> 00:06:42,000 Please note, these spaces are only there for clarity 97 00:06:42,000 --> 00:06:45,000 and not normally there as part of an address. 98 00:06:45,000 --> 00:06:47,000 Now remember an octet is 8 bits. 99 00:06:47,000 --> 00:06:55,000 So the first octet 10 is 8 bits, the second octet which is 1 is 8 bits in length 100 00:06:55,000 --> 00:06:59,000 the 3rd octet which is also 1 is also 8 bits in length 101 00:06:59,000 --> 00:07:03,000 and the number of bits that we've allocated to subnet is 4. 102 00:07:03,000 --> 00:07:09,000 So we have 8 in the first octet, plus 8 in the second octet 103 00:07:09,000 --> 00:07:14,000 plus 8 in the third octet, plus the 4 bits allocated to subnet in the fourth octet 104 00:07:14,000 --> 00:07:19,000 which gives you a total of 28 bits. So the subnet mask is 28 bits in length. 105 00:07:19,000 --> 00:07:23,000 Now you could also do this backwards, the number of bits allocated 106 00:07:23,000 --> 00:07:27,000 to the host portion is 4 bits, copy address and so an IPv4 address is 32 bits 107 00:07:27,000 --> 00:07:34,000 in length less 4 bits gives you 28 bits for the network portion or subnet portion. 108 00:07:34,000 --> 00:07:38,000 So the last step now is to work out the various subnets. 109 00:07:38,000 --> 00:07:42,000 Please remember that the network portion is 10.1.1 110 00:07:42,000 --> 00:07:47,000 the subnet portion is 4 bits in length and the host portion is 4 bits in length. 111 00:07:47,000 --> 00:07:53,000 And we’ve drawn a line after the network portion and the line after the host portion. 112 00:07:53,000 --> 00:07:57,000 The subnet mask is 28 bits in length which we've worked out from the previous step. 113 00:07:57,000 --> 00:08:04,000 So the first network is equal to 10.1.1 and we fill the subnet portion with 0's 114 00:08:04,000 --> 00:08:06,000 and the host portion is always filled with 0's. 115 00:08:06,000 --> 00:08:13,000 So the first network is 10.1.1.0/28 or if you convert that back to dotted decimal 116 00:08:13,000 --> 00:08:22,000 notation 10.1.1.0 with the mask of 255.255.255.240 now to work out 117 00:08:22,000 --> 00:08:26,000 that various subnets you go through the various binary combination 118 00:08:26,000 --> 00:08:31,000 for the subnet portion of the address, so as you've seen in the first network 119 00:08:31,000 --> 00:08:33,000 we set the subnet portion to all 0's. 120 00:08:33,000 --> 00:08:38,000 To get the second network we set the subnet portion to all 0's 121 00:08:38,000 --> 00:08:41,000 except for the last bit which we set to 1. 122 00:08:41,000 --> 00:08:46,000 So the second network or subnet is 10.1.1. and if you convert this octet 123 00:08:46,000 --> 00:08:56,000 back in to decimal notation it's 16, so 10.1.1.16/28, just to remind you 124 00:08:56,000 --> 00:09:01,000 this is a single octet even though there are lines drawn here 125 00:09:01,000 --> 00:09:04,000 the green and the red portion are part of the same octet. 126 00:09:04,000 --> 00:09:09,000 so we’ve got 3 binary 0's followed by binary 1 followed by 4 binary 0's. 127 00:09:09,000 --> 00:09:14,000 And if you convert that binary value into decimal value it's 16. 128 00:09:14,000 --> 00:09:19,000 So the 2nd network is 10.1.1.16/28 129 00:09:19,000 --> 00:09:30,000 or it can be written as follows in dotted decimal notation. 9:23 -9:27 130 00:09:30,000 --> 00:09:34,000 So the next combination would be 0010 which equates to 32. 131 00:09:34,000 --> 00:09:37,000 Now I won't bother doing more than said the first two or three, 132 00:09:37,000 --> 00:09:41,000 because you will notice the sequence here, it goes from 0 to 16 to 32 133 00:09:41,000 --> 00:09:45,000 so we are going in multiple of 16, so the next one would be 48 134 00:09:45,000 --> 00:09:49,000 and you’d be able to continue all the way to the last subnet. 135 00:09:49,000 --> 00:09:53,000 So I will do the first 3 or 4 and then the last 1. 136 00:09:53,000 --> 00:09:56,000 For the last 1 you’ll fill the subnet portion with binary 1s 137 00:09:56,000 --> 00:10:05,000 so that equals to 10.1.1.240/28 or 10.1.1.240 255.255.255.240 138 00:10:05,000 --> 00:10:09,000 and that’s how you work out all the subnets from the original question. 139 00:10:09,000 --> 00:10:12,000 So how many host are supported in the subnet? 140 00:10:12,000 --> 00:10:17,000 We'll use the formula 2 to the n - 2, and there are 4 binary bits. 141 00:10:17,000 --> 00:10:24,000 So 2 to the power of 4 equals 16 minus 2 equals 14 and we’ve already seen that. 142 00:10:24,000 --> 00:10:28,000 So 14 hosts are supported on every subnet. 143 00:10:28,000 --> 00:10:30,000 How many subnets have we created? 144 00:10:30,000 --> 00:10:36,000 We originally had 1 subnet but we’ve now broken it up into multiple subnets 145 00:10:36,000 --> 00:10:40,000 the number of bits in the subnet portion is 4 and the formula to work out 146 00:10:40,000 --> 00:10:43,000 the number of networks or subnet is 2 to the power of n 147 00:10:43,000 --> 00:10:46,000 so 2 to the power of 4 equals 16. 148 00:10:46,000 --> 00:10:51,000 We have taken 1 subnet supporting 254 hosts 149 00:10:51,000 --> 00:10:56,000 and change that into 16 subnets each supporting 14 hosts.