IP Subnetting - Complete Course [Binary, Class A/B/C, VLSM, CIDR, Design & Troubleshooting]

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello and welcome to this video on the icnd1 series in this video we will look at ip addressing we will also look at understanding binary and then we will try some examples of converting decimal numbers to binary so let's get started so what is ip addressing ip addresses are numbers that are used to uniquely identify devices on the network so when you have devices on the network and they are running the tcp protocol the kind of addressing that is used to identify these devices it is what is called ip addressing and there are two kinds of ip addresses we have what is called the ipv4 address and the ip version 6 address now the ip version 4 address was the addressing scheme that was defined many years ago and it's a 32 bit address so it has 32 bits and what that means is that there are 32 binary digits in an ipv4 address now ip version 4 addresses are being slowly depreciated and now we have what is called the ipv6 addresses and these are even larger with the 128 bit addresses and 128 bits means that you can have binary digits up to 128 places in one ipv6 address now a binary digit is a one or a zero and what that means is that in an ip version four address you will have 32 ones or zeros while an ipv version six address you will have 128 ones or zeros now it's really difficult for you to express an ip version for address in terms of its ones and zeros because that would just be too long for instance you're going to have things like one zero zero one one zero one zero one well that's one two three four five six seven eight and then zero zero one one one one one you can have one one one one one one zero one and one zero one one zero zero one one now all these strings of binary digits just one ipv4 address it's going to be really difficult for humans to understand uh this kind of address so they are expressed in dotted decimal and this means that they are expressed in terms of decibel numbers that are separated by dots so you could have things like 10.28.127.34 as an ip address and each of these digits represents eight binary strings so what it means is that the first eight bits are in this string and the next eight bits are in this string and the next eight bits are in this string and the next eight bits are in this string and then you have a full ip version for address we will look at ip version 6 in detail in another video but what you need to know right now is that ipv6 addresses are expressed in hexadecimal format and so the 128 bits are actually reduced to 32 strings of hexadecimal numbers so now let's just look at binary digits and details binary numbers are numbers that have just two states which is a zero or a one now decibel numbers the numbers that we are used to are numbers that refer to as base 10 because they have 10 states so you can have 0 1 2 3 4 5 6 7 8 and 9 and these are the 10 states for a decibel number but for the binary number you can only have 0 or 1. so why do we use binary numbers instead of the decimal numbers that we're used to in networking and communication because we communicate over wires which uses electrons or lights and usually they have only two states which is zero or one so it's either on or off it's either there is light on the wire or there is no light on the wire it has only two states and it's easier for machines to understand these two states than for them to have many states like have zero to nine so even if you want to express something like a complex digit for instance if you want to express the word bob you have to fill each of these characters as a binary string and the machine would convert it to the ascii character so all these characters actually have codes which are called ascii codes and that's the american standard uh code for information exchange so these kills are what's converted to binary before it's fed into a computer or machine and that's what the machine interprets into the characters and that's how you gamble so yeah you have binary numbers which are zeros and ones in terms of ip addresses we have 32 bits of this and they are expressed in dotted decimal so if you have the first eight bits and the second eight bits and the third eight bits and the fourth eight bits all being converted to decimal and then you have an ip address so let's pick an ip address for instance 192.168.7.25 the way a computer would see this would be all in binary so 25 would convert it to binary 7 would be converted to binary 168 would be converted and 192 would be converted to binary now it's possible for you to be asked to convert binary to decimal in the ccna exam so we need to understand how to convert decimal numbers to binary and that's what we're going to be looking at now so let me just clear this screen when you have a decimal number like seven for instance in binary you only have two states so what you have is you have a zero and a one and so when you're going from zero to one when you get uh to one you move to the next place which becomes a two and then if you want to represent three in binary you're going to have to have one one instead of three uh so think of it like in decimal when you have the hundreds the tens and unit and you want to represent 235 you had to have two hundreds three tens and five units in binary you only have twos so for you to represent three you're going to have to have the unit which is one and the unit which is two so you have one two and one one which will be three if you have say seven what you're going to have is one one one two and one four which is uh seven so how do you know uh the place uh how do you know what this is you keep just multiplying by two so you're placed over eight uh sixteen uh thirty two 64 uh 128 uh 256 etc so for instance we know that seven is uh one one one what if we want to have the number 19. so we're just going to think about it what's the biggest number we can find in 19 which is 16. that's a one and we take 16 from 19 we have three so it's the next number place we can find it's two so for the eighth place we put zero for the fourth place we put zero for the two place we put one take away two and for the one place we put one so 19 in binary is going to be one zero zero one one so let's take another example what if we had 57 now uh what's the largest number we can find for 57 and that's uh 32 so that will be a one if we take away 32 from 57 what do we have we have 25 and 25 what's the largest number we can find 16 and 25 so we'll put a 1 here too if we take away 16 from 25 we're going to get 9 and 9 what's the largest number we can find that's eight so we put a one in for the place of eight take away eight from nine we get one and one what's the largest number we can find that's one so one's going to be uh one and then four and two would be zeros so 57 would be one one one zero zero one now you can confirm uh these answers by using the calculator on your pc but you should note that for the icnd1 exam calculators will not be allowed so you have to know this to do this manually so let's just confirm this so we have a calculator what you need to do coming to this is by default in the windows 7 the calculator is in the scientific view but you can just go in and change it to the programmer view and then you can by its default in decimal so you can type 57 and then convert it to binary just by clicking binary and there we can see that we are correct is one one one zero zero one so what we're going to do now is we're going to take a few exercises and you can attempt them on your own or we can work through them together so if you'd like you can pause the video and try to do this on your own so these are the examples so try to convert these numbers to binary and then we'll do them together so the first thing we're going to do is to define our place values which is 1 2 4 8 16 32 64 128 256. i'll stop here so now you can see that we are just multiplying by two right now for 25 the highest place value we can see it's 16. when you subtract that you have 9 so you put a 1 for 16 next place value is 8. you subtract that you have one and you can put just a one for eight and of course the last one is one so all these other ones become zeros now for 137 it's a little longer so i put 137 out what's the highest place we can see and that's 128 and what's 137 minus 128 that's nine so 128 would get a one the next place value would be eight and we get one so the next place value would be one z zero so we put a one for eight uh one for one so the rest of it would be zero now for 248 what's the first place value we can see 128 and that's going to give us what is this going to give us uh 120. so one next place value we can see is uh 64. and that's going to give us six and uh five so 56 uh so that's one here so from the 56 what's the place value we can see 32 and that's going to give us 4 and 2 which is 24 and from 24 we can see 16 and that's going to give us 8 and from 8 the place value you can see is another eight that's going to give us zero so one zero zero zero so what that means is that for 25 we have zero zero zero one one zero zero one now when i write like this or you write like this one one zero zero one it doesn't matter because the leading zeros are not significant uh for 137 the number is one zero zero zero one zero zero one and for 248 we have one one one one one zero zero zero now because each decimal number in the ip address represents a digit of binary it's better for us to represent them as eight digits so this will be the standard that you should represent your binary numbers with eight digits so if we have a binary address that was 137.25.25.248 what we are really going to have is one zero zero zero one zero zero one dot zero zero zero one one zero zero one dot zero zero zero one one zero zero one dot one one one one one zero zero zero so that's how to convert a decibel ip address to the real binary format and that's the format machine understands so in this video we have been able to look at ip addressing ipv4 addressing ip version 6 addressing we've also been able to look at binary digits i've taken some examples of binary digits i would urge you to take as many examples of converting decimal numbers to binary numbers as you can because that's the foundation for p addressing and in the next video we're going to look at ipv4 addressing thank you very much for watching [Music] hello and welcome to this video on the ic and d1 series in this video we're going to talk about ip version 4 addressing so we're going to look at the ipv version for address classes we're going to look at subnet mask we're going to also look at private i p addressing so let's get started so the first thing we want to look at is the ip classes we have in ipv version 4. now in the last video we talked about ip addresses and we said that ip addresses were expressed in dot decimal format so we had x dot x dot x dot x where x is a decimal number now if x is a decimal number and there are 32 bits here that means that each of these carries eight bits that means that in numbers here can be from 0 all the way to 255. so the kind of addresses we can have we can have addresses from 0.0.0.0 all the way to 255.245.255.255. now these addresses are divided into what are called different classes of addresses so we have classes uh a to e now what you need to know about the classes for now is that first the addresses that start with zero are not used the first class starts from one and that's class a and it goes from 1.0.0.0 all the way to 126.255.255.255. and technically what that means is that you have 1.0.0.0 1.0.0.1 all the way to 1.0.0.255. and then you go to 1.0.1.0.1.0.1.1 all the way to 1.0.1.255. and you go all the way till you get to 126.255.255.255. class b addresses we have the 128.0.0.0 all the way to 191.255.255.255. and for class c we have 192.0.0.0 all the way to 223.255.255.255. if you notice we have exempted the 127 address so we stopped that 1 to 126 for class a and went to 128 for class b the 127 when it's used for what is called the localhost so it's used to test your tcpip stack so when you have something like for example 127.0.0.1 it basically means you're talking about the machine that you're on so it's just a local host an example is if you have a web server in your system and you need to access the web server from a browser you can just type 127.0.0.1 and you're going to access the web server the differences in class a b and c are in the subnet masks and we'll just discuss that in a second well class d which starts from 244.0.0.0 all the way to 239.255.255.255. is actually set aside for what's called multicast if you remember multicast is when you send one packet but it has many destinations meaning that when you send a packet going to any of these addresses you're actually sending it to a group there can be many receivers of that packet it doesn't uniquely identify one system anymore it identifies a group of systems class c all the way from 240.0.0.0 to 255.255.255.255. it's actually used for research so let's just set aside for research so pretty much what you're going to be dealing with with day to day is class a the class b and the class c and that looks like the differences in the classes so what is a subnet mask when you have an ip address the way the ip address knows what network it's on is by using a subnet mask so for instance if i have an ip address that says 171 171.23.5.7 and the subnet mask says 255.255.0.0 now the ip address is a 32-bit address the subnet mask is also a 32-bit address what a subnet mask says is that wherever you have a one in the subnet mask that's part of the network and where you ever have a zero it's part of the unique post address if we expand 255 we have one one one one one one one one so you have all ones for the first two octanes and all zeros for the last two octets zero zero zero zero zero zero now what that means is that the first two octets representing the network of this address while the last two octets represent the host so you could say that this computer is on the 172.23 network its unique address is the 5.7 so it's on the same network related to 172.23.0.1 it's on the same network with 172.23.255.234. on the same net worth anything that starts with 172.23 so that's the concept of subnet masks it helps you to uniquely identify where your network is and what is your host address so how does that tie into the classes of ip version 4 addresses for class a the default subnet mask is 255.0.0.0 and what that means is that it's just the first octet that defines the network part of the address so for instance if you have a class a address like 8.2.2.1 by default it means that it's on the same network with everybody that has an address that starts with 8 and it has the remaining 24 bits here for the host that means there can be two race to the power of 24 hosts on this network and if we use our calculator to check that we're going to find out there could be about 16.7 million hosts on a particular network that is a class a network now that's really too large for a network because if you imagine a network being a broadcast domain that means that if any of these 16 million devices actually tries to send a broadcast then all the 16 million devices are going to get it i don't really think there's any network that is as large as that but that's class a class b tries to reduce the number of hosts that we have on the network by increasing the number of networks by changing the subnet mask so we have something that masks 255.255.0.0 which means that the first two octets represent the network while the last two octets represent the host so we have something like class b address that's like 139.15.6.5 the 139.15 becomes the network and the 6.5 is just for the host so what you would say is that it's part of the 139.15 network and so if you look at this then you have 16 bits for networks and 16 bits for host that means that you can have for each network two raised to the power of 16 hosts which is about 65 536 and for class c we follow where this is the number of uh hosts that you can have so that we can increase the number of networks that we can have so with that we have 255.25.255.0 and what that simply means is that now you can have just one octet for the host so you can have two raised to the power of eight hosts and that's going to be about 256 hosts so for instance if we have a class c address like 195.17.22.136 uh it means that the first three parts are for the network so this is on the 195.17.22 network but the host address is a 136. and what it also means is that you can communicate with any device that starts with the 195.17 at 22. so in general for subnet masks the core concept is that wherever you have a one it must match to be in the same network and wherever you have a zero it does not have to match so whenever i have uh if i have two addresses that are 172.16.2.5 and 172.16.7.20 by default the above class b addresses so their mask would be 255.255.0.0 now if i have 255.255.0.0 here oh these are ones so it means that these two addresses must match and these are zeros means that it didn't have to match so since these two addresses match then we can say that they're on the same network now it can get a bit more complex than that and we can look at that when we get into subnetting but in general this is how a subnet mask works private i p addresses are the addresses that are used internally they're not routed to the internet and what this means is that normally if you route every address of the internet the ipa version 4 addresses would not be enough we saw only about two days ago on twitter that cisco systems count together for over 10 billion devices that are connected to the internet now with the current ip4 version addressing scheme and the classes we do not have enough addresses for 10 billion devices in fact if we have two raised to the power 32 that just takes you to about 4.9 billion and there's still many devices that will be connected to the internet besides the 10 billion devices so clearly the ipa version 4 addresses are not going to be enough so the way this problem is being solved is through what's called private appeal addresses so what this means is that whenever you have a network an internal network the address that are used are what are called private ip addresses and they're not routed on the global internet this is done to save ip addresses so what happens is whenever you have an internal network depending on the size you can have a class a address or a class b address or a class c address that is assigned to the internal network and then those addresses are now converted to global ip addresses so that way we can save ip addresses and they are converted through a process known as a net a network address translation so what really happens is that if you have a network of about 200 users you can give them a class c address a class c private address for instance let's say 192.168.1.0 and the subnet mask would be 255.255.255.0 now when these users are going to connect to the internet they can uh all be translated to just a few addresses through something called port address translation which we will talk about as we go along in our cisco journey so now we can translate all these 200 users to just about five addresses you've ended up saving uh 195 of these addresses and making more addresses available for the internet and for things to work so that's why we have private ipa addressing internally if you have ever connected to a network you might notice that the address scheme is one of these schemes either a 10 network or a 172 network or 192.168 network and that's because those are defined private ipa address ranges and they were defined in the rfc 1918 for class a you have the 10.0.0.0 network to the 10.255.255.255 meaning you have just one class a class because remember that class a is just a 255.0.0.0 subnet which means that anything that begins with the first octet is part of the network so for class b we have 172.16.0.0 to 172.31.255.255. so we have 16 class b classes and for class c we have anything from 192.168.0.0 all the way to 192.168.255 so we have 255 class c classes because the subnet mask for class c is 255.255.255.0. now you need to memorize these private ip address classes because they might be in the exam and you need to configure them over and over as you go in your cisco journey so in this video we've been able to look at ipv4 classes we've also been able to look at subnet masks and we've been able to look at private ip addresses that we have thank you very much for watching [Music] hello and welcome to this video on the icnd1 series in this video we are going to talk about ip version 4 subnetting so we're going to look at subnet masks we're also going to look at fixed link subnetting and we're going to take some examples of subnetting so let's get started what are subnet masks subnet mask is used to identify the network in an ipv4 address so when you have an ipv4 address and you have a subnet mask with that subnet mask you can identify the network part of the address and the host part of the address so for instance if i have an ip address that is 192.168.7.0 by default this is a class c address and the subnet mask is 255.255 what this means is that the first three octets form the network part and the last octet forms the host part in the subnet mask the ones represent the network and the zeros represent the host so in this case when we expand the subnet mask to binary you have the first three octets will have ones which represent the network and the zeros will represent the host now whenever you have an ip address with a subnet mask you can calculate what is called the network address and the broadcast address and of the ip address and the network address is the first address in a network while the uh broadcast address is the last address in the network so for instance the range of our 192.168.7 network would be 192.168.7.0 all the way to 192.168.7.255. now that means that our network address for this range is 192.168.7.0 while our broadcast address is 192.168.7.255. now the broadcast address is very useful because if you send a packet to the broadcast address you're pretty much sending it to every host on that network the network address and the broadcast address cannot be assigned to a host so if you have a host on the network they can only have an ip address from 192.168 all the way to 192.168.7.254. so that means that in this network we only have 254 usable host addresses even though we have 256 ip addresses one way to look at it is to say that the number of usable hosts in the network is 2 raised to the power in -2 where n is equal to the number of host bits now let's move on to fixed link subnetting fixed link subnetting is when you try to divide a major class full network into smaller network so for instance if you have a class c network by default a class c network has 256 hosts but what if we need smaller number of hosts and more networks what if you want to have 16 networks with 16 hosts each this is an example of when you used fixed link subnetting because you have equal number of hosts in each of the network and the way you do this is by adjusting the subnet mask of the ip addresses so far we've been expressing the subnet mask and dotted decimal format for instance we have been expressing our subnet mask as 255.255.255.z for class c now there's another way for us to express a subnet mask and that way is what is called a slash notation and what that simply means is that we can use a slash to represent the subnet mask by uh counting the number of bits that are one for instance in this subnet mask we have 255.255.255.0 meaning that the first three octets will be once while the last octave will be zeros so if we expand it to binary we would have one one one one one one one dot one one one one one one one one dot one one one one one one one dot zero zero now that means that we have 24 ones and eight zeros so if we're going to use the slash notation then our subnet mask would be a slash 24. so by default subnet mask for class c is a slash 24. for class b's we know that uh the subnet mask is 255.255.0. and that means that the subnet mask will be at slash 16 because the first two octanes will be ones and the b16 ones for class a the subnet mask is 255.0.0.0 and that's going to be a slash 8 because the first octet is the one that has a 1. now this is very useful when you get to fixed length subnetting because we're going to have things like slash 12 or 29 and things like that just counting the number of ones and this is very useful for us to get used to converting from the slash notation to the decimal notation or the binary format now let's take an example so now we have a question that says that we should subnet the 10.10.0 network into six networks now by default 200.10.10.0 is a class c network and the default subnet mask is at 24. which is 255.255.255.0 now we want to subnet it into six networks there are four steps to do this the first step is to find the number of networks when i say the number of networks here you'll be surprised because we already have sid networks but what this means is find the closest multiple of two to the number of networks so what we're going to do is again start from two and multiply by two till we get to the first number that is above six so we're going to start from two multiply by two to give us four multiply two to give us eight and since eight is greater than six we will stop there the next thing we want to do is to find the number of network bits and the way to do that is to count the number of twos that we have and that's three so our network bits would be three and then that would tell us how to adjust our subnet mask so our initial subnet mask goes 255.255.255.0 if we convert that to binary we're going to have one one one one one one one one one one one one one one dot one one one one one one one dot zero zero zero zero zero zero now since we are trying to subnet this network what we are concerned with is the host because the host bits right now uses one network of 256 addresses and we're trying to subdivide it into different networks so what we're trying to do is we're trying to reduce the number of host bits so we can have more networks and since we have determined the number of network bits that we need which is three that means that the first three bits will become ones so this will become one one one so our new subnet mask would actually be one one one one one one one one dot one one one one one one one one dot one one one one one one one dot one one one zero zero zero zero zero so we know that that would be two five five dot dot something and to figure out what that is we can just use our binary placeholders so we have uh one two and eight sixty four thirty two sixteen eight four two one and we have one one one zero zero zero zero zero so if we add that together we're going to have 128 plus 64 plus 32 and that's going to give us 128 plus 64 is 192 plus 32 that's 244 so our new subnet mask would be 255.255. so how does that help us to calculate the ranges the way to calculate the ranges is to pick the block size and increase using the block size and how do you know the block size the block size is determined by the number of host bits and right now we know that the number of host bits would be the number of zeros which would be one two three four five so we have five host bits and because we have five host bits our block size will be two two raised to the power of five which is 32 now you might not be able to remember what two raised to the power five or two raised power seven is so another way to look at it is where the last one is from your placeholder and that's 32 so you know that your block size is 32 so based on this block size we know that our network would be in increments of 32. so for instance our first network would be 200.10.10.0 the next one then would be 2.10.10.32 the next one would be 2.10.10.64. the next one would be 200.10.10.96 128 160 one uh next one would be 182 and next one would be 224 so we just keep adding 32 to get the number of networks now if uh you look at it we have one two three four five six seven eight networks because the next one will be 256 and 256 is already more than 255 so it's not part of it now we have eight networks that just shows us the mere fact that we want six networks doesn't mean we're going to get six numbers because of the fixed length subnet mask you can only divide the network into powers of two so that's why we had to do two times two times two at the beginning which was eight now the other thing you need to know is that the ranges so for the first network we're going to have is 200.10.10.0 all the way to 200.10.10 10.31 which is a number before 32 and that means that this will be our network address and this would be our broadcast address similarly for the next network it will be 2.10.10.32 all the way to 63. my next one would be 64-91 and this would make this a network address and that the broadcast address and all the way down to two four four two four two two four to two five five now this might be a little fast at the beginning so you can take more examples and we're going to spend the next video taking examples of subnetting uh so in this video we've been able to look at subnet masks we also have been able to look at fixed link subnetting and we started looking at examples of how to subnet in the next video we'll continue to write from where we stopped by looking at more examples of subnetting thank you very much for watching [Music] hello and welcome back to this video on the icnd1 series in the last video we started looking at subnetting and this video we will do some more subnetting examples so we're going to look at subnetting based on network requirements and host requirements now let's get started so in this question we were supposed to submit the network 20.0.0.0.8 into uh 500 networks remember in the last example we looked at a class c network and tried to subnet it into some smaller networks so we're going to use the same approach to subnet a class a network so we have 20.0.0.0. so what does a slash eight mean a slash eight network means that the subnet mask is eight ones and the rest are zeros so the subnet mask is one one one one uh one one one one zero zero zero zero zero zero zero zero dot zero zero zero zero zero zero zero zero and zero zero zero zero zero zero zero zero so all we have is two five five dot zero 0.0.0 so that's our subnet mask for the class a network and now we want to subnet it into 500 networks first thing we want to do is to find the number of networks now we have 500 networks we are trying to find the smallest power of 2 that's bigger than 500 so we have 2 multiplied by 2 which gives us 4 multiplied by 2 which gives us 8 multiplied by 2 which gives us 16 multiplied by 2 which will give us 32 multiply by 2 which will give us 64. multiply by 2 which will give us 128 multiply it by 2 which will give us 256 multiply by 2 which is going to give us 512. now 512 is more than 500 so we'll stop now let's count the number of twos that we have to get the number of bits that's one two three four five six seven eight nine now another way to say this is two raised to the power of nine equals five hundred and twelve but remember that you don't have a calculator for the ic and d1 exam so our number of network bits will be nine and the next thing to do would be to adjust to the original subnet mask and how do we adjust the original subnet mask remember that we had 255.0.0.0 which we expanded into binary in this binary sequence so what we're going to do is we're going to increase the number of ones by nine so we're going to have 1 1 1 1 1 1 1 1 and then another one here and then the rest of those are going to be zeros so we're going to have a subnet mask as one one one one one one one one one one one one one one and then one zero zero zero zero zero zero zero and then all zeros the first octet will definitely be two five five the next octet is 255 and then for this octet we have one zero zero zero zero zero zero zero and if we use our placeholders we would find it at 128 because it's the first one so we have our placeholders remember 128 64 32 16 8 4 2 1. we have one zero zero zero zero zero zero zero so that's definitely 128. so our subnet mask will be 255.255.128.0 now to calculate the network range we're going to use the number of host bits and the host bits is here in the third octet what is what's the most significant so if we look at the third octet we have seven host bits and two race to the power seven is 128 as you can see from our place values so that means that we have a 128 increment in the third octet so our networks range will start from 20.0.0.0 to and the next one would be 20.0 so how do we know the broadcast address the broadcast address is the address before the next network address that's going to be 20.0.12 because that's the address right before 20.0.128.0 now it's easy to make a mistake and say that it's 28.0.127.0 but that will be wrong it's actually 20.0.127.255. now if you want to look at the amount of hosts that you have in this network it's actually a lot because we have eight bits here and seven bits here so you have two raised to the power of 13 possible addresses and when you subtract the network addresses and the broadcast address you're going to have 2 raised to the power of 13 minus 2 hosts so i'll use a calculator now and i know that two raised to the power of 13 is eight one nine two when you subtract two from that you get eight one nine zero so we have eight one eight thousand one hundred ninety possible hosts one thing you need to remember is that subnet mass can be represented in the dotted decimal format or in the slash representation so we can look at this and say okay from here we know that it's 8 16 and 17. so this is also what is known as slash 17 network again you should be familiar with the different representations of the slash notation and the dotted decimal notation because the exam questions will come in any format now let's take a look at another example but this time we'll look at trying to subnet based on hosts in this example we have the 200.200.200.0 network which is by default a class c network i want to submit it into 60 hosts again this is almost the same when we did it for the networks except that for the host bits we're going to be adjusting the zeros from the right hand side so by default it's a slash 24 network which means that there are three octanes which is 255.255.255. and when expanding to binary we have three strings of eight ones now for 60 hosts the first thing we want to do is to find the number of hosts which is the smallest power of two that is greater than 60 so we're going to have 2 multiplied by 2 which is 4 multiplied by 2 which is 8 multiplied by 2 which is 16 multiplied by 2 which is 32 multiplied by 2 which is 64. so we know that the number of hosts is 64. next thing we want to do is to count the number of bits and we can just count the number of twos which is one two three four five six and i would say this is two raised to the power of six is 64. for the number of hosts between two and raise six so we are going to adjust the original subnet mask and adjust the original subnet mask we're going to expand our subnet match which is one one one one one one one one dot one one one one one one one one dot one one one one one one one dot zero zero zero zero zero zero zero zero again because we are looking at it from a subnetting uh perspective we are going to be concerned with the host and now we're trying to adjust the host before we had eight bits for the host and now we are trying to reduce it to six bits for the host so we count it from the right hand side we have one two three four five six which means that these remaining two will now become one so our new subnet mask will be one one one one one one one one dot one one one one one one one one dot one one one one one one one dot one one zero zero zero zero zero zero meaning that we're going from 24 bits to 26 network bits so our subnet mask is becoming a slash 26 and when we try to convert into binary if we use our placeholders we have 128 64 32 16 eight four two one and we have one one zero zero zero zero zero zero which is 128 plus 64. so our subnet mask would become 255.255.255.192. now for our network ranges we already know that we have six host bits and two raised to this power six is 64. another way to remember that is to look at the last value of one that we have and look at the placeholder which is 64. so our network ranges will be in increments of 64. so for instance we are going to start with 200 200.200.0 and the next one will be 200.200.200.64. for the first one the broadcast address would be 200.200.200.63 which is the one number before the new network address so we know that our ranges will be 200.200.200.0 to 200.200.200 200.200.200.63 the next one would be 200.200.200.64 to 200.200.200.127. now there are many formats with which the questions can come out on the exam so for instance you could be asked to find the subnet mask you could also be asked to find the range you could be asked to find the broadcast address or the network address you could be asked to compare the two numbers if they are in the same network and things like that so there are different formats of which you can have subnetting question and the key is to be familiar with how to manipulate subnets and that comes from a strong understanding of your binary so i always urge you to take more time to practice more examples now we're just going to look at one more example and this is a class b network what we have is 150.20.00 16. and we're trying to divide it into a network of 500 hosts now again we have a requirement with host and not with networks but it's the same concept the first thing we want to do is to find the smallest power of two that's larger than the number of hosts and that we're just going to keep multiplying by two so we're going to say two times two which is four times two which is eight times 2 which is 16 times 2 which is 32 times 2 which is 64 times 2 which is 128 times 2 which is 256 times 2 which is 512. now 512 is more than 500 so we would stop so we have five one two here next thing we want to do is account so it's one two three four five six seven eight nine so we know that the number of host bits have to be nine now we're going to adjust the original subnet mask how do we adjust the original subnet mask we look at the subnet mask and it is a 16 which means that we have a 16 one so we just write that out 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 which is 16 and then the remaining 16 would be zero so zero zero zero zero zero zero zero zero and zero zero zero zero zero zero zero zero now we have nine host bits and so what's going to happen is that from the right we're going to count nine bits which is up to this the first eight bits in one from here and they will be remain zero meaning that these other ones will become one so we have one one one one one one one and then the last one will be a zero and for the last octet everything will be zero so we have zero zero zero zero zero zero zero zero so we have been able to reduce the number of hosts bits from 16 to nine so we've been able to save seven extra network bits and that should tell us that we are going to have two races of the power seven new network which is like 128 networks and from our host bits each of these networks will have 512 ip addresses so our new subnet mask would be all ones are ones and seven ones so we have two five five dot two five five dot when we have seven ones let's use our place orders which is 128 64 32 16 8 4 2 1. so we have one one one one one one one zero so 128 plus 64 is 192 plus 32 is 20 24 plus 16 that becomes 240 plus 8 becomes 248 plus 4 that becomes 252 plus 2 becomes 254 so it's going to be 255.255.24 so that's our new subnet mask and if we want to represent it in the slash notation we are going to have eight ones eight ones and seven ones at 16 plus seven which is a slash 23. we can ask either say our subnet mask is slash 23 or that is 255.255.254.0 they mean the exactly same thing for our network ranges the easiest way to look at it is um the look at it from the third octet because that's the octet that has ones and zeros and we know that we have one zero which is one host bit that means in the third octet we have one bit that changes and one bit that would be two raised to the power of one which is two so in the third octet we are going to have it increasing in values of two so we're going to have things like 150.20.0.0 for the first one and then the next one would be two so 150.20.2.0 now what's the broadcast address for the first range it's going to be 150.20.1.255. now think about it that means that for the first network you're going to start at 150.20.0.0 and go to 150.20.0.1 all the way to 150.20.0.255. and then move on to 150.20.1.0 150.20.1 all the way to 150.20.1.255. and they will all be on the same network and then by the time they get to 150.20 that 2.0 it goes into a different network and that's a new network address and that would end up 150.20.3.255. and the next one will start from 150.20.4.0 which will be a new network address and if we look at it this shows us that uh we have 150.20.00 all the way to 255 and 150.20.10 all the way to 255. that's about 512 addresses which is what we calculated at the beginning for the host again when you have 512 addresses the number of usable addresses would be 512-2 which is 510 so you can only have addresses that can now be assigned to 510 hosts because the first address is a network number the last address is a broadcaster broadcast address now i have a couple of questions for you to practice so i just urge you to take a pen and a paper and try to on your own figure out what the subnet mask and the network ranges would be for these three questions again you just need to follow the four steps in the video and you'll be able to solve these questions in this video we've been able to look at subnetting based on two different requirements the first one is subnetting based on the number of networks that we need and the second one was subnetting based on the number of hosts that we need so in the next video we're going to look at variable length subnetting we're also going to look at some possible troubleshooting question with ip addressing thank you very much for watching [Music] [Music] hello and welcome back to this video on the icnd1 series in this video we are going to look at troubleshooting some ipa address problems and we are also going to look at variable length subnet mask so let's get started on the icnd1 exam you would encounter some troubleshooting questions for example some questions will ask you for what is wrong with a particular ip address or why a network is not coming up and you need to be able to use your knowledge of ip address and subnet mask to be able to figure out what the problem is so for instance let's look at this question in this question we want to know which of these i p addresses is a valid i p address and which ones are wrong i p addresses when you look at these four i p addresses they all look like legitimate i p addresses but you need to look further to be able to figure out which ones are right i p addresses what the question is really asking is which of these ip addresses can you assign to a host and you know that you cannot assign a network addresses and broadcast addresses so what we're going to do is we're going to find out which of these one is a network address or what or a broadcast address let's look at the first one 192.168.2.31 the first thing we need to look at is a subnet mask which is slash 27. it means that you have 27 bits for the network and when you have 27 bits for the network that's one one one one one one one one then one one one one one one one that's 16 1 1 1 1 1 1 1 24 and 1 1 1 zero zero zero zero zero so this means that we have just five bits for the host and that means that we have two raised to the power five number of addresses that we can have in a particular network which is 32 and that means that for the first network we'll have 192.168.2.0 all the way to 192.168.2.31 and the next one will start from 192.168.2.32 so from this we can see that 192.168.2.31 is a broadcast address so it's not a valid ip address you cannot assign it to a host if we go to the second question it's a slash 26 and that means that it would have 32 minus 26 bits for host which is six when you do twos raised to the power six that's 64. that means that your network address will be 192.168.2.0 and 192.168.2.64 and 192.168.2.128. etc now 2.64 is a network address so you can't assign it to a host this is also wrong now the third option says 168.17.0.255 23. normally when you see 8.255 you would assume that it's a broadcast address but look at the subnet mask it says 23 and what that means is that you have 23 ones so you have one two three four five six seven eight for the first octet 19 11 12 13 40 15 16 for the second octet and then 17 18 19 20 21 22 23 and then at zero in the third octet before we have all zeros in the fourth octet so what this means is that in the third octet we have one bit for host addresses and it means that we have two raised to the power of 1 which is 2. i'll just clear the screen so we have some more space to work so for 23 we have 1 1 1 1 1 1 1 1 1 1 1 1 1 1 in the third octet we have seven ones one one one one one one zero and zero zero zero zero zero zero zero zero so here in the third octet we have one bit which is two raised to the power of one which is two that means that the network address will increase by 2 in the third octet so we would have 168.17.0.0 and the next one would be 168.17.2.0 and we have 168.17.4.0 and the broadcast address for the first one would be 168.17.1.255. so as we can see 168.7 would actually be a valid address because it's between these two addresses and it's neither a network address nor a broadcast address so this is a broadcast and this is a network but this is a valid address and then for the last question this is a 24 just to give you a giveaway for all 24 networks they start out at zero and end out at 255 so we know this is a broadcast address so with this question if the option a b c or d the correct answer would be c now let's look at another troubleshooting question if we have a scenario where we have an ip address to be 192.168.1. and a default gateway to be 192.168.1.30 and they are both 28. what is wrong with this scenario first thing we need to look at is the ip address here what is the network for this ip address the way we can find that out is from the sudden net mask a subnet mask is a slash 28 and that means that you have 28 network bit four host bits and because we have four host bits that means that in the last octet we would have rate 2 raised to the power 4 which is 16 and this means that you have your network in increments of 16 and the last octet so we're going to have 192.168.1.0 as the first network and we have 192.168.1.16 for the second 192.168.1.32 and 192.168. in the increment of 16 like that and our broadcast address would be 192.168.1.15 192.168 192.168.1.47 etc so when we look at the ip address sit in a network between 192.168.1.32 and 192.168.1.47 while the default gateway is in another network between 192.168.1.116 and 192.168.1.31 so we were to put the network address in it would be 192.168.1.32 28 as a network address and this would be 192.168.1.1628 as a network address this means that they are totally different networks and because there are two different networks the host will not be able to communicate with the default gateway and you will not be able to reach any of the outside networks so the way to fix this would be to either assign the host an ip address in the same network with the default gateway or to point the host to a default gateway that is in its own subnet so this is an example of troubleshooting question that you might face in an icnd1 exam and the way to solve it is to use the knowledge of subnet mask and ip addressing now let's move on to another part of ipversion for addressing which is variable length subnet mask so far in all the examples we have been looking at in ip addressing we've been looking at a subnet thing based on just one subnet mask so we have different networks with the same number of hosts on a network but what if we wanted to have different networks with different numbers of hosts for instance in this example we have our corporate networks to be a class c network so in this example we have the corporate network 192.168.1.0 and we are supposed to submit it into sales marketing accounts and guests with sales having 120 host marketing 60 host account study host and guest study host so for each department we're going to run through our subnetting methods and then determine what subnet mask we're going to use so for sales the first thing we want to do is to try to determine the number of hosts and that's the smallest power of 2 that's greater than 120 so we're going to have 2 times 2 which is 4 times 2 which is 8 times 2 which is 16 times 2 which is 32 times 2 which is 64 times 2 which is 128 so we stop at 128 because it's greater than 120 and the next thing we are going to do is to count the number of bits which is one two three four five six seven and that means we need seven host bits our current subnet mask is slash 24 which means 24 ones so we have one two three four five six seven eight dot one two three four five six seven eight dot one two three four five six seven eight dot now we have 24 so we have zero zero zero zero zero zero zero zero if we want seven host bits currently we have eight host bits so one of these bits will become a network bit and that means that our new subnet mask would be one one one one one one one one dot one one one one one one one dot one one one one one one one and for the last octate we have one zero zero zero zero zero zero zero so our subnet mask would go from being a slash 24 to 25 and to get the network range we know that the number of host bits is 7 so 2 raised to the power 7 would be equal to the number of hosts which is 128. another way to check if it's true is to place values for this which is 128 here since the last octet is in multiples of 128 we're going to have uh 192.168.1.0 for the first network and 192.168.1.128 for the second network and above 25. now this is where it gets different for vs vlsm in vlsm you have to decide which of these two subnets you want to assign for sales and then we now submit the rest for marketing so if we pick the first one and say this is going to be for sales we are now going to try to subnet these further so now we have a new network 192.168.1.128 25 and slash 25 means that our new subnet mask has 25 ones so for marketing we need 60 hosts and for 60 hosts we're going to try to find the number of hosts bits that we need and we can do that by saying 2 times 2 which is 4 times 2 which is 8 times 2 which is 16 times 2 which is 32 and times 2 which is 64. if we count that we will have 1 2 3 4 5 6. that's 6 bits and that means that we are going to subnet once more so we are going to be reducing our host bits further by another one bit so we are now going to have six host bits and to get the number of hosts that we needed was raised to the power 6 which is 64. so we know that if the first one is 128 the next one would be 192.168.1.192 but this time it's going to be slash 26 and 26. in other words from what we can see here is that one slash 24 network equals 2 25 networks also that one slash 25 networks can be further subnetted into two 26 networks so again we are going to pick which one we want to use for marketing and we're going to say that's okay let's assign the first one to marketing which is uh this slash 26 and then we're going to further subnet this between account and guest so that i'm just going to clear the screen so that we can run through it again all right so we're back so for sales we've already assigned 192.168.1.0 25 for marketing we have assigned 192.168.1.128 26 for accounts and guests we have uh 192.168.1.192 26 and we have to further subnet so again our slash 26 would be 26 once we have one one one one one one one first octet one one one one one one one second octet one one one one one one one one third octet and that's 24 so we have one one zero zero zero zero zero zero last octet again once subnetted into 30 host if you want to find the number of host bits we're going to start by finding the smallest power of 2 that is greater than 30 and that would be 2 multiplied by 2 which is 4 times 2 which is 8 times 2 which is 16 times 2 which is 32 so and 32 is greater than 30 so we count one two three four five which is five so we count number of host bits right now we have six and that means that if we make one other network bit we can further subnet it and using one another network it means that the subnet mask will be 27. again don't forget that you can only express this in terms of dotted decimal and in terms of decimal our slash 27 would be 255.255.255. dot uh here we have 31 so we'll be using our placeholders we have 128 64 32 [Music] 16 8 4 2 1. and we have 1 1 1 0 zero zero zero zero so if we could add that together we're going to have 128 plus 64 plus 32 and that's equal to 224 so our subnet mask would be two five 255.255.255.24224 or what we would just say is a slash 27. and to find the number of hosts we know that our number of host bid is five and 2 raised to the power 5 is 32 so we're going to have an increment of 32 from 192. so it's going to be 192.168.1.92 for the first network and the next one would be 192.168.1.224 here our broadcast address would be 192.168.1.223 and here our broadcast would be 192.168.1.255. so we have been able to subnet our corporate networks into four different subnets with different host numbers so they have different subnet masks so our new addressing scheme would be like this where we have a 192.168.1.0 25 for sales and it's going to start from zero all the way to 127. here for marketing we have 192.168.1.128 and it's going to start from 128 all the way to 191. and here we are going to have accounts for 192.168.1.192. slash 27 and that will be 192 all the way to 223 and for our guest we're going to have 192.168.1.224 slash 27 so going from 224 to 255. so we've been able to unequally divide the network that has 256 addresses into uh subnets based on the requirements that the subnets have so we started off this video by looking at the ip addressing troubleshooting scenarios that you may encounter on the icnd1 exam and then we wrapped it up by looking at the variable lake subnet mask thank you very much for watching
Info
Channel: Paul Browning
Views: 14,519
Rating: 4.9386973 out of 5
Keywords:
Id: 9GtL8dW8rYY
Channel Id: undefined
Length: 72min 49sec (4369 seconds)
Published: Sat Aug 21 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.