The Internet Protocol version 4 (IPv4) is one of the foundational protocols in computer networking, serving as the principal communication method in the Internet and many private networks. Despite being a robust and well-established protocol, IPv4 has several inherent limitations, including the need...
The Internet Protocol version 4 (IPv4) is one of the foundational protocols in computer networking, serving as the principal communication method in the Internet and many private networks. Despite being a robust and well-established protocol, IPv4 has several inherent limitations, including the need for fragmentation. This document explores IPv4, its structure, functionality, addressing mechanisms, and, most importantly, the concept of fragmentation, its necessity, challenges, and solutions.IPv4 is a connectionless protocol that provides unique addressing to devices on a network, enabling them to communicate. It operates at the Network Layer (Layer 3) of the OSI model and relies on packet switching for efficient data transmission.IPv4 addresses are 32-bit numerical values represented in dotted decimal format (e.g., 192.168.1.1). The address space is divided into five classes (A, B, C, D, E), with Class A, B, and C being commonly used for unicast communication. Fragmentation in IPv4 occurs when a packet exceeds the Maximum Transmission Unit (MTU) of a network link and needs to be divided into smaller fragments for successful transmission. Fragmentation introduces additional processing overhead at both routers (during fragmentation) and endpoints (during reassembly), leading to increased latency. If even a single fragment is lost, the entire packet cannot be reassembled, leading to retransmissions and reduced network efficiency. IPv4 fragmentation is a necessary but challenging aspect of networking that ensures compatibility across diverse network infrastructures. While it enables data transmission across different MTUs, it also introduces latency, security risks, and inefficiencies. Modern solutions such as Path MTU Discovery and the adoption of IPv6 mitigate fragmentation-related issues, improving overall network performance and security. Understanding IPv4 fragmentation is crucial for network engineers, administrators, and security professionals to design efficient and secure communication networks. IPv4 fragmentation is a mechanism designed to allow the transmission of large packets over networks with varying Maximum Transmission Units (MTUs). Since different network infrastructures may impose different MTU limits, IPv4 fragmentation ensures that data can traverse the network seamlessly. However, fragmentation introduces challenges such as latency, inefficiencies, and security vulnerabilities. Modern networking solutions, including Path MTU Discovery (PMTUD) and IPv6, address these challenges to enhance overall network performance and security. Data transmission across a network involves dividing large data into packets to fit the constraints of the underlying network infrastructure. IPv4 fragmentation was designed to facilitate communication across networks with varying MTUs, ensuring data transmission even when MTU sizes differ. However, it introduces significant challenges related to performance, security, and network efficiency.
Size: 1.9 MB
Language: en
Added: Feb 09, 2025
Slides: 32 pages
Slide Content
Computer Networks IPV4 and Fragmentation Mrs. VALARMATHI K Assistant Professor Information Technology Department S.A.Engineering College
Introduction – IPV4 IP (version 4) addresses are 32-bit integers that can be expressed in hexadecimal notation. The more common format, known as dotted quad or dotted decimal, is x.x.x.x , where each x can be any value between 0 and 255. For example, 192.0.2.146 is a valid IPv4 address. This protocol works at the network layer of the OSI model and at the Internet layer of the TCP/IP model. Thus this protocol has the responsibility of identifying hosts based upon their logical addresses and to route data among them over the underlying network . Internet Protocol version 4 uses 32-bit logical address.
IPV4 Frame work IPV4 that work in network layer, output of network layer is packet and that packet is given to data link layer, DLL will form frame.
Basic idea Basics of IPV4 Frame Internet Protocol takes data Segments from Transport layer and divides it into packets. IP packet encapsulates data unit received from above layer and add to its own header information . IPV4 has 20 Bytes of mandatory fields in its header. IPV4 header size can be of 20Bytes to 60 Bytes. In Computer networks, basically two types of IP addressing is available IPV4 IPV6
Version Version field has 4four bits It defines a version of the given packet received by the router IPV4-0100 IPV6-0110 IHL-Internet Header Length Length of entire IP header. Header Length =IHL x 4 Minimum IHL=5 and Maximum IHL=15 Example If IHL=12, then header length 12*4=48
Types of Services DSCP – Differentiated Services Code Point It defines the type of services for a given packet. Default = 000000 For some services, priorities should be given to a packet in routing Example VoIp & Video Chat. ECN – Explicit Congestion Notification It is often combined with DSCP = Types of Services. It carries information about the congestion seen in the route. In Practice, it is used for congestion notification .
Total Length It is of 2 Bytes (16 bits) It defines the total size of the packet (Header +Data) Maximum size of packet = – 1 = 64KB -1B Minimum size of packet = 20B Source and Destination IP Address It is of 4bytes . 32-bit address of the Sender (or source) of the packet and 32-bit address of the Receiver (or destination) of the packet. It gives an idea about the IP Address of the Source and Destination Options (Typically used by ISPs and Network Managers) It can have maximum 40 Bytes. It is not used by users.
Time to Live It is of 1 Bytes (8 bits).It is a Hop Counter. It is used to avoid an Infinite loop of frame in a network . It tells the network how many routers (hops) this packet can cross. It is Changed by the routers, and the router will decrement it by 1. If it becomes 0 then the given hop will drop the frame.
Protocol It is of 1 Byte (8 bits ). It tells the Network layer at the destination host, to which Protocol this packet belongs to, i.e. the next level Protocol. For example protocol number of ICMP is 1, TCP is 6 and UDP is 17 Priority : TCP,UDP,IGMP,ICMP Header Checksum It is of 2 Bytes (16 Bits). It Checksum of the header(not entire Frame ) This field is used to keep checksum value of entire header which is then used to check if the packet is received error-free. At Router TTL will change, also some other fields (ECN) may change. So the router will also recompute the header Checksum.
Identification ( 16 bits ) It explains the unique ID number of a given datagram. If IP packet is fragmented during the transmission, all the fragments contain same identification number. To identify original IP packet they belong to .
Flags(3 bits) As required by the network resources, if IP Packet is too large to handle, these ‘flags’ tells if they can be fragmented or not. In this 3-bit flag, the MSB is always set to ‘0’. 1 st bit=0 2 nd bit = DF(Do not fragment Flag) = If it is 1 then fragmentation is not allowed 3 rd bit = MF (More fragment to follow) = If it is 1 then more fragments to follow Fragment Offset (13 bits) This offset tells the exact position of the fragment in the original IP Packet.
Fragmentation in Network layer Basics of Fragmentation It explains the bisection of the datagram during the forwarding of a frame on networks. At the network layer with an IPV4 frame, the Maximum size of the frame is 64KB-1B. At the data link layer, we have different LAN protocols like Ethernet LAN, Wi-Fi LAN, and Token ring LAN. With different LAN protocols size of the frame is different. With Ethernet LAN MTU(Maximum Transmission Unit) is 1500B. With Wi-Fi LAN MTU(Maximum Transmission Unit) is 2312B. With Token ring LAN MTU(Maximum Transmission Unit) is 4500B.
Original packet Fragmented Packets
Question 1: In an IPV4 packet the value of HLEN is . How many Bytes of options are being carried by this packet? A. 40 Byte B. 60 Byte C. 12 Byte D. 28 Byte Answer: Option D
Explanation : HLEN is Convert this binary into Decimal(8+4+0+0) HLEN=12 Header length field value is 12 to find the header size multiply by 4 i.e 12 *4=48 Bytes We already know that in option field 20 Bytes is fixed for header so remaining are the data in packet 48-20 =28 Bytes
Question 2: In an IPV4 packet, the value of HLEN is 5, and the value of total length is . How many Bytes of the data are being carried by this packet _____. 72 52 64 89 Answer: Option B
Explanation: Header length HLEN value is given 5 , HLEN=5 Header size = 5 *4=20 Bytes Total length field is given in Hexadecimal To find total length Convert this Hexadecimal into Decimal 4* +8* => 4*16+8*1=72 We know that Total L ength =Data +Header , from this we can find data TL = Data +Header Data = TL-Header Data = 72-20= 52
Question 3: An IPV4 packet has arrived with the first few Hexa decimal digits as shown below How many Hops can this packet take before being dropped? 30 59 89 90 Answer: Option C
Explanation: 59 06 Given : Version = 4 IHL =5 Service = 00 Total Length = 005C ID = 003 Flags and Fragment Offset = 0000 TTL = 59
How many Hops depends on TTL value One number is 4 bits, (4*8=32) each row contain 32 bits Where 3 rd row first 8 bits represent TTL, we have to cross 8 number to complete one row , 1 st row 32bit 4500005C, 2 nd row 32 bits 00030000, next 3 rd row first 8 bit is TTL =59 , which is given in hexadecimal format convert this into decimal =5* + 9 * = 80 + 9 = 89
Question 4: An IPV4 packet has the first few Hexadecimal digits as shown below The above packet is belong to which protocol TCP UDP ICMP IGMP Answer: Option B
Explanation: After TTL next 8 bit is protocol 11 it is given in hexa decimal convert to decimal Protocol = = 1* + 1 * =16 + 1 =17 E very protocol is assigned with a number ICMP = 01 IGMP = 02 TCP = 06 UDP = 17 OSPF = 89
Question 5: Which can be possible header size (in bytes) in IPV4 datagram? 20 30 50 60 I only I and IV IV only I,II,III and IV Answer: Option B Header size can be in between 20 and 60 B(But always divisible by 4)
Question 6: An IPV4 packet has the first few Hexa decimal digits as shown below What is data size of IPV4 packet_____________ . 7 2 Bytes 9 2 Bytes 82 Bytes 59 Bytes Answer: Option A
Explanation: Given: Version = 4 IHL =5 Types of Service = 00 Total Length = 005C W.K.T , Header size = IHL* 4 = 5*4 =20 Total Length= =5 * + 12 * = 80 + 12 = 92 TL = Data + Header Data = TL - H = 92 -20 = 72
Question 7: In an IPV4 datagram, M bit is one. Then the fragment is _______ . First fragment Last fragment Middle Fragment Both A and C Answer : Option D M=0 means last fragment ( can’t be fragment ) M=1 means fragmentation need to follow (first or Middle)
Question 8: Which one of the following fields of an IP header is NOT modified by a typical IP router? Checksum Source Address Time to Live (TTL) Length Answer : Option B Source Address (cannot be modify by IP Router)
Question 9: The maximum number of IPV4 router address addresses that can be listed in the record route(RR) option field of an IPV4 header is_____ 9 10 15 6 Answer : Option A Option field (Max) = 40 B =38 B + 2 B(Reserved) One IP= 32 bits = 4 Bytes So, By 38 Bytes at maximum 9 IP’s can be stored
Question 10: An IP datagram of size 1000 bytes arrives at a router. The router has to forward this packet on a link whose MTU (Maximum Transmission Unit) is 100 bytes. Assume that the size of the IP header is 20 Bytes. The number of fragments that the IP datagram will be divided into for transmission is_________. 13 15 80 12 Answer: Option A
Explanation : IP packet = 1000 B = 20 B + 980 B MTU =100 B = 20 B + 80 B number of fragments = 980/80 =12.25 ~=13