IP Addressing: CIDR
Welcome back to the course on Computer Network and the Internet Protocols. So, in thelast class, we are looking into this concept of IPv4 addressing, and we have looked intothe concept of classful and the classless addressing scheme with the help of subnettingand the supernetting. So, today we will look into a specific example about the subnettingand supernetting, and given a larger address pool, how can you construct multiplesubnets out of that particular address pool.(Refer Slide Time: 00:51)So, we have looked into this basic addressing format in CIDR. So, you have a IP addressand a corresponding subnet mask. The subnet mask determines that how many number ofbits are there in your subnet IP field. So, here in this particular example your this manynumber of first 8 plus 4 that 12 bits are your network IP, and the remaining bits are forthe host address. So, this gives your subnet boundary. So, this bits are for your subnet IP,and the remaining bits are identifying the host inside that particular subnet.(Refer Slide Time: 01:37)So, let us look a few example of subnetting that how can you actually have this kind ofhierarchical addressing concept in network. So, assume that the IP address of a networkis 203 dot 110 dot 0 dot 0 slash 16. So, this slash 16 in CIDR notation means you have16 bits in the network IP field, and the remaining 32 minus 16 that means, the 16 bits arefor host addresses, so that is the address pool that is given to you.(Refer Slide Time: 02:12)Assume that is an organization network, this organization network it has this borderrouter from the central IP allocation authority. In case of India, it is a PNIC; from there,they get this particular pool of IP address say 203 dot 110 dot 0 dot 0 slash 16, so, that isthe IP address, which is denoting this entire network.Now, in this network, say the organization want to divide this network into three subnet.So, inside this network I have say three subnets; this is one subnet that they want tocreate, then this is another subnet that they want to create, and say a third subnet thatthey want to create. So, they want to create these three subnets.So, the question comes that how will you divide this entire address pool into threedifferent subnets. So, the first question comes that how many bits do you require to havethree subnets. So, to create three subnets indeed, we require 3 bits and not 2 bits. Whynot 2 bits, because we want to avoid again all zero’s and all one’s in the subnetaddressing field.(Refer Slide Time: 03:48)So, these 203 dot 110 dot 0 dot 0 slash 16 it says that well, these 203 dot 110, this part ismy network address part, then I have 16 different bits. So, I have 8 bits here followed by8 bits here, this 8 bits plus 8 bit 16 bits I can use to create the subnets. Now, whenever Iam creating the subnet, if I have to create three subnets, I have to take certain number ofbits from the host.So, whenever we are taking certain number of bits from the host to create three subnet,we should not take 2 bits. So, because if you are taking 2 bits, your subnet IP so, say hereyou are taking 2 bits if you are taking 2 bits here, so one subnet IP can be 0 1, then thehost address part, another one can be 1 0, then the host address part, the third one need tobe either 1 1 or 0 0. Say if you are using all one’s and all zero’s, then there are certainproblems. So, let us see what is the problem there.(Refer Slide Time: 04:52)So, the problem of all zero’s and all one subnets are something like this. Say if you areusing all 0s as a as a subnet IP, so here this particular router has the IP address of 192 dot168 dot 0 0 slash 16. Now, say you create a subnet by taking this 0 at the subnet in theindication part, so this one I want to divide into two subnet. Now, in this subnet, I amusing this 0 to denote one subnet, and this 1 to denote another subnet.Now, if you use this 0 to denote this subnet, now considering the network address partand the subnet part, I have 17 bit, which is being used for denoting this subnet. But,interestingly if you use 0 as a identifier for this subnet, the network address for thissubnet is equal to the network address for the your original network.So, the network address for this subnet will be 192 dots 168 dot 0 dot 0; the networkaddress for this subnet will also be 192 dot 168 dot 0 dot 0, and that is why we normallyrefrain from using all 0 subnet. Because, if you are using all 0 subnet, we call it as subnet0. So, if you are using all 0 subnet, then you may have a problem like the subnet IPbecomes equal to original to your the original network IP.Similarly, for the all 1 subnets, here you see that whenever you are creating a subnet like192 dot 168 dot 128 dot 0 slash 17. so here I am taking this 1 as the subnet identifier, thesubnet indicator. So, if I take this 1 as the subnet indicator, so in that case my subnet IPcomes to be 192 dot 168 dot 128 dot 0, so 1 followed by all 0s. If 1 is here then all 0s,then this comes to be 128 in decimal format.(Refer Slide Time: 07:09)So, in that case if you try to find out the broadcast IP for this subnet, so the broadcast IPfor this subnet will be equal to all 1s in the host bits, then all 1s. So, this is equal to 255,this is equal to 255. So, the broadcast IP for this subnet is 192 dot 168 dot 255 dot 255.Now, what is the broadcast IP for the original subnet, so the broadcast IP for this originalsubnet is again, because this is a 16 bit, so I need to make all these bits as 1. So, it is 192dot 168 then all 1s and all 1s, so 192 168 dot 255 dot 255 that means, the broadcast IP forthis subnet becomes equal to the broadcast IP of the original subnet, so that is theproblem of all 1 subnet.So, if you find out the broadcast IP for this subnet, the all 0 subnet that will be differentthat will be equal to 192 dot 168 dot 0 then all 1s dot all 1s that would be different. But,the problem is that the network IP for the subnet becomes equal to the network IP of theoriginal network that is the problem for subnet zero for subnet one or all one subnet. Theproblem becomes that the broadcast IP for the original network becomes equal to thebroadcast IP of your subnet, so that is why we do not use the all zero’s and all one’s in asubnet IP field.So, in the previous case, again if you are going to use 2 bits to denote three subnets, theneither you have to use 0 0 as a part of the subnet or 0 1 as a part of your subnet IP. So,you do not want to use that to avoid all zero’s and all one subnet. So, you can you needto use three bits for doing this subnets.(Refer Slide Time: 09:20)Now, if you want to use three bits for doing this subnet, your subnet IP can have the IP of1 0 0, subnet 2 can be 1 0 1, subnet 3 can be 1 1 0, and the remaining 13 bits can be usedto addressing the hosts inside those subnets. So, in that case, if you are using 1 0 0 as thesubnet IP, the subnets becomes 203 dot 110 dot 128 dot 0 slash 19 that is the yeah so thatis the subnet mask. Because, we are taking 3 bits from the host address to denote thesubnet, so the subnet mask becomes 16 plus 3 that is equal to 19.The 2nd subnet if you are using 1 0 1, then the second subnet in the dotted decimalformat becomes 203 dot 110 dot 160, 1 0 1 followed by all 0s 0 slash 19. If you aretaking 1 1 0, it becomes 203 dot 110 dot 192, 1 1 0 followed by all 0s by a decimalequivalent of 192 followed by 0 slash 19. So that way you can create three differentsubnets out of the network IP that is given to you.(Refer Slide Time: 10:36)Now, let us see another concrete example of CIDR. So, I have taken an scenario of IITKharagpur. So, this is our computer and informatics center. So, our CIC, they have takenIP pool of from PNIC. Say the IP pool, they are getting is 203 dot 110 dot 0 dot 0 slash19.So, if this IP pool is given to them that means, the 19 bits are for the network address,and then the remaining 32 minus 19 that means 13 bits, they can use for the host address.Now, with this 13 bit at the host address which is their total inside IIT Kharagpur. Now,assume that we are just concentrating on three different departments of IIT KharagpurCSE Computer Science, VGSOM Vinod Gupta School of Management, and ElectricalEngineering EE.Now, assume that the CSE has 2000 host, VGSOM has 500 host, and EE has 500 host.And with this 13 bit at the host field, you want to create three different subnet; onesubnet is for CSE, the second subnet is for VGSOM, and the third subnet is for EE. So,the question comes that with this 13 bit, how will you do that.(Refer Slide Time: 11:54)So, first let us do an estimation that to address this many number of hosts, how many bitsdo I require? Now, to address 2000 host, you require at least 11 bits, because 2 2 to thepower 11 becomes equal to 2. So, 2 to the power 11 is 2048. So, with 11 bits, you cansupport 2000 number of host. And then 9 bit is required to support VGSOM. 9 bitsmeans you can support 512 minus 2 that means, 510 number of host, so that is forVGSOM. Similarly, for EE, you require 9 bits.(Refer Slide Time: 12:56)Now, here you see that if you are the maximum number of bits that is required to havingthis host is 11 bits. So, if that is the case, then if you are taking 11 bits to addressing thehost, then there are only 2 bits remaining, because here you can have a total of 13 bitsfrom this subnet mask. You can get a total of 13 bits to denote the host.And out of the 13 bit if you require 11 bits to denote a host, only 2 bits are required for,only 2 bits are remaining for doing the subnetting. And as we have looked earlier thatusing 2 bits, you cannot do the subnetting properly. So, here we apply the concept ofsupernetting. So, let us see that how we apply the concept of super netting here.(Refer Slide Time: 13:25)So, what we do, so that is the entire thing. So, our address space was 203 dot 110 dot 0dot 0 slash 19. So, we have 13 bits, which are available to serve all the host of IITKGPnetwork, and we need to divide this address space among three subnets. And what wehave seen that CSE requires 11 bits, VGSOM requires 9 bits, and EE requires 9 bit fortheir host address.So, we have only 2 bit left for identify the three subnets. So, again to avoid all zero’s andall one subnets, this is not possible. So, here we apply the concept of supernetting thatmeans we combine VGSOM and EE network together.
IP Addressing: CIDR - Part 2
So, if you combine VGSOM andEE network together, let us see what happens.(Refer Slide Time: 14:11)So, we are combining VGSOM and EE together. So, together, now they have they have500 plus 500 that means, 1000 number of host, and to address those 1000 number ofhost, 10 bit at the host address space is sufficient. And now, with the remaining 2 bit, youcan always divide it into two different subnets.So, what we are doing here, we are putting this additional router here in between thatrouter is helping me to treat this entire subnet as a this combination of these two subnetas a entire (Refer Time: 14:50) network. So, now I need to, I do not need to divide it intothree subnet from here, I need to divide it into two subnet. And using 2 bit, I can safelydivide it into two subnets.(Refer Slide Time: 15:05)So, what I can do that now CSE requires 11 bits, VGSOM plus EE together, they require10 bits. So, with 11 bits, I can serve all the host. So, what I do that; that was my originalnetwork address 203 dot 110 dot 0 dot 0 slash 19. So, with 19, so this is up to mynetwork address place, and this X that we can use as the host and a subnet. So, we takethese two bits.So, using these two bit, we divide it into two different subnet; one subnet is for CSE,another subnet is for this VGSOM plus EE. So, let us use 1 0 to denote the CSE network,so in the place of these two bits. So, if I use 1 0 here, then I have this 8 plus 3 11 numberof bits available to address all the host in the CSE network. So, my IP address for theCSE network becomes 203 dot 110 dot 16 dot 0 slash, now I have taken two bits here atthe network address space, so this becomes 19 plus 2 that is 21.And the VGSOM plus EE network address, it becomes so, these 2 bits I am making themas 0 1, so I am avoiding all 0s and all 1s here. And so, the VGSOM plus EE network thatis the combination of that subnets the supernet, they have the address of 203 dot 110 dot8 dot 0 slash 21. So, 8 dot 0, because this 0, this 1, and then again all 0s in the place of X,the way we get the network address for a particular subnet. So, we get this address forthe VGSOM plus EE network.Now, so this is our scenario. So, this was my entire address pool. This entire addresspool, I have divided into two subnet, one subnet is going to CSE, and the second subnetis going to VGSOM plus EE. Now, this second subnet again I have to divide it into so,after this router, so this intermediate supernetting router that I have placed here. So, afterthis router, I have to again divide this address pool into two different subnet; one subnetis for VGSOM, another subnet is for EE.So, here we see that well, the 21 bits have been used for the network address space. So, Ihave 11 bit total 11 bits remaining. So, total 11 bits are remaining, and VGSOM requires9 bits, and double E requires 9 bits. So, my life is simple here.(Refer Slide Time: 18:05)So, now VGSOM requires 9 bits, EE requires 9 bits. This is my network address. So, thisnetwork address, these two bits I have already used in the previous step of subnetting tomake a combination of VGSOM plus EE network. Now, we use the next two bits. So,this using this next two bits, I can differentiate between VGSOM network and the EEnetwork.So, for the VGSOM network, I am giving a network IP of 1 0. And to the EE network, Iam giving a network IP of 0 1 to this XX (Refer Time: 18:43) place. And accordingly, Iget the VGSOM network address as 203 dot 110 dot 12 dot 0 slash 23. Earlier it was 21,I am taking 2 bit from the host and putting it at the network, so the subnet mask becomes23. And the double E network it becomes again 203 dot 110 dot 10 in the dotted decimalformat dot 0 slash 23.So, that way, now I am able to with the help of the subnetting and supernetting I am ableto distribute this entire IP address space that was given to me into two different subnets,so or three different subnets in a hierarchical way. So, initially we divide it into twodifferent subnet, where I have CSE in one side, and the combination of VGSOM plus EEin another side. And in the next step, I have divided these, the second level of IP addressto the VGSOM network and the EE network.So, that way in a hierarchical way, you can once you are getting a pool of IP addressesfor your institute, you can divide it into multiple molar subnets, and allocate the IPaddresses to the individual subnets. There is another interesting fact in CIDR, becausewe do not have this kind of fixed class boundary, what we can do that we can use whatwe say as the variable length subnetting.(Refer Slide Time: 20:22)So, we use something called a variable length subnetting. What is this variable lengthsubnetting? So in the earlier example in this particular example; if you look into thisparticular example, here actually we are using something called a fixed length subletting.So, what we are doing that whenever we are breaking this entire thing into two subnets,for both the subnets, we are using slash 21 as the netmask.Similarly, whenever in the second level, we are dividing it into VGSOM and EE, we areagain using for both the cases slash 23 the equal length or the similar length or the fixedlength subnet subnet mask or netmask. But, CIDR does not restrict you to use this kindof fixed length subnet mask, you can always use variable length subnet mask that means,for one subnet, you can have subnet mask of length n, for another subnet under the samenetwork, you can have subnet mask of say length (Refer Time: 21:31) m, which isdifferent from n.(Refer Slide Time: 21:40)So, let us see that how you can utilize variable length subnet mask for this particularexample, variable length subnet mask. So, let us see an example of variable length subnetmask. So, assume that your network IP that was given to you is 202 dot 110 slash 0 slash0 slash 20.Now, with this, you have 20 bit at the network IP network address space network prefix.So, you have 12 bits for hosts. See if you have 12 bits for host that means, you cansupport 2 to the power 12 minus 2, this many number of host that means, equal to 1024minus 2 1022 number of host.Now, assume that you want to divide it into three different subnets with subnet 1 having1000 hosts, subnet 2 having say 500 hosts, and subnet 3 having another 500 hosts. Now,if this is the case, then for subnet 1 you require 10 bits, because 2 to the power 2 equal to1024, for subnet 2 you require 9 bits, for subnet 3 you again require 9 bits.Now, here’s you see that you have only 2 bits are available, if you are using 10 bits fordoing the subnetting. So, in case of if you want to use a fixed length subnet mask for allthe subnets, then you can at least keep provision for 1000 host for all the subnets that isthe maximum number of host, which is there in any of these three subnets S1, S2, andS3.So, in that allocation, you require 10 bits for the host address part, and 2 bits areremaining for the network prefix. If 2 bits are remaining for the network prefix just byavoiding all zero’s and all one subnet, you will not be able to do that, because with 2 bits,you can you need to avoid 0 0 and 1 1 as the subnet prefix. But, using variable lengthsubnet mask, you can do that.So, what will be that variable length subnet mask, say my network IP is 202 dot 110 nowfor S1, what I do that I take 2 bits to denote the subnet mask. So, for S1, I am takingthese 2 bits, and then the remaining bits are host bits. The host bits I am writing as X 1,2, 3, 4 dot X X X X X X X X. So, these can be the network address for S1.Now, here what we are doing my net mask would be earlier it was 20, I am taking to 2bits, so the netmask could be 22 bits. Then in the second case, for these two host, it is notrequired that you have to use slash 22 as the netmask with the help of this variable lengthsubnet mask, which is being supported in CIDR.So, what you can do, here you can take three bits, so while you are taking this 3 bits, youneed to be little cautious, let me say what is that. So, 202 dot 110 dot 1 0 1 then you take1, 2, 3, 4, 5, 6, 7, 8 dot 1, 2, 3, 4, 5, 6, 7, 8 slash 23 as your net mask.So, here I am taking 1 0 1, but whenever I am taking 1 0 1 the interesting fact is that this1 0 1, so this 0 1 is not a prefix of this 1 0 1. So, if you take this 1 as 0 1 0 you see that 00 1 0 instead of taking 1 0 1, if you take 0 1 0, 0 1 0 can be a host of the subnet S1, sothat one we should not take. So, we should not take 0 1 0, so we should take somethingwhich is not becoming a prefix of the regional one.And for S3 similarly, I can make the subnet as 1 1 0 slash 1 0 0 10 slash 23, so that wayby using this variable and subnet variable and subnet mask, where I am using slash 22 asthe subnet mask here, slash 23 as the subnet mask here, and then again slash 23 as thesubnet mask. I will be able to solve this IP allocation problem, which was not possiblewith this fixed length subnet mask, so that is one of the advantage of CIDR.So, these examples that I have discussed today so, these examples give you an idea abouthow you can effectively do IP allocation to a machine using this IPv4 addressing schemeof a host in a network. By considering this IP hierarchy, where you have this concept ofnetwork address which will uniquely identify a network. And then the host address,which will uniquely identify a host inside that network, so that is the way we use thisconcept of address hierarchy to provide unique addresses to or unique IPv4 addresses toall the host inside a network.In the next class, we will look into the routing mechanism the CIDR routing mechanism,which is being utilized on by using this IPv4 addressing. And we will also look into thathow you can effectively utilize IPv4 addresses with the help of a concept called networkaddress translation. And we look into the concept of IP version 6 in brief, and give you alittle bit overview about what a IPv6 is and how it is different from this IPv4 addresses.And interestingly that is actually one of the biggest failure in computer network this IPv6addressing. But what is the reason behind that failure we will discuss that, so that wouldbe interesting for you.So thank you all for attending this class, we will meet again during the next class.
"Nós enviaremos as instruções para resetar a sua senha para o endereço associado. Por favor, digite o seu e-mail atual."