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 fragmentation. PMTUD was originally intended for routers in Internet Protocol Version 4 (IPv4).REFERENCE FOR RFC1191 IS NOT DEFINED YET. You are invited to add it here. However, all modern operating systems use it on endpoints. In IPv6, this function has been explicitly delegated to the end points of a communications session.REFERENCE FOR RFC8201 IS NOT DEFINED YET. You are invited to add it here. As an extension to the standard path MTU discovery, a technique called Packetization Layer Path MTU Discovery works without support from ICMP.REFERENCE FOR RFC8899 IS NOT DEFINED YET. You are invited to add it here.
Implementation
For IPv4 packets, Path MTU Discovery works by setting the Don't Fragment (DF) flag bit in the IP headers of outgoing packets. Then, any device along the path whose MTU is smaller than the packet will drop it, and send back an Internet Control Message Protocol (ICMP) Fragmentation Needed (Type 3, Code 4) message containing its MTU, allowing the source host to reduce its path MTU appropriately. The process is repeated until the MTU is small enough to traverse the entire path without fragmentation.
As IPv6 routers do not fragment packets, there is no Don't Fragment option in the IPv6 header. For IPv6, Path MTU Discovery works by initially assuming the path MTU is the same as the MTU on the link layer interface where the traffic originates. Then, similar to IPv4, any device along the path whose MTU is smaller than the packet will drop the packet and send back an ICMPv6 Packet Too Big (Type 2) message containing its MTU, allowing the source host to reduce its path MTU appropriately. The process is repeated until the MTU is small enough to traverse the entire path without fragmentation.[1]
If the path MTU changes after the connection is set up and becomes lower than the previously determined path MTU, the first large packet will cause an ICMP error and the new, lower path MTU will be found. If the path changes and the new path MTU is larger, the source will not learn about the increase, because all routers along the new path will be capable of relaying all packets that the source sends using the originally determined, lower path MTU.[2][3][1]
Problems
Many network security devices block all ICMP messages for perceived security benefits, including the errors that are necessary for the proper operation of PMTUD. This can result in connections that complete the TCP three-way handshake correctly, but then hang when data are transferred. This state is referred to as a black hole connection.REFERENCE FOR RFC2923 IS NOT DEFINED YET. You are invited to add it here.
Some implementations of PMTUD attempt to prevent this problem by inferring that large payload packets have been dropped due to MTU rather than because of link congestion. However, in order for the Transmission Control Protocol (TCP) to operate most efficiently, ICMP Unreachable messages (type 3) should be permitted. A robust method for PMTUD that relies on TCP or another protocol to probe the path with progressively larger packets has been standardized in RFC 4821.
A workaround used by some routers[which?] is to change the maximum segment size (MSS) of all TCP connections passing through links that have MTU lower than the Ethernet default of 1500. This is known as MSS clamping.[4][needs update?]
References
- ↑ 1.0 1.1 Davies, Joseph (2012). Understanding IPv6 (3rd ed.). Redmond: Microsoft Press. pp. 146–147. ISBN 978-0735659148. OCLC 810455372.
- ↑ E. Comer, Douglas (2014). Internetworking with TCP/IP Volume 1 (6th ed.). Pearson. pp. 133–134. ISBN 0-13-608530-X.
- ↑ linux source code (ipv4) and linux source code (ipv6) see line with "mtu_expires" 10 * 60 seconds
- ↑ Hubert, Bert (2002). "Circumventing Path MTU Discovery issues with MSS Clamping (for ADSL, cable, PPPoE & PPtP users)". https://lartc.org/howto/lartc.cookbook.mtu-mss.html.
Original source: https://en.wikipedia.org/wiki/Path MTU Discovery.
Read more |