IP fragmentation
   HOME

TheInfoList



OR:

400px, An example of the fragmentation of a protocol data unit in a given layer into smaller fragments. IP fragmentation is an
Internet Protocol The Internet Protocol (IP) is the network layer communications protocol in the Internet protocol suite for relaying datagrams across network boundaries. Its routing function enables internetworking, and essentially establishes the Internet. ...
(IP) process that breaks packets into smaller pieces (fragments), so that the resulting pieces can pass through a link with a smaller
maximum transmission unit In computer networking, the maximum transmission unit (MTU) is the size of the largest protocol data unit (PDU) that can be communicated in a single network layer transaction. The MTU relates to, but is not identical to the maximum frame size tha ...
(MTU) than the original packet size. The fragments are reassembled by the receiving host. The details of the fragmentation mechanism, as well as the overall architectural approach to fragmentation, are different between IPv4 and
IPv6 Internet Protocol version 6 (IPv6) is the most recent version of the Internet Protocol (IP), the communications protocol that provides an identification and location system for computers on networks and routes traffic across the Internet. IPv ...
.


Process

describes the procedure for IP fragmentation, and transmission and reassembly of IP packets. RFC 815 describes a simplified reassembly algorithm. The ''Identification'' field along with the ''foreign'' and ''local internet address'' and the ''protocol ID'', and ''Fragment'' offset field along with ''Don't Fragment'' and ''More Fragments'' flags in the
IP header An IP header is header information at the beginning of an Internet Protocol (IP) packet. An IP packet is the smallest message entity exchanged via the Internet Protocol across an IP network. IP packets consist of a header for addressing and routi ...
are used for fragmentation and reassembly of IP packets. If a receiving host receives a fragmented IP packet, it has to reassemble the packet and pass it to the higher protocol layer. Reassembly is intended to happen in the receiving host but in practice it may be done by an intermediate router, for example, network address translation (NAT) ''may'' need to reassemble fragments in order to translate data streams.


IPv4 and IPv6 differences

Under IPv4, a router that receives a
network packet In telecommunications and computer networking, a network packet is a formatted unit of data carried by a packet-switched network. A packet consists of control information and user data; the latter is also known as the ''payload''. Control inform ...
larger than the next hop's MTU has two options: drop the packet if the ''Don't Fragment'' (DF) flag bit is set in the packet's header and send an Internet Control Message Protocol (ICMP) message which indicates the condition ''Fragmentation Needed'' (Type 3, Code 4), or fragment the packet and send it over the link with a smaller MTU. Although originators may produce fragmented packets, IPv6 routers do not have the option to fragment further. Instead, network equipment is required to deliver any IPv6 packets or packet fragments smaller than or equal to 1280 bytes and IPv6 hosts are required to determine the optimal MTU through
Path MTU Discovery Path MTU Discovery (PMTUD) is a standardized technique in computer networking for determining the maximum transmission unit (MTU) size on the network path between two Internet Protocol (IP) hosts, usually with the goal of avoiding IP fragmentat ...
before sending packets. Though the header formats are different for IPv4 and IPv6, analogous fields are used for fragmentation, so the same algorithm can be reused for IPv4 and IPv6 fragmentation and reassembly. In IPv4, hosts must make a best-effort attempt to reassemble fragmented IP packets with a total reassembled size of up to 576 bytes. They may also attempt to reassemble fragmented IP packets larger than 576 bytes, but they are also permitted to silently discard such larger packets. Applications are recommended to refrain from sending packets larger than 576 bytes unless they have prior knowledge that the remote host is capable of accepting or reassembling them. In IPv6, hosts must make a best-effort attempt to reassemble fragmented packets with a total reassembled size of up to 1500 bytes, larger than IPv6's minimum MTU of 1280 bytes. Fragmented packets with a total reassembled size larger than 1500 bytes may optionally be silently discarded. Applications relying upon IPv6 fragmentation to overcome a path MTU limitation must explicitly fragment the packet at the point of origin; however, they should not attempt to send fragmented packets with a total size larger than 1500 bytes unless they know in advance that the remote host is capable of reassembly.


Impact on network forwarding

When a network has multiple parallel paths, technologies like LAG and CEF split traffic across the paths according to a
hash algorithm A hash function is any function that can be used to map data of arbitrary size to fixed-size values. The values returned by a hash function are called ''hash values'', ''hash codes'', ''digests'', or simply ''hashes''. The values are usually ...
. One goal of the algorithm is to ensure all packets of the same flow are sent out the same path to minimize unnecessary packet reordering. IP fragmentation can cause excessive retransmissions when fragments encounter
packet loss Packet loss occurs when one or more packets of data travelling across a computer network fail to reach their destination. Packet loss is either caused by errors in data transmission, typically across wireless networks, or network congestion.Kur ...
and reliable protocols such as TCP must retransmit all of the fragments in order to recover from the loss of a single fragment. Thus, senders typically use two approaches to decide the size of IP packets to send over the network. The first is for the sending host to send an IP packet of size equal to the MTU of the first hop of the source-destination pair. The second is to run the Path MTU Discovery algorithm to determine the path MTU between two IP hosts so that IP fragmentation can be avoided. , IP fragmentation is considered fragile and often undesired due to its security impact.


See also

* * * IP fragmentation attack *
Protocol data unit In telecommunications, a protocol data unit (PDU) is a single unit of information transmitted among peer entities of a computer network. It is composed of protocol-specific control information and user data. In the layered architectures of c ...
and Service data unit


References


External links


What is packet fragmentation?

The Never-Ending Story of IP Fragmentation
{{DEFAULTSORT:Ip Fragmentation Internet Protocol