 Welcome to lecture on internet protocol version 4. At the end of this lecture, students will be able to explain the format of IPv4 datagram that is internet protocol datagram and also describe fragmentation and reassembly of datagrams. Now before start with the actual session, let's recall where IP is positioned in the TCP IP protocol should. If you remember, it is present in the network layer. Also there are some other protocol is present that is IGMP, ICMP and ARP. Now what is datagram? Datagram is nothing but a packet which is handled by internet layer or network layer. It is having a variable length. Why variable length? Because the header length is of not fixed, which is either 20 or 60 bytes. That's why it is called variable length packet. This datagram includes header and data. The header is of 20 to 60 bytes in length which contains information which is essential for routing and delivery of the packets. Now internet protocol is a major protocol in the TCP IP protocol should. Why it is called major? Because it has more responsibility as compared to the other protocols. It works at a network layer in OSI layer model and at internet layer in TCP IP model. The responsibility are nothing but the identification of course based on their logical address and route data among them host over the network. It provides mechanism for identification of host by using an IP addressing scheme which contains class A, class B, class C, class D. There are another version of IP present currently that is IPv6. Now this is a header format which is of 20 to 60 bytes and data which is nothing but 20 to 65,535 bytes. Now this header format shows how many fields present in the IP header. If you see that total 20 bytes are contained in version, header length, service type, total length, identification flags, fragmentation of set, time to live protocol, header checksum, source IP and destination IP. So this over total becomes 20 bytes and remaining options plus padding it is of either 0 byte or 40 bytes. Means it is 0 then the total length of IP header is 20 bytes. If it is having some data present in that maximum up to 40 bytes so that IP header becomes 60 bytes. Now let's see every field one by one. First field present in the IP header is nothing but the version field which is of 4 bits. It tells which version of protocol you are using in the internet. Next field is a header length which is of again 4 bits. It tells length of the entire IP header. Next one is a service type which is of 8 bits. It tells services code points which indicates type of service which is used by the protocol. Next one is a total length which is of 16 bits. It tells the length of entire IP packet including IP header and IP payload. Next one is identification which is nothing but the 16 bits. It is used to identify the all the fragments of original IP packets. What is mean by fragments that we will see later and IP packet is fragmented during the transmission. Next is nothing but the flags which is of 3 bits. It is used to identify the fragments means if the IP packet is too large then these flags tells if they can be fragmented or not. Next one is a fragmentation offset which is of 13 bits. It is used to indicate that exact position of fragment in the original IP packet. Next one is a time to live which is of 8 bits. It tells network that how many hopes the packet can route on the network. Next one is a protocol which is of 8 bits. It tells network layer at the destination host that to which protocol this packet belongs to. That is next level. Either it is ICMP, either it is TCP or it is UDP. Next one is a header checksum which is of 16 bits. It keeps the checksum value of the entire header. It is used to check if the received packet is error free or not at the receiver side. Source IP address of 32 bits. It is an address of the sender of the packet. And similarly destination IP address is of 32 bits. It is the address of the receiver of the packet. And the last field is option field. It may contains values for options such as security, record route, timestamp, etc. Now let's see what is mean by fragmentation. Datagram travels through different networks means it has to travel from one hope to other hope, different networks. And each network has its own maximum transfer unit that is MTU. If MTU is smaller than the received packet size, then the fragmentation is done means the entire packet is divided into small number of packets. Every router does the decapsulation of the IP datagram from the frame it receives, process it and then again encapsulate into the another frame. The format and size of the received and send frame depends on the protocol used by the physical network through which frame has received or frame is going to travel respectively. Now let's see one example how the fragmentation is done. If you see this is one IP datagram, original datagram, which is having identification field which is 14567 and total length which is of 4020. If you see there is one flag bit is one which is used to tell that there are more fragmentation is possible of this original datagram. So offset free is currently 00. Now this original datagram is fragmented into three fragments that is fragment 1, fragment 2, fragment 3. If you see the identification number is going to be remain same for all these three fragmentation and total length is for first fragment it is 1420, for second it is also 1420, the last one is 1220 and if you see the offsets for first fragment it is 000, for second it is 175 and third is 350. Now if you note the flag bits again there are flag bits are one means more fragmentation is also possible. Like this second fragment is again fragmented, so it becomes fragment 2.1, fragment 2.2. For all the fragments if you see the identification number is going to be remain same because at the receiver side this number is used to identify how many fragments are belong to the receiver side. Now let's see what is reassembly. There is nothing but the reconstruction of original datagram from the multiple fragments which is received at the receiver side. It is done at the end node of the or destination only, why it is done at the end node of the destination only because at the every node if you do the fragmentation and defragmentation the large packets or time required for this. So it is not possible in the network to perform all this at every net. So which reduce unnecessary work where large packets are fragmented multiple times if reassembly is done at every node. It needs buffer for reassembly so at the receiver side buffer is present and if the any fragments is not arrived at the receiver side all the fragments received for that particular identification number is discarded or fragments may arrive in any order. These are the references. Thank you.