 Hello, dear learner friends. Welcome for this video session on network layer IP addressing. Myself, Mr. Vipul Kondekar from Walchand Institute of Technology, Sholapur. So, these are the learning outcomes. At the end, you will be able to identify given an IP address that IP address belongs to which class if you are going for classful IP addresses. As well, you will be able to identify given an IP address whether that IP address is a valid IP address or not. So, in this session we will go for these contents where we will have introduction to the IP address, dotted decimal form representation we will go through and then what is classful addressing and how that classful addressing is using separator for network ID and host ID. With this, let us start with this today's session. IP addressing, you know that in OSI layered model as well as TCP IP protocol suite we say that there is a network layer. It is in between transport layer and physical layer and one important function performed at the network layer is logical addressing. Network layer does logical addressing as well it does routing. Now, when logical addressing is to be done, how exactly logical addressing is done in TCP IP? So, IP addressing is used for logical addressing when you are using internet protocol at the network layer. There are two versions of IP. Presently we will concentrate on IPv4 version. When it is IPv4 version, the IP address will be of 32 bits. In other words, it will be of 4 bytes and this IP address will define what connection your packet will take when it is starting from the source and reaching up to the destination over an internet by taking intermediate hops in the form of different routers coming in the picture. One important aspect as it is a address, it has to be unique. All over internet, so if you are using IP that has to be unique. In other words, there should not be any two devices having the same IP address. Now, how we represent IP address? So, now when you want to represent IP address, human is more comfortable with the decimal representation. So, when I want to deal with the IP addresses, what is preferred is dotted decimal form representation is preferred for representing the IP address. Now, what is this dotted decimal form at representation? So, here as IP address is 32 bits, 2 raise to 32 that comes out to be 62 raise to 32 those many addresses are possible that comes out to be around 4 billion. Now, it is difficult to remember the address as a number directly. So, what is done is each address is represented by its binary equivalent in the octet form. So, there will be 4 octets for each address and what we do is we consider the decimal equivalent. We will consider the decimal equivalent of that octet value and in between 2 decimal values we put a dot means if this is a 32 bit binary representation of the IP address. So, how I will use that IP address is I will say it is 128 dot 11 dot 3 dot 31. Another example is again as these are 4 bytes 4 octets every byte is converted into its decimal equivalent value and in between 2 decimal values a dot is put. So, that is why the name given is dotted decimal form. So, these are the dots. So, these are the dotted decimal format. This is the dotted decimal format representation of the IP address. Now, let us check your understanding of if these are the given IP addresses whether the IP addresses are valid IP addresses or is there any error in the IP address representation. This is the solution. So, if you look at these IP addresses in all these IP addresses there is a error. So, if you look at a part. So, what is happen is you have preceded 0 for this decimal value. So, which is not expected in B IP address what you are finding is there are 5 decimal values as there are 4 octets and each octet is represented by its decimal equivalent. There has to be 4 decimal values here you are finding 5 values it is invalid IP address. Now, if you look at C part you find that the IP address is decimal in IP address you are representing 8 bits in the decimal format. So, if you have 8 bit binary number is decimal equivalent can be at the max 255. So, here you are finding that one decimal value of finding is 301 which is invalid one. And here you are finding we have used they have used the combination means one octet is represented by the binary value as it is and other octets are with the decimal values not allowed ok. So, if you are representing dotted decimal form everything has to be in the decimal format itself ok. So, these are the invalid IP addresses. Now, what they are doing is when they started with IP address concept they thought that there could be 3 different types of networks one will be a very big network one will be a moderate and third will be very small. So, what they have done is whatever that 32 bit IP address is divided into 4 5 different classes. So, we want to understand what is classful IP addressing. So, in IPv4 whatever is your 32 bit address it is made up of 4 bytes. So, what is done is the most significant bits of first byte will be capable of differentiating between the different classes. So, this is the property of class A where the most significant bit will be 0. If it is class B it will be 1 0. So, like that it will be 1 1 0 for class C 1 1 1 0 for class D 1 1 1 1 for class E. Now, so if you want to run algorithm to identify if you want to write a program to identify what is the class of the given IP address. So, this can be a very simple algorithm you check under. So, just go for looking at the most significant bit if it is 0 then it belongs to class A. If it is 1 then go for checking next bit. If the second bit is 0 then it will be class B otherwise go for checking third bit means if it is 1 go for checking third bit. So, like this if you implement this algorithm this flow chart through the program. So, you will be able to identify the class. Now, look at this where you are finding that the most significant bit is 0 here out of 32 bits 1 bit is used to identify the class here in case of class A. In other words you will get 31 bits to have the address real address. So, what will happen is 2 raise to 31 because 1 bit is used for identifying the class. So, 2 raise to 31 it comes around 2 billion those many addresses are possible with class A. In class B what has happened is 2 bits you are taken to identify the class. So, what remains out of 32 2 are used for identifying the class. So, remains is 30. So, 2 raise to 30. So, around 1 billion like that. So, if you look at you will find that out of total IP addresses possible which we have seen 2 raise to 32 around 4 billion. 50 percent of addresses will be taken by class A, 25 percent will be taken by class B and remaining will be 12.5 and 6.25 6.25 each for class D and class E. This representation is called as classful representation. If you have binary equivalent of the IP address you can use these most significant bits to identify which is the class of the which is the class of the given IP address. Now not necessarily every time you will be having that binary representation. So, as we know that in class A most significant bit is identifying the class A if it is 0 then it is class A then what remains in the first byte will be 7 bits and the 7 bits can take values from 0 to 127. Those 7 bits of the first byte can take values from 0 to 127. So, now it is very easy now. So, if you have decimal form representation of IP address. So, if first byte is taking the range between 0 to 127. So, that belongs to class A like that this is the range for class B, class C, class D and class E. So, just concentrate on the first byte decimal equivalent and you will be able to identify what is the class for that particular IP address. So, here there are few IP addresses and given and easily you will be able to identify the class. Let us take one example C where the range is 192 where the IP address given is in the example C IP address is given is 14.23.120.8 14 where it fits 14 fits in this particular range. So, this belongs to a class A IP address. So, this is how easily you will be able to classify the given IP address in any one of these classes. One more important aspect related to the IP address is IP address has a two level hierarchy means in given IP address the IP address is divided into two parts. One part of the IP address will be representing the network ID part and hence remaining part will be representing ID called as host ID. See here the concept is when you are transmitting the packet over the subnet. In the subnet you will be having different routers and some network ISP network infrastructure will be there. Now that router will just consider the network ID part of the IP address and will try to make sure that the packet will reach to the destination network and once it reach to the destination network then at the destination side it will look for host ID part and destination network will try to make sure that it will reach to the desired destination in or desired host in the given network. See the concept is if you belong to a network. So, you will have a network ID and in that network you are a host. So, you will have host ID within that network. So, this is how you can have separation of IP address in two parts. So, in case of as you are talking about classful addressing in case of classful addressing how much part will be the network ID how much part will be the host ID those things are predefined. So, this is what is the division of the network ID part and host ID part if it is class A network ID will be the first byte and remaining bytes will be representing the host ID part. So, like that class B and class C. So, this is how you can have a separator within the IP address which is separating the IP address in between two parts network ID part and host ID part. So, these are the references used for this presentation. For more concepts related to the IP addressing go for the IP addressing session two also. So, these are the references used.