TCP/IP详解 卷1 1.6

1.6 Encapsulation
封装
When an application sends data using TCP, the data is sent down the protocol stack, through each layer, until it is sent as a stream of bits across the network. Each layer adds information to the data by prepending headers (and sometimes adding trailer information) to the data that it receives. Figure 1.7 shows this process. The unit of data that TCP sends to IP is called a TCP segment. The unit of data that IP sends to the network interface is called an IP datagram. The stream of bits that flows across the Ethernet is called a frame.
当程序使用 TCP 传输数据时,数据挂起到协议堆栈,通过各层,知道变为比特流通过网络。每层重写数据头(有时也增加尾部信息)增加信息至数据。图 1.7 显示了这个过程。 TCP 发送给 IP 的数据单元称为 TCP 段。 IP 发往网络接口的数据单元称为 IP 数据报。通过以太网的比特流称为帧。
Figure 1.7. Encapsulation of data as it goes down the protocol stack.
1.7 数据向下通过协议栈的封装
TCP/IP详解 卷1 1.6_第1张图片
The numbers at the bottom of the headers and trailer of the Ethernet frame in Figure 1.7 are the typical sizes of the headers in bytes. We'll have more to say about each of these headers in later sections.
1.7 中底部以太帧的头尾数字是标准的字节大小。后续章节将详细说明各头部字段。
A physical property of an Ethernet frame is that the size of its data must be between 46 and 1500 bytes. We'll encounter this minimum in Section 4.5 and we cover the maximum in Section 2.8.
以太帧的一个物理属性为其数据大小需在 46 1500 字节之间。 4.5 节和 2.8 节讨论其最小值和最大值。
All the Internet standards and most books on TCP/IP use the term octet instead of byte. The use of this cute, but baroque term is historical, since much of the early work on TCP/IP was done on systems such as the DEC-10, which did not use 8-bit bytes. Since almost every current computer system uses 8-bit bytes, we'll use the term byte in this text.
所有网络标准及大部分 TCP/IP 书籍使用术语八个位元代替字节。这种巴洛克风格的术语有历史的,早期 TCP/IP 在系统上的工作如 DEC-10 ,不使用 8 比特字节。而如今大部分电脑系统使用 8 比特字节,本书里使用术语字节。
To be completely accurate in Figure 1.7 we should say that the unit of data passed between IP and the network interface is a packet. This packet can be either an IP datagram or a fragment of an IP datagram. We discuss fragmentation in detail in Section 11.5.
完全准确地表达图 1.7 IP 及网络接口直接的数据单元是包。此包可以是 IP 数据报,也可以是数据报的片段。 11.5 节我们详细讨论分段存储。
We could draw a nearly identical picture for UDP data. The only changes are that the unit of information that UDP passes to IP is called a UDP datagram, and the size of the UDP header is 8 bytes.
UDP 数据基本也是这样。唯一的不同是 UDP 传输给 IP 的信息单元叫做 UDP 数据报, UDP 包头大小为 8 字节。
Recall from Figure 1.4 that TCP, UDP, ICMP, and IGMP all send data to IP. IP must add some type of identifier to the IP header that it generates, to indicate the layer to which the data belongs. IP handles this by storing an 8-bit value in its header called the protocol field. A value of 1 is for ICMP, 2 is for IGMP, 6 indicates TCP, and 17 is for UDP.
回到图 1.4 TCP UDP ICMP IGMP 都发送数据到 IP IP 肯定需要生成某种标示加入到 IP 包头,以便标示数据属于哪层。 IP 存储一个叫做协议区域的 8 比特的值区分它们。 1 标示 ICMP 2 标示 IGMP 6 象征 TCP 17 表示 UDP
Similarly, many different applications can be using TCP or UDP at any one time. The transport layer protocols store an identifier in the headers they generate to identify the application. Both TCP and UDP use 16-bit port numbers to identify applications. TCP and UDP store the source port number and the destination port number in their respective headers.
相似地,许多不同的程序可以随时调用 TCP UDP 。传输层的协议头部存储一个标示符区别各程序。 TCP UDP 都使用 16 比特的端口号区别程序。 TCP UDP 在各自头内存储源和目的端口号。
The network interface sends and receives frames on behalf of IP, ARP, and RARP. There must be some form of identification in the Ethernet header indicating which network layer protocol generated the data. To handle this there is a 16-bit frame type field in the Ethernet header.
网络接口依赖于 IP ARP RARP 收发帧。以太帧中肯定有某种识别用于指示哪层网络协议生成此数据。以太帧头中有个 16 比特的帧类型区域控制此项。

你可能感兴趣的:(职场,休闲,Encapsulation)