Transcript for:
Understanding Subnetting and Supernetting

Cisco certified Network associate day three late night welcome back everybody I'm imanda your trainer for this entire series uh we stopped uh doing subnetting in our last video uh we will continue from there for this video and then we will introduce another concept called supernetting without wasting much time let's get straight into today's video before we continue I need to show you this I mean I know most of you would be asking why is Imran showing all these irrelevant stuff I mean pictures of things that is not even connected to networking well maybe that's my way of teaching uh and I'm sure that's helping a lot of people you I try to take your everyday objects and try to link it to the concept that I'm teaching so let's talk about the digital clock now everybody I'm I'm sure everybody knows how to read a digital clock now uh according to this picture it is 39 hour 45 minutes 27 seconds right so the next second after this is 13 hours 45 minutes 28 seconds so if you keep adding 1 second to the time it would reach a point where it goes to 13 hours 45 minutes 59 seconds you add one more second to that it becomes 13 hours 46 minutes and 0 0 seconds then the process continues you keep adding seconds it goes to 45 59 seconds then it becomes 46 0 0 seconds so every time it reaches 59 it resets itself to 0er and adds one to the previous place now similarly a point would come where it becomes 13 hours 59 minutes 59 seconds you add one more second there it becomes 14 0 0 0 0 1 second before 14 0 0 0 is 13 59 59 well that's how a digital clock works and we all know that so 1 second before 1,400 hours is not 1300 hours it is 1300 hours 59 minutes 59 seconds right remember this concept because we would be using this in our IP addressing schemes right let's start with class B subnetting we'll take this IP address 172.600 225 and uh we know the default subnet mask is 255.255.0.0 let's try and break this into two subnets from what we know already we know that to break a network into two we borrow one bit like what we see here let me take a pen all right so we see that one bit is borrowed now from what we know already one bit borrower means you get two subnet it's 2 the^ 1 which also means that you get 2 the^ 15 15 is nothing but the number of zeros so 2 the^ 15 - 2 H that is 32766 valid H how do we get the first networks network ID we know this from our previous video we remember for a class B 17216 is Class B so this is the default subnet mask and this is where the default division is right so the first network ID is going to be where you do 17216 and make everything else that you see here in green which is the host part make everything as zero so the first network ID is 172.16.0.0 how do we get the second network ID the second network ID is got by adding the place value of the last one so last one here is this the place value is 128 now this is the critical bit in class C we added that to the last octet why did we do that because that last one was part of this last octet in this case in this particular case the last one is part of the third octet so we would be adding that 128 to the third octed so the first network ID is 172.16.0.0 the next network ID is 17 26.1 128.0 see this last one was part of the third octed so we added that place value to the third octed can we add one more can we have one more network no we can't because if you add 128 again becomes 17216 2560 which is not right because 256 is not a valid uh valid IP address so also we know that by borrowing one bit we're breaking it in only two so we can't have the third network ID how do we get the broadcast ID broadcast ID is 1 minus the next network ID so 1 - 128.0 is 127 255 remember the digital clock, 1400 minus 1 second is 1359 59 so 128.0 -1 is 127 255 which is our 255 is the largest number right and the broadcast ID of the last Network as we always know is making everything as 255 like the first network ID is 0.0 The Last Broadcast ID is 255 255 it's very very simple isn't it right because of this borrowing what happens to our subnet mask our subnet mask is 128.0 because this 1 00000000 is 128.0 and that is nothing but sl17 because we borrowed one bit it's very easy I don't know why people think it's such a big deal I don't think so it is very simple all you need to know is know the basics and that's how easy it is okay let's try another example 172.600 225 the same IP address but this time we're going to break it into four subnets so from what we know already to break a network into four subnets we borrow two bits this is the two borrow bits uh from the same formula from what we know already two bits is 2^ two is four subnets and 2 the^ 14 which is nothing but the number of zeros minus 2 is 16382 valid H how do we get the first network ID now this is something you should be doing it like that it should be it it should be second nature for you first network ID is 172.16.0.0 exactly right how do we get the next or subsequent uh Network IDs we know we need to add the place value that of the last bit place value of the last bit is 64 where is the last bit it's on the third octet so we need to add 64 to the third octed so it's 172.16.0.0 add 64 it becomes 64.0 add another 64 it becomes 128.0 add another 64 it becomes 92.0 can we add another 64 no because it becomes 26.0 which is not valid one that's one way of looking at it and we know that only four networks 2^ 2 is four so we only have four networks fantastic how do we get the broadcast ID now that's the question again 1 minus the next Network network ID so in the first case it is 64.0 the next network ID minus one is 17216 63. 255 remember the digital clock now you know a digital clock how it works that's exactly how this works so 64.0 minus 1 is not 63.0 remember it is 63. 255 the reason I'm stress ing on this is this is the most common mistake students do 64.0 minus 1 they do 63.0 which is wrong and they lose a lot of marks don't do that 64.0 - 1 is 63255 the broadcast ID for the second network is 127 255 third is 191 255 4th is 255.255 because that's a last Network and like we know from what we know already the last network broadcast ID is going to make everything 255 when I say everything everything of the green section so the first network ID is making everything as zero of the host part and The Last Broadcast ID is making 255 for the host part that's very very very easy guys this is very easy you just have to get that mindset that this is going to be easy and it really is easy people just make it it's so complicated that they think it's a big deal it is not a big deal right to continue this new subd mask is 255.255 19920 and since we borrowed two bits it is/ 18 fantastic let's get into class A again it's the same concept all that changes is here the host part is spanning three octets in class C the host part spanned only one octed in class B it spaned two octets in class A it span three octets now let's break this into two Network we know the drill borrow one bit where is the Boral bit the Boral bit is still in the second octet consider another case where the borrowers you had borrowed let's say eight or nine bits if you borrow nine bits what happens it goes here then what you would be working is you would be working on the third octet right we will work on an example a little later in this video but for now uh we are working on the second octed the place value of the second octed is 128 yeah so like we already know one bit borrowing gives us two subnets and the valid host is derived with the number of zeros so 2^ 23 - 2 is 8,388 66 hor that's a big big big number in your practical life you will not see such large networks or such large subnets with which has 8 million host that's not practical we would be breaking it down to smaller subnets fine let's get into this question so what is the network ID of the first Network we know this very very well by now so the first network is making everything at zero so it is 10.0.0.0 how do we get the next network ID we add the place value of the last bit so the last one is 128 and it's in the second Octor so we add 128 to the second Octor to get the network ID how do we get the broadcast ID now this is exactly why I asked you to think and compare IP addresses to the digital clock 128 minus 1 what is it you guys tell me yes it is 127 2552 2 255 fantastic and The Last Broadcast ID as we always know it is 255 255.255 everything is 255 fantastic guys this is brilliant I mean it is so so easy I think this is this should be introduced in class one all right all right I know it's not that easy but I mean I think it is fairly easy uh because of the changes that happened because of this new borrowing the subnet mask becomes 2551 128.0 do0 and uh of course it because one one bit borrows the sl8 becomes sl9 right fantastic let's take another example all right this time you guys are going to do it I'm just going to run this animation so breaking a network into four what do we do yes borrow two bits fantastic you guys are learning you guys are very very fast two bit borrowing gives us four networks fantastic and that has 4,194 302 valid host what is the network ID of the first Network we all know this make everything into zero fantastic so it is going to be 10. 0.0.0 fantastic how do we get the next network ID or the subsequent Network IDs we add the place value of the last bit in this case it is 65 4 and it is in the second octed so we add 64 to the second octed so the network ID of network 2 is 10. 64.0 do0 then it is 10.1 128.0 do0 then it is 10.19 2.0.0 how do we get the broadcast ID we did this so many times by now you guys should be doing it without even thinking about it so is 10.63 255.255 broadcast ID 2 is 127 10127 255.255 broadcast ID 3 is 10191 255.255 broadcast ID 4 which is the last broadcast ID is nothing but 10255 255.255 because of the changes that happened the new subd askk is 2551 1920. and uh because of the change it is sl10 now guys this is absolutely kindergarten stuff really kindergarten stuff well I think uh going through the last video on this video I'm sure you guys can do this just like your alphabets fantastic let's get into this magic table now this magic table if you remember subnetting will be even more easier there's nothing to remember it's very straightforward the place value is what we always learned you start with 1 1 2 4 8 16 32 64 128 it's nothing but doubling and The Mask value so when we borrow one bit the place value is 128 which also makes this mask value for that particular OCT it as 128 so that is nothing but the same number 128 how do we get the subsequent numbers so 128 + 64 will give you 12 192 192 + 32 will give you 1 22 4 + 16 will give you 240 + 16 will give you 248 + 16 will give you 252 plus uh 2 you'll give you 254 and then 255 so in your subnet mask these are the eight values that's valid so if you give you subnet mask of of 25527 7.0.0 that's not valid subnet mask valid subnet mask should be within these eight numbers so if your subnet mask is not within any of these eight numbers that means that subnet mask is invalid remember that's why I ask you to byard this table I mean at least these eight numbers you need to know these are standard numbers either 128 192 224 240 248 252 25 4 or 255 your subnet mask I'm reiterating this again your subnet mask has to be one of these numbers you cannot have any other number in your subnet mask simple as that fantastic let's get into requirements this is going to be real uh exam type question so they give you a network and they give you /24 so 17210 21 . 21/24 now first thing you need to know is 172 what is that that is Class part of a Class B right I mean by default it is Class B 172 so Class B we know is sl6 now in this case it is sl24 that means the 8 bit that is XS of 16 has been borrowed so the 24th bit this bit comes in the third octed if you know the I mean if if you if you count sl4 the 24th bit comes in the third octet right and the place value is one that means we need to add one to the third Octor to keep getting subsequent network ID what is the first network ID we know this 17210 0.0 like you see here and the broadcast ID is 0.255 how did I get 0.255 it is nothing but I I know the next network ID is going to be 17210 1.0 because we're adding 1 to the third octed so I know 17210 1.0 1 minus that is 10 17210 0.255 similarly the next network ID is 2.0 so the broadcast ID is 1. 255 so that goes on on and on until I reach what I I'm looking for so I'm looking for 10 17 212121 which is nothing but I I should be looking for the network ID 17210 21.0 so that's the network ID 17210 21.0 and the broadcast ID is 17210 21255 is this number in between these two Network IDs and broadcast ID absolutely So This Is The Answer they're looking for one 17210 21.0 17210 21255 fantastic let's try another example right this example is a little tricky the reason I put it here is just to show you that what can happen right again 10. 210.11 170. 25523 this is a class A IP address Class A is sl8 in this case it's 23 that means they have bought wrote 15 1es we not bothered about 15 1es what we are bothered about is sl23 the 23rd bit comes in which oate so if you count 23rd bit comes in the third oate and it is a seventh bit of the third octet which is nothing but has a place value of two so how do we do we start with the first network ID 10.0.0.0 what is the broadcast ID before we find out the broadcast ID we need to find out what's the next network ID it is 10. 0.2.0 because we need to add two to the third OCT 10. 0.2.0 so 1 - 10. 0.2.0 is 10.0.1 255 so it goes on 10. 0.2.0 to 10.0.3 255 4.0 6.0 8.0 it goes on on and on until it reaches 10.0.2 54.0 the next network ID is when you add two to it it becomes 256 that's not valid so it is 10. 1.0.0 remember from 24.0 if you add two it will get reset and it becomes 1.0 exactly like 13 hours 59 minutes 59 second + 1 is 13 14 hours 00 0 0 right similar concept happens here so again it goes 10. 1.2.0 1 . 4.0 1.8 I mean goes on to 1. 2540 again if you add two more it becomes 10.2.0 do0 and goes on and on and on until it reaches 10.2 10.0.0 now if you look at the question we are interested in this 10.2 10. Network so again we'll follow the same thing 10.2 10.0.0 plus two you're adding then you keep adding 104.0 10.6 6. 108.0 it goes on and on until we reach 10.2 10170 do0 because that's what we are interested in 10. 210.11 17.0 10210 171255 this is the network if you look at this this range comes in between these two values two things the reason I give you this example is one whenever you see 255 in any IP address that does not mean it's a broadcast ID we need to calculate it so in this case 10. 210.70 255 is not a broadcast ID second we need to check we need to count the slash I mean we need to count your subnet mask values to see which octed we working in in this case we were working on the third octed I mean of course the carryovers went to the second octets but we were working ideally on the third octet another way to answer this question is because we know the changes are happening on the third octet we could have started at 10. 21.0 instead of counting all those numbers so we would count at 10.2 10.2.0 10.2 104.0 and on and on and on until we reach 10.2 10170 do0 I mean don't get confused you could do from start from 10.0.0.0 I was just trying to show you you a shortcut right I hope there's no confusion I hope you understood what I was trying to say and I hope you understood everything that we learned till now if you have any doubts pause this video or maybe just know watch this video again because the concept is very very simple right supernetting this is a beautiful concept now supernetting is a concept that is ideally used in the routing concept and I know that we haven't yet started routing but I wanted to talk about super nitting here because supernetting and subnetting are complementary now subnetting is breaking down a large Network into smaller networks and supernetting is exactly the opposite where you take smaller networks and combine it to one big Network now it is like this think about USA as one country now subnetting is breaking this large country into small small states let's assume that the whole world is one chunk of land right and let's assume that somebody is traveling from Europe to America and and uh let's say we have the sign board like the sign boards we have let's say we have a sign board in Europe every state is listed down there and says you want to go you need to take this road I mean that's not practical you will have a massive board instead of that they could just list saying the United States of America you need to take this way that's it so from Europe you just have one board which says towards United States of America you need to go this way very simple isn't it this is what supernetting is all about it is just instead of having multiple entries in your routing table routing table can be compared to the sign boards that you have on your highways so instead of having multiple entries on the routing table for different networks the routing table is summarized so that listings are reduced if you compare it to the real life example it is like how we discussed instead of having all the states of United States on the board they could just say to United States take this road go this way simple isn't it right let's see how it works in the networking industry now if you remember in our last video we did uh we did subnetting and we we we broke down this class C uh IP address into phone networks so 192 168 100.0 uh 10064 100128 uh 100. 192 were four different networks now we also know that 1921 16800 sl24 which is nothing but the class c network uh without subnetting it included all these IP addresses right so it started from here and it ended here it included all these 255 or 256 IP addresses included were included in 192 1600.4 now we broke it down into four networks 19 2 168 100.0 10064 100128 10012 all/ 26 but if we didn't break it we could represent all these four subnets by representing it as sl24 and as 192 16800 Z24 it includes all these four subnets right that's what supernetting is so instead of the router having all these Network IDs one by one listed they could just list one network ID 19268 100.24 and that includes all these four and this is the secret how the internet can work I mean internet has so many IP addresses and if routers start listing all of them the internet will break summarization is what makes the Internet run so efficiently you will see when we talk about routing Concepts in one of the future videos you will understand what I'm trying to say but for now just know how supernetting works right let's say there were four networks like this 172 168 1970 1980 99.0 200.0 24.0 26.0 sl24 all of them how do we summarize these six IP addresses into one IP address firstly we need to check where this changes so the first octat don't change at all so we not bother about it the change is happening in the third octed so let's just convert that into uh binary in this let's see where is the change now the first four bits don't change at all it's only the last four bits that change so the green part does not change at all in if you compare these six only the last uh 12 bits or rather in this case only the the uh the four bits are changing right so how do we convert this into one network so what you do is make everything as zero everything Beyond this line as zero so it'll be like this 1726 168 dot this part which is if you convert into decimal it is 19 172 168 1920 slash2 how did it get /20 is count how many bits are here so this has eight bits this has 8 Bits and the four bits here so 8 8 16 + 4 is 20 so 20 bits 172 1681 192020 represents all these six networks people who have concentrated would know that sl20 means there are 16 networks in between this so once 72 168 1920 1930 1940 it goes up till 27.0 so we are only representing six networks in that 16 that mean there are 10 Network which is already included in this but which is not existent so when we when we uh summarize we need to make sure that we summarize in a way that includes all of these networks right uh Let's test what you know so these are the questions for you take your time solve these problems and send your answers in the comment section below this video I hope these videos are really helpful if you don't understand anything watch the last two videos I mean this video on the last video again I hope that is enough for today thank you so much for watching if you have any questions please feel free to write them to me and I will try to answer as soon as possible please don't forget to share these videos on your social media thank you so much once again