通用媒体的 MTU

注:机翻,未校对。


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 that can be transported on the data link layer, e.g., Ethernet frame.

在计算机网络中,最大传输单元 (MTU) 是可以在单个网络层事务中通信的最大协议数据单元 (PDU) 的大小。 MTU 与数据链路层(例如以太网帧)上可传输的最大帧大小相关,但并不相同。

Larger MTU is associated with reduced overhead. Smaller MTU values can reduce network delay. In many cases, MTU is dependent on underlying network capabilities and must be adjusted manually or automatically so as to not exceed these capabilities. MTU parameters may appear in association with a communications interface or standard. Some systems may decide MTU at connect time, e.g. using Path MTU Discovery.

MTU 越大,开销越低。较小的 MTU 值可以减少网络延迟。在许多情况下,MTU 依赖于底层网络功能,必须手动或自动调整,以免超出这些功能。MTU 参数可能与通信接口或标准相关联。某些系统可能会在连接时决定 MTU,例如使用路径 MTU 发现。

Applicability 适用性

MTUs apply to communications protocols and network layers. The MTU is specified in terms of bytes or octets of the largest PDU that the layer can pass onwards. MTU parameters usually appear in association with a communications interface (NIC, serial port, etc.). Standards (Ethernet, for example) can fix the size of an MTU; or systems (such as point-to-point serial links) may decide MTU at connect time.
MTU 适用于通信协议和网络层。MTU 是根据层可以传递的最大 PDU 的字节或八位字节来指定的。MTU 参数通常与通信接口(NIC、串行端口等)相关联。标准(例如以太网)可以固定 MTU 的大小;或者系统(如点对点串行链路)可以在连接时决定 MTU。

Underlying data link and physical layers usually add overhead to the network layer data to be transported, so for a given maximum frame size of a medium, one needs to subtract the amount of overhead to calculate that medium’s MTU. For example, with Ethernet, the maximum frame size is 1518 bytes, 18 bytes of which are overhead (header and frame check sequence), resulting in an MTU of 1500 bytes.
底层数据链路和物理层通常会增加要传输的网络层数据的开销,因此对于给定的介质最大帧大小,需要减去开销量来计算该介质的 MTU。例如,对于以太网,最大帧大小为 1518 字节,其中 18 个字节是开销(标头和帧校验序列),因此 MTU 为 1500 字节。

Tradeoffs 权衡

A larger MTU brings greater efficiency because each network packet carries more user data while protocol overheads, such as headers or underlying per-packet delays, remain fixed; the resulting higher efficiency means an improvement in bulk protocol throughput. A larger MTU also requires processing of fewer packets for the same amount of data. In some systems, per-packet-processing can be a critical performance limitation.
更大的 MTU 会带来更高的效率,因为每个网络数据包都携带更多的用户数据,而协议开销(例如标头或每个数据包的基础延迟)保持不变;由此产生的更高效率意味着批量协议吞吐量的提高。对于相同的数据量,较大的 MTU 还需要处理更少的数据包。在某些系统中,每个数据包的处理可能是一个关键的性能限制。

However, this gain is not without a downside. Large packets occupy a link for more time than a smaller packet, causing greater delays to subsequent packets, and increasing network delay and delay variation. For example, a 1500-byte packet, the largest allowed by Ethernet at the network layer, ties up a 14.4k modem for about one second.
然而,这种收益并非没有缺点。大数据包占用链路的时间比小数据包占用的时间更长,导致后续数据包的延迟更大,并增加网络延迟和延迟变化。例如,一个 1500 字节的数据包(以太网在网络层允许的最大数据包)将 14.4k 调制解调器捆绑在一起大约一秒钟。

Large packets are also problematic in the presence of communications errors. If no forward error correction is used, corruption of a single bit in a packet requires that the entire packet be retransmitted, which can be costly. At a given bit error rate, larger packets are more susceptible to corruption. Their greater payload makes retransmissions of larger packets take longer. Despite the negative effects on retransmission duration, large packets can still have a net positive effect on end-to-end TCP performance.
在存在通信错误的情况下,大数据包也会有问题。如果不使用前向纠错,则数据包中单个位的损坏需要重新传输整个数据包,这可能会造成高昂的成本。在给定的误码率下,较大的数据包更容易损坏。它们更大的有效负载使得较大数据包的重新传输需要更长的时间。尽管对重传持续时间有负面影响,但大数据包仍会对端到端 TCP 性能产生净积极影响。

Internet protocol 互联网协议

The Internet protocol suite was designed to work over many different networking technologies, each of which may use packets of different sizes. While a host will know the MTU of its own interface and possibly that of its peers (from initial handshakes), it will not initially know the lowest MTU in a chain of links to other peers. Another potential problem is that higher-level protocols may create packets larger than even the local link supports.
Internet 协议套件旨在处理许多不同的网络技术,每种技术都可能使用不同大小的数据包。虽然主机会知道它自己的接口的 MTU,也可能知道它的对等接口的 MTU(从最初的握手开始),但它最初不会知道与其他对等体的链路链中的最低 MTU。另一个潜在的问题是,更高级别的协议可能会创建比本地链路支持的数据包更大的数据包。

IPv4 allows fragmentation which divides the datagram into pieces, each small enough to accommodate a specified MTU limitation. This fragmentation process takes place at the internet layer. The fragmented packets are marked so that the IP layer of the destination host knows it should reassemble the packets into the original datagram.
IPv4 允许分段,将数据报分成多个部分,每个部分都足够小以适应指定的 MTU 限制。这种碎片化过程发生在互联网层。对分段的数据包进行标记,以便目标主机的 IP 层知道它应该将数据包重新组合到原始数据报中。

All fragments of a packet must arrive for the packet to be considered received. If the network drops any fragment, the entire packet is lost.
数据包的所有片段必须到达,数据包才会被视为已接收。如果网络丢弃任何分段,则整个数据包将丢失。

When the number of packets that must be fragmented or the number of fragments is great, fragmentation can cause unreasonable or unnecessary overhead. For example, various tunneling situations may exceed the MTU by very little as they add just a header’s worth of data. The addition is small, but each packet now has to be sent in two fragments, the second of which carries very little payload. The same amount of payload is being moved, but every intermediate router has to forward twice as many packets.
当必须分段的数据包数或分段数很大时,分段可能会导致不合理或不必要的开销。例如,各种隧道情况可能比 MTU 多出很少,因为它们只增加了一个标头的数据。添加量很小,但每个数据包现在必须以两个片段的形式发送,其中第二个片段携带的有效载荷非常少。移动的有效负载数量相同,但每个中间路由器必须转发两倍的数据包。

The Internet Protocol requires that hosts must be able to process IP datagrams of at least 576 bytes (for IPv4) or 1280 bytes (for IPv6). However, this does not preclude link layers with an MTU smaller than this minimum MTU from conveying IP data. For example, according to IPv6’s specification, if a particular link layer cannot deliver an IP datagram of 1280 bytes in a single frame, then the link layer must provide its own fragmentation and reassembly mechanism, separate from the IP fragmentation mechanism, to ensure that a 1280-byte IP datagram can be delivered, intact, to the IP layer.
Internet 协议要求主机必须能够处理至少 576 字节(对于 IPv4)或 1280 字节(对于 IPv6)的 IP 数据报。但是,这并不妨碍 MTU 小于此最小 MTU 的链路层传输 IP 数据。例如,根据 IPv6 的规范,如果特定链路层无法在单个帧中传送 1280 字节的 IP 数据报,则链路层必须提供自己的分段和重组机制,与 IP 分段机制分开,以确保 1280 字节的 IP 数据报可以完好无损地传送到 IP 层。

MTUs for common media 通用媒体的 MTU

In the context of Internet Protocol, MTU refers to the maximum size of an IP packet that can be transmitted without fragmentation over a given medium. The size of an IP packet includes IP headers but excludes headers from the link layer. In the case of an Ethernet frame this adds a protocol overhead of 18 bytes, or 22 bytes with an IEEE 802.1Q tag for VLAN tagging or class of service.
在互联网协议的上下文中,MTU 是指可以在给定介质上传输而不会分段的 IP 数据包的最大大小。IP 数据包的大小包括 IP 报头,但不包括链路层中的报头。对于以太网帧,这会增加 18 字节的协议开销,或 22 字节的 IEEE 802.1Q 标记,用于 VLAN 标记或服务等级。

The MTU should not be confused with the minimum datagram size that all hosts must be prepared to accept. This is 576 bytes for IPv4 and 1280 bytes for IPv6.
不应将 MTU 与所有主机必须准备接受的最小数据报大小混淆。IPv4 为 576 字节,IPv6 为 1280 字节。

Media for IP transport                                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                            Maximum transmission unit (bytes)t                                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                            Notes
Internet IPv4 path MTUAt least 68, max of 64 KiBSystems may use Path MTU Discovery to find the actual path MTU. Routing from larger MTU to smaller MTU causes IP fragmentation.
Internet IPv6 path MTUAt least 1280, max of 64 KiB, but up to 4 GiB with optional jumbogramSystems should use Path MTU Discovery to find the actual path MTU, unless the minimum MTU (1280 bytes) is not exceeded.
X.25Minimal 576 (sending) or 1600 (receiving)
Ethernet v21500Nearly all IP over Ethernet implementations use the Ethernet II frame format.
Ethernet with LLC and SNAP1492
Ethernet jumbo frames1501–9202 or moreThe limit varies by vendor. For correct interoperation, frames should be no larger than the maximum frame size supported by any device on the network segment.
PPPoE v21492Ethernet II MTU (1500) less PPPoE header (8)
DS-Lite over PPPoE1452Ethernet II MTU (1500) less PPPoE header (8) and IPv6 header (40)
PPPoE jumbo frames1493–9190 or moreEthernet Jumbo Frame MTU (1501–9198) less PPPoE header (8)
IEEE 802.11 Wi-Fi (WLAN)2304The maximum MSDU size is 2304 before encryption. WEP will add 8 bytes, WPA-TKIP 20 bytes, and WPA2-CCMP 16 bytes. See also Frame aggregation mechanisms in 802.11n.
Token Ring (802.5)4464
FDDI4352

Ethernet maximum frame size 以太网最大帧大小

The IP MTU and Ethernet maximum frame size are configured separately. In Ethernet switch configuration, MTU may refer to Ethernet maximum frame size. In Ethernet-based routers, MTU normally refers to the IP MTU. If jumbo frames are allowed in a network, the IP MTU should also be adjusted upwards to take advantage of this.
IP MTU 和以太网最大帧大小是单独配置的。在以太网交换机配置中,MTU 可以指以太网最大帧大小。在基于以太网的路由器中,MTU 通常是指 IP MTU。如果网络中允许巨型帧,则 IP MTU 也应向上调整以利用这一点。

Since the IP packet is carried by an Ethernet frame, the Ethernet frame has to be larger than the IP packet. With the normal untagged Ethernet frame overhead of 18 bytes and the 1500-byte payload, the Ethernet maximum frame size is 1518 bytes. If a 1500-byte IP packet is to be carried over a tagged Ethernet connection, the Ethernet frame maximum size needs to be 1522 bytes due to the larger size of an 802.1Q tagged frame. 802.3ac increases the standard Ethernet maximum frame size to accommodate this.
由于 IP 数据包由以太网帧承载,因此以太网帧必须大于 IP 数据包。使用正常的未标记以太网帧开销为 18 字节和 1500 字节有效负载时,以太网最大帧大小为 1518 字节。如果要通过标记的以太网连接传输 1500 字节的 IP 数据包,则以太网帧的最大大小需要为 1522 字节,因为 802.1Q 标记帧的大小较大。802.3ac 增加了标准以太网的最大帧大小以适应这种情况。

Path MTU Discovery 路径最大传输单元发现

Main article: Path MTU Discovery

The Internet Protocol defines the path MTU of an Internet transmission path as the smallest MTU supported by any of the hops on the path between a source and destination. Put another way, the path MTU is the largest packet size that can traverse this path without suffering fragmentation.
Internet 协议将 Internet 传输路径的路径 MTU 定义为源和目标之间路径上的任何跃点支持的最小 MTU。换句话说,路径 MTU 是可以遍历此路径而不会发生分段的最大数据包大小。

Path MTU Discovery is a technique for determining the path MTU between two IP hosts, defined for both IPv4 and IPv6. It works by sending packets with the DF (don’t fragment) option in the IP header set. Any device along the path whose MTU is smaller than the packet will drop such packets and send back an ICMP Destination Unreachable (Datagram Too Big) message which indicates its MTU. This information allows the source host to reduce its assumed path MTU appropriately. The process repeats until the MTU becomes small enough to traverse the entire path without fragmentation.
路径 MTU 发现是一种用于确定两个 IP 主机之间的路径 MTU 的技术,为 IPv4 和 IPv6 定义。它的工作原理是使用 IP 报头集中的 DF(不分段)选项发送数据包。路径上 MTU 小于数据包的任何设备都将丢弃此类数据包,并发回指示其 MTU 的 ICMP 目标无法访问(数据报太大)消息。此信息允许源主机适当地减少其假定路径 MTU。该过程重复进行,直到 MTU 变得足够小,可以遍历整个路径而不会出现碎片。

Standard Ethernet supports an MTU of 1500 bytes and Ethernet implementation supporting jumbo frames, allow for an MTU up to 9000 bytes. However, border protocols like PPPoE will reduce this. Path MTU Discovery exposes the difference between the MTU seen by Ethernet end-nodes and the Path MTU.
标准以太网支持 1500 字节的 MTU,以太网实现支持巨型帧,允许高达 9000 字节的 MTU。但是,像 PPPoE 这样的边界协议将减少这种情况。路径 MTU 发现公开了以太网终端节点看到的 MTU 与路径 MTU 之间的差异。

Unfortunately, increasing numbers of networks drop ICMP traffic (for example, to prevent denial-of-service attacks), which prevents path MTU discovery from working. Packetization Layer Path MTU Discovery is a Path MTU Discovery technique which responds more robustly to ICMP filtering. In an IP network, the path from the source address to the destination address may change in response to various events (load-balancing, congestion, outages, etc.) and this could result in the path MTU changing (sometimes repeatedly) during a transmission, which may introduce further packet drops before the host finds a new reliable MTU.
遗憾的是,越来越多的网络会丢弃 ICMP 流量(例如,为了防止拒绝服务攻击),这会阻止路径 MTU 发现正常工作。数据包化层路径 MTU 发现 22 是一种路径 MTU 发现技术,它对 ICMP 过滤的响应更强大。在 IP 网络中,从源地址到目标地址的路径可能会因各种事件(负载平衡、拥塞、中断等)而更改,这可能导致路径 MTU 在传输过程中更改(有时是重复的),这可能会在主机找到新的可靠 MTU 之前引入进一步的数据包丢弃。

A failure of Path MTU Discovery carries the possible result of making some sites behind badly configured firewalls unreachable. A connection with mismatched MTU may work for low-volume data but fail as soon as a host sends a large block of data. For example, with Internet Relay Chat a connecting client might see the initial messages up to and including the initial ping (sent by the server as an anti-spoofing measure), but get no response after that. This is because the large set of welcome messages sent at that point are packets that exceed the path MTU. One can possibly work around this, depending on which part of the network one controls; for example one can change the MSS (maximum segment size) in the initial packet that sets up the TCP connection at one’s firewall.
路径 MTU 发现失败可能会导致无法访问配置错误的防火墙后面的某些站点。MTU 不匹配的连接可能适用于小容量数据,但一旦主机发送大量数据,就会失败。例如,使用 Internet 中继聊天时,连接客户端可能会看到初始消息,包括初始 ping(由服务器作为反欺骗措施发送),但之后不会得到响应。这是因为此时发送的大量欢迎消息是超出路径 MTU 的数据包。人们可能会解决这个问题,这取决于一个人控制网络的哪个部分;例如,可以更改初始数据包中的 MSS(最大分段大小),以在防火墙上建立 TCP 连接。

In other contexts 在其他情况下

MTU is sometimes used to describe the maximum PDU sizes in communication layers other than the network layer.
MTU 有时用于描述网络层以外的通信层中的最大 PDU 大小。

  • Cisco Systems and MikroTik use L2 MTU for the maximum frame size.
    Cisco Systems 和 MikroTik 使用 L2 MTU 作为最大帧大小。

  • Dell/Force10 use MTU for the maximum frame size.
    Dell/Force10 使用 MTU 作为最大帧大小。

  • Hewlett-Packard used just MTU for the maximum frame size including the optional IEEE 802.1Q tag.
    Hewlett-Packard 仅使用 MTU 作为最大帧尺寸,包括可选的 IEEE 802.1Q 标签。

  • Juniper Networks use several MTU terms: Physical Interface MTU (L3 MTU plus some unspecified protocol overhead), Logical Interface MTU (consistent with IETF MTU) and Maximum MTU (maximum configurable frame size for jumbo frames).
    瞻博网络使用多个 MTU 术语:物理接口 MTU(L3 MTU 加上一些未指定的协议开销)、逻接口 MTU(与 IETF MTU 一致)和最大 MTU(巨型帧的最大可配置帧大小)。

The transmission of a packet on a physical network segment that is larger than the segment’s MTU is known as jabber. This is almost always caused by faulty devices. Network switches and some repeater hubs have a built-in capability to detect when a device is jabbering.
在物理网段上传输的数据包如果大于该网段的 MTU,则称为 jabber。这几乎总是由设备故障引起的。网络交换机和一些中继器集线器具有内置功能,可以检测设备何时发出刺耳信号。


via: encyclopedia

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值