09 · Exploring the TCP_IP Link Layer探索 TCP/IP 鏈結層

Ethernet Frame Structure乙太網路框架結構

Bits that are transmitted over an Ethernet LAN are organized into frames.

在乙太網路 LAN 上傳輸的位元,會被組織成框架。

In Ethernet terminology, the container into which data is placed for transmission is called aframe. The frame contains header information, trailer information, and the actual data that is being transmitted.

在乙太網路術語中,用來放置資料以進行傳輸的容器稱為框架。框架包含標頭資訊、尾端資訊,以及實際要傳輸的資料。

There are several types of Ethernet frames, while the Ethernet II frame is the most common type and is shown in the figure. This frame type is often used to send IP packets.

乙太網路框架有多種類型,其中乙太網路 II 框架是最常見的類型,如圖所示。這種框架類型經常用於傳送 IP 封包。

Field Length (Bytes)
欄位長度(位元組)
8
8
6
6
6
6
2
2
46–1500
46–1500
4
4
Typical Ethernet Frame Field
典型的乙太網路框架欄位
Preamble
前導碼
Destination MAC Address
目的地 MAC 位址
Source MAC Address
來源 MAC 位址
Type
類型
Payload
承載資料
FCS
FCS

The table shows the fields of an Ethernet II frame, which are:

下表顯示乙太網路 II 框架的各個欄位,分別為:

  • Preamble: This field consists of 8 bytes of alternating 1s and 0s that are used to synchronize the signals of the communicating computers.前導碼:此欄位由 8 位元組交替的 1 與 0 組成,用來同步通訊雙方電腦的訊號。
  • Destination Address (DA): The DA field contains the Media Access Control (MAC) address of the network interface card (NIC) on the local network to which the frame is being sent.目的地位址(DA):DA 欄位包含框架要傳送到的本地網路上網路介面卡(NIC)的媒體存取控制(MAC)位址。
  • Source Address (SA): The SA field contains the MAC address of the NIC of the sending computer.來源位址(SA):SA 欄位包含傳送端電腦網路介面卡的 MAC 位址。
  • Type: This field contains a code that identifies the network layer protocol. To identify the encapsulated protocol, the Type field uses a hexadecimal value called Ether-Type. For example, to identify that the Ethernet frame passenger is an IP packet, the Ether-Type is 0X0800. For an IPv6 packet, it is 0x86DD. Each protocol is identified with a specific Ether-Type value.類型:此欄位包含識別網路層通訊協定的代碼。為了識別封裝的通訊協定,「類型」欄位使用稱為 Ether-Type 的十六進位值。舉例來說,若要識別乙太網路框架所承載的是 IP 封包,Ether-Type 為 0X0800;若為 IPv6 封包,則為 0x86DD。每種通訊協定都有各自對應的 Ether-Type 值。
  • Payload: This field contains the network layer data. If the data is shorter than the minimum length of 46 bytes, a string of extraneous bits is used to pad the field. This field is also known as data and padding. The maximum size of the payload (Maximum Transmission Unit [MTU]) is 1500 bytes. Adding the Ethernet protocol overhead, the maximum size of an Ethernet frame is 1518 bytes (the Preamble is excluded). Today, in some environments, it is necessary to carry bigger frames. The frames bigger than 1518 bytes are generally called jumbo frames. It is possible to change the MTU. It is usually changed when some tunneling technologies come into play. Basically, in some scenarios, the payload may need more space than 1500 bytes to add some tunnel protocol information. Because it is not possible to increase the space in the payload field, the MTU is reduced. An example of this behavior is Tunnel GRE (Generic Routing Encapsulation). GRE adds 24 bytes protocol overhead (4 bytes of GRE info and 20 bytes for another IP header), so the MTU is reduced automatically to 1476 bytes. Consider that it may be necessary to change the MTU when you configure some tunneling technologies.承載資料:此欄位包含網路層資料。若資料長度短於最小長度 46 位元組,則會使用一串額外的位元來填補該欄位,因此此欄位也稱為資料與填補(data and padding)。承載資料的最大大小(最大傳輸單元〔MTU〕)為 1500 位元組。加上乙太網路通訊協定的額外負擔後,乙太網路框架的最大大小為 1518 位元組(不含前導碼)。如今在某些環境中,需要傳送更大的框架。大於 1518 位元組的框架通常稱為巨型框架(jumbo frame)。MTU 是可以更改的,通常在使用某些通道(tunneling)技術時會需要調整。基本上,在某些情境下,承載資料可能需要超過 1500 位元組的空間,以加入通道通訊協定的資訊。由於無法增加承載資料欄位本身的空間,因此改為縮減 MTU。GRE(Generic Routing Encapsulation)通道就是這種情況的一個例子:GRE 會增加 24 位元組的通訊協定額外負擔(4 位元組的 GRE 資訊,加上另一個 IP 標頭的 20 位元組),因此 MTU 會自動縮減為 1476 位元組。請記住,在設定某些通道技術時,可能需要調整 MTU。
  • FCS: The frame check sequence (FCS) field includes a checking mechanism to help ensure that the frame of data has been transmitted without corruption. The checking mechanism that is being used is the cyclic redundancy check (CRC).FCS:框架檢查序列(FCS)欄位包含一種檢查機制,用來協助確保資料框架在傳輸過程中未遭到毀損。所使用的檢查機制為循環冗餘檢查(CRC)。
What is the name of the container into which the data payload is placed for transmission on an Ethernet network?在乙太網路上,用來放置資料承載內容以進行傳輸的容器名稱為何?