CCIE 400-101: Network Principles - IPv4 and IPv6 Fragmentation, TTL, IP MTU
IPv4 and IPv6 fragmentation
- Although the maximum length of an IP datagram is 64K, most transmission links enforce a smaller maximum packet length limit, called an MTU (maximum transmission unit).
- The design of IP accommodates MTU differences by allowing routers to fragment IP datagrams as necessary.
- IP fragmentation involves breaking a datagram into a number of pieces that can be reassembled later.
- Fragmentation causes more overhead for the receiver when reassembling the fragments because the receiver must allocate memory for the arriving fragments and coalesce them back into one datagram after all of the fragments are received.
- Reassembly is very inefficient on a router whose primary job is to forward packets as quickly as possible.
- Another fragmentation issue involves handling dropped fragments. If one fragment of an IP datagram is dropped, then the entire original IP datagram must be resent, and it will also be fragmented.
- Example: The original IP packet is 12,000 bytes. To transmit this data over the first local link, Device A splits it into four fragments. The first router must fragment them further into smaller packets to send them over the 1,300-byte MTU link. Note that the packets are reassembled only at the final destination.

- Unlike in IPv4, IPv6 routers never fragment IPv6 packets.
- Packets exceeding the MTU are dropped and this condition is signaled by a "Packet Too Big" ICMPv6 message (similar to the IPv4 method when the DF bit is set).
- IPv6 hosts are expected to perform path MTU discovery to
determine the maximum size of packets to send, and the upper-layer
protocol is expected to limit the payload size.
TTL
- TTL, which stands for Time To Live, is an 8-bit field in the IP header.
- TTL determines the lifetime of an IP packet.
- The purpose of TTL is to prevent a data packet from circulating in the network indefinitely.
- The initial TTL value is set by the sender, and is reduced by every router on the route to the packet's destination. Hence, the TTL can also be considered as a hop count.
- Because of the 8-bit field size, TTL can support a maximum of 255 hops.
- If the TTL reaches 0 before the packet reaches its final destination, the packet is discarded and an ICMP error message is sent back to the sender.
- Different operating systems can use different default TTL values. For example, most Windows systems use a default TTL of 128.
IP MTU
- Maximum Transmission Unit (MTU) is the size of the largest packet that the device can forward.
- If the packet is bigger than the MTU, the packet will be fragmented (unless the DF bit is set, in which case the packet is dropped). If a packet is fragmented, it is reassembled at its final destination.
- There are basically two MTU values: system or interface MTU and IP MTU.
- The interface MTU specifies the maximum size of the datagram that the interface can send (including the Layer 2 header).
- IP MTU defines the maximum size of the IP packet.

- The value of the MTU depends on the type of the transmission link. For example, the default MTU for Ethernet is 1500 bytes. In a normal transmission case (no additional encapsulation, such as GRE or IPsec),
the sender may use the maximum payload length of 1460 bytes (1500 bytes - 20-byte IP header - 20-byte TCP header = 1460 bytes)
without any potential risk of packet fragmentation/drop.
- Sometimes the IP MTU must be lowered from its default value to support extra headers like GRE or IPsec.
- A larger MTU brings certain benefits like processing of fewer packets for the same amount of user data.
- Example: NFS, by default, has a read and write block size of 8192, so a NFS IP/UDP datagram will be approximately 8500 bytes (including NFS, UDP, and IP headers). A sending station connected to an Ethernet (MTU 1500) will have to fragment the 8500 byte datagram into six pieces; five 1500 byte fragments and one 1100 byte fragment. If any of the six fragments is dropped, the complete original datagram will have to be retransmitted. This creates more overhead and requires more processing resources from the router, as compared to sending one big packet of 8500 bytes (MTU 9000).
- On the contrary, larger packets can occupy the link for too long, thereby increasing delay.
References
The TCP/IP Guide: IP Datagram Size, MTU, and Fragmentation Overview
No comments:
Post a Comment