路径MTU
数据在以太网中的传输有长度有一个限制,其最大值一般情况下是1500字节。链路层的这个特性叫作MTU,也就是最大传输单元。不同类型的网络会有所不同的。如果IP层有一个数据报要传输,而且数据的长度比链路层的MTU还要大的话,那么IP层就需要进行分片。把数据分成更小的片,这样每一个小的片就小于了MTU,也就可以在以太网中传输。
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),[1] 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.[2]
For IPv4 packets, Path MTU Discovery works by setting the Don't Fragment (DF) option 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.
IPv6 routers do not support fragmentation or the Don't Fragment option. For IPv6, Path MTU Discovery works by initially assuming the path MTU is the same as the MTU on the link layer interface through which the traffic is being sent. 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.[3]
If the Path MTU changes after the connection is set up and is 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. Conversely, if PMTUD finds that the path allows a larger MTU than is possible on the lower link, the OS will periodically reprobe to see if the path has changed and now allows larger packets. On both Linux and Windows this timer is set by default to ten minutes.[4][5]
Contents |
Problems with PMTUD
Many network security devices block all ICMP messages for perceived security benefits,[6] 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 is transferred. This state is referred to as a black hole connection.[7]
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.[8]
A workaround used by some routers is to change the maximum segment size (MSS) of all TCP connections passing through links with MTU lower than the Ethernet default of 1500. This is known as MSS clamping.[9]
See also
References
- ^ RFC 1191, Path MTU Discovery, J. Mogul, S. Deering (November 1990)
- ^ RFC 1981, Path MTU Discovery for IP version 6, J. McCann, S. Deering, J. Mogul (August 1996)
- ^ Davies, Joseph (2012). Understanding IPv6 (3rd ed.). Microsoft Press. pp. 146–147. ISBN 9780735659148.
- ^ linux source code see line with "mtu_expires" 10 * 60 seconds
- ^ Davies, Joseph (2012). Understanding IPv6 (3rd ed.). Microsoft Press. p. 147. ISBN 9780735659148.
- ^ Michael Mullins (2003-10-21). "Prevent hacker probing by blocking ICMP traffic". Retrieved 2013-07-12.
- ^ RFC 2923, TCP Problems with Path MTU Discovery, K. Lahey (September 2000)
- ^ RFC 4821, Packetization Layer Path MTU Discovery, M. Mathis, J. Heffner (March 2007)
- ^ "Circumventing Path MTU Discovery issues with MSS Clamping".
External links
路径MTU的更多相关文章
- 最小重组缓冲区和路径MTU发现
概括: 主要来源于unp,可参考:http://blog.csdn.net/ysu108/article/details/7764461 疑惑: 1. 最小重组缓冲区大小: ipv4为576,ipv6 ...
- MTU的概念,什么是路径MTU? MTU发现机制,TraceRoute(了解)
1.MTU的概念 MTU即Maximum Transmission Unit 最大传输单元.它是指一种通信协议的某一层上面所能通过的最大数据包大小(以字节为单位). 2.路径MTU ...
- TCP/IP学习笔记15--IP分割处理与再构成处理,路径MTU发现
家庭应该是爱.欢乐和笑的殿堂.--日 木村久一 IP属于网络层,下一层时数据链路层,在数据链路层,不同类型的数据链路的最大传输单元(MTU)都不尽相同.例如,连接两个路由器 ...
- TCP路径MTU发现
路径MTU 当在同一个网络上的两台主机互相通信时,该网络的MTU是非常重要的.当时如果两台主机之间的通信要通过多个网络,那么每个网络的链路层就可能有不同的MTU.重要的不是两台主机所在网络的MTU,而 ...
- MTU(Maximum transmission unit) 最大传输单元
最大传输单元(Maximum transmission unit),以太网MTU为1500. 不同网络MTU如下: 如果最大报文数据大小(MSS)超过MTU,则会引起分片操作. 路径MTU: 网路 ...
- Neutron VxLAN + Linux Bridge 环境中的网络 MTU
1. 基础知识 1.1 MTU 一个网络接口的 MTU 是它一次所能传输的最大数据块的大小.任何超过MTU的数据块都会在传输前分成小的传输单元.MTU 有两个测量层次:网络层和链路层.比如,网络层 ...
- 链路层的简介和MTU
链路层杂谈(凭个人理解瞎说的,欢迎拍砖) 链路层,说白了就是把网络层的IP数据处理一下,加点东西,放到物理层上去. 加的东西:源.目的地址和CRC校验值,有的还有类型这个字段,用来区分协议. ...
- mtu
通信术语 最大传输单元(Maximum Transmission Unit,MTU)是指一种通信协议的某一层上面所能通过的最大数据包大小(以字节为单位).最大传输单元这个参数通常与通信接口有关(网络接 ...
- MTU of IPV4 and IPV6
通信术语 最大传输单元(Maximum Transmission Unit,MTU)是指一种通信协议的某一层上面所能通过的最大数据包大小(以字节为单位).最大传输单元这个参数通常与通信接口有关(网络接 ...
随机推荐
- NIS 服务器
有没有想过,如果我有十部 Linux 主机,这十部主机仅负责不同的功能,事实上, 所有的主机账号与对应的密码都相同!那么我是将账号与密码分别设定置在十部计算机上面, 还是可以透过一部主机做为账号管理的 ...
- webstore+nodejs
新建一个普通的project. 编写如下代码: var http=require('http'); http.createServer(function(req,res){ res.writeHead ...
- EJB理解
1. 我们不禁要问,什么是"服务集群"?什么是"企业级开发"? 既然说了EJB 是为了"服务集群"和"企业级开发",那么 ...
- Visual Studio Solution Configuration
https://msdn.microsoft.com/en-us/library/bb166577.aspx Solution configurations store solution-level ...
- 获取Mac、CPUID、硬盘序列号、本地IP地址、外网IP地址OCX控件
提供获取Mac.CPUID.硬盘序列号.本地IP地址.外网IP地址OCX控件 开发语言:vc++ 可应用与WEB程序开发应用 <HTML><HEAD><TITLE> ...
- ☀【JS】Code
1 <!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="utf- ...
- FZU2232 炉石传说 最大匹配
思路:正好是二分图,自己敌人,符合条件的随从二人组建边,最大匹配为n是符合要求 #include <cstdio> #include <cstring> #include &l ...
- [Tommas] 如何创建自动化功能测试的基本原则
每个实行持续交付的项目,都有生产流水线的元素,如持续集成和自动化测试.这些测试是在不同层面进行的,从单元测试到冒烟测试再到功能测试.自动化功能测试的优点之一是可重复性和可预测的执行时间.出于这个原因, ...
- xp系统下网络打印机怎么设置
亲测,可行 打印机共享可以有效节约办公资源,提高办公效率.可是还有很多朋友不知道怎么设置,我们这里讲一下网络打印机的设置方法. 1.我们点开桌面左下角的开始菜单,选择“打印机和传真” 2.我们右击某个 ...
- cmder使用手册
http://bliker.github.io/cmder/ 使其可以在Win+R中运行 将解压出的路径 放入系统变量 path中 如 :D:\software\cmder 解决中文错位 选个喜欢的字 ...