《TCP/IP詳解 卷一:協(xié)議》第5章的IPv4數據報的總長度字段的一些解釋,出現以下內容(有省略):
....另外,主機不需要接收大于576字節(jié)的IPv4數據報.....以避免576字節(jié)的IPv4限制。
英文原文的內容(有省略):
Furthermore, a host is not required to be able to receive an IPv4 datagram larger than 576 bytes. ....Many applications that use the UDP protocol (see Chapter 10) for data transport (e.g., DNS, DHCP, etc.) use a limited data size of 512 bytes to avoid the 576-byte IPv4 limit.?
首先說明一下,這就是作者和譯者不假思索,照搬RFC文檔的結果,又沒有任何解釋。
在RFC791文檔里面說
Total Length: 16 bits Total Length is the length of the datagram, measured in octets, including internet header and data. This field allows the length of a datagram to be up to 65,535 octets. Such long datagrams are impractical for most hosts and networks. All hosts must be prepared to accept datagrams of up to 576 octets (whether they arrive whole or in fragments). It is recommended that hosts only send datagrams larger than 576 octets if they have assurance that the destination is prepared to accept the larger datagrams. The number 576 is selected to allow a reasonable sized data block to be transmitted in addition to the required header information. For example, this size allows a data block of 512 octets plus 64 header octets to fit in a datagram. The maximal internet header is 60 octets, and a typical internet header is 20 octets, allowing a margin for headers of higher level protocols.
然后我找了一些資料,最合理的解釋就是,
在1981年9月通過RFC 791和RFC 793的發(fā)布,TCP/IP正式標準化。
在1981年,內存還是很貴的,一次最多發(fā)為576字節(jié)就夠了。
——不是說現在MTU最大就是576字節(jié)啊,因為TCP/IP標準也是持續(xù)更新的,RFC文檔也是不斷增加的,更新的內容是在新文檔的,不會在舊文檔里面改的。
2023-11-23 補充,對于后續(xù)發(fā)展,保持在576之內,有一點很重要的原因是,文章來源:http://www.zghlxwxcb.cn/news/detail-736010.html
IP數據報可能被封裝在其他協(xié)議來傳輸,比如IPSec(用于VPN),如果原來的數據報過大,再封裝時容易導致分片。文章來源地址http://www.zghlxwxcb.cn/news/detail-736010.html
到了這里,關于《TCP/IP詳解 卷一:協(xié)議》第5章的IPv4數據報的總長度字段出現“不需要大于576字節(jié)的IPv4數據報“相關內容的解釋的文章就介紹完了。如果您還想了解更多內容,請在右上角搜索TOY模板網以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網!