Before you can send an IP packet, there needs to be a format that all IP devices agree on to route a packet from the source to the destination. All that information is contained in the IP header. The IPv4 header is a container for values that are required to achieve host-to-host communications. Some fields (such as the IP version) are static, and others, such as Time to Live (TTL), are modified continually in transit.
在傳送 IP 封包之前,需要有一種所有 IP 裝置都同意的格式,才能將封包從來源繞送到目的地。所有這些資訊都包含在 IP 標頭中。IPv4 標頭是一個容器,內含達成主機對主機通訊所需的各項值。有些欄位(例如 IP 版本)是固定不變的,而其他欄位,例如存活時間(TTL),則會在傳輸過程中持續改變。
The IPv4 header has several fields. First, you will learn about these four fields:
IPv4 標頭有多個欄位。首先,你將學習以下這四個欄位:
- Service type:Provides information on the desired quality of service服務類型:提供所需服務品質的相關資訊
- TTL:Defines the number of available hops and limits the lifetime of a packetTTL:定義可用的躍點數,並限制封包的存活時間
- Source address: Specifies the 32-bit binary value that represents the IPv4 address of the sending endpoint來源位址: 指定代表傳送端點 IPv4 位址的 32 位元二進位值
- Destination address: Specifies the 32-bit binary value that represents the IPv4 address of the receiving endpoint目的位址: 指定代表接收端點 IPv4 位址的 32 位元二進位值
Other fields in the header include:
標頭中的其他欄位包含:
- Version: Describes the version of IP.版本: 描述 IP 的版本。
- IHL: Internet Header Length (IHL) describes the length of the header.IHL: 網際網路標頭長度(IHL)描述標頭的長度。
- Total Length: Describes the length of a packet, including header and data.總長度: 描述封包的長度,包含標頭與資料。
- Identification: Used for unique fragment identification.識別碼: 用於唯一的分片識別。
- Flag: Sets various control flags regarding fragmentation.旗標: 設定與分片相關的各種控制旗標。
- Fragment Offset: Indicates where a specific fragment belongs.分片偏移: 指出特定分片所屬的位置。
- Protocol: Indicates the upper-layer protocol that is used in the data portion of an IPv4 packet. For example, a protocol value of 6 indicates this packet carries a TCP segment.通訊協定: 指出 IPv4 封包資料部分所使用的上層通訊協定。例如,通訊協定值為 6 表示此封包承載 TCP 區段。
- Header Checksum: Used for header error detection.標頭檢查碼: 用於標頭錯誤偵測。
- Options: Includes optional parameters選項: 包含選用的參數
- Padding: Used to ensure that the header ends on a 32-bit boundary填補: 用來確保標頭結尾對齊 32 位元邊界
What does the TTL value (in the TTL field) represent?TTL 值(TTL 欄位中的值)代表什麼?
