The IPv6 header differs significantly from the IPv4 header in several ways.
IPv6 標頭在許多方面與 IPv4 標頭有明顯差異。
The IPv4 header contains 12 fields. Following these fields are an Options field of variable length that the figure shows in yellow and a padding field followed by the data portion, usually the transport layer segment. The basic IPv4 header has a size of 20 octets. The Options field increases the size of the IPv4 header.
IPv4 標頭包含 12 個欄位。這些欄位之後是一個長度可變的選項(Options)欄位(圖中以黃色顯示),接著是填補(padding)欄位,最後是資料部分,通常是傳輸層區段。基本的 IPv4 標頭大小為 20 個八位元組。選項欄位會增加 IPv4 標頭的大小。
Of the 12 IPv4 header fields, 6 are removed in IPv6; these fields are shown in green in the figure. The main reasons for removing these fields in IPv6 are as follows:
在 IPv4 的 12 個標頭欄位中,有 6 個在 IPv6 中被移除;這些欄位在圖中以綠色顯示。IPv6 移除這些欄位的主要原因如下:
- The Internet Header Length field (shown as HD Len in the figure) was removed because it is no longer required. Unlike the variable-length IPv4 header, the IPv6 header is fixed at 40 octets.網際網路標頭長度欄位(圖中顯示為 HD Len)已被移除,因為不再需要。與長度可變的 IPv4 標頭不同,IPv6 標頭固定為 40 個八位元組。
- Fragmentation is processed differently in IPv6 and does not need the related fields in the basic IPv4 header. In IPv6, routers no longer process fragmentation. IPv6 hosts are responsible for path maximum transmission unit (MTU) discovery. If the host needs to send data that exceeds the MTU, the host is responsible for fragmentation (this process is recommended but not required). The related Flags field option appears in the Fragmentation Extension Header in IPv6. This header is attached only to a packet that is fragmented.IPv6 中分段(fragmentation)的處理方式不同,不需要基本 IPv4 標頭中的相關欄位。在 IPv6 中,路由器不再處理分段。IPv6 主機負責路徑最大傳輸單元(MTU)探索。若主機需要傳送超過 MTU 的資料,則由主機負責分段(建議但非必要)。相關的旗標(Flags)欄位選項出現在 IPv6 的分段延伸標頭中。此標頭僅附加於已分段的封包。
- The Header Checksum field at the IP layer was removed because most data link layer technologies already perform checksum and error control. This change forces formerly optional upper-layer checksums (such as UDP) to become mandatory.IP 層的標頭核對碼(Header Checksum)欄位已被移除,因為大多數資料鏈結層技術已經執行核對碼與錯誤控制。這項改變迫使原本可選的上層核對碼(例如 UDP)成為必要項目。
The Options field is not present in IPv6. In IPv6, a chain of extension headers processes any additional services. Examples of extension headers include Fragmentation, Authentication Header, and Encapsulating Security Payload (ESP).
選項欄位在 IPv6 中不存在。在 IPv6 中,任何額外服務都由一連串的延伸標頭來處理。延伸標頭的範例包括分段、驗證標頭(Authentication Header)與封裝安全承載(ESP)。
Most other fields were either unchanged or changed only slightly.
大多數其他欄位維持不變或僅有些微變動。
The IPv6 header has 40 octets instead of 20 octets, as in IPv4. The IPv6 header has fewer fields, and the header is aligned on 64-bit boundaries to enable fast processing by current and next-generation processors. The Source and destination address fields are four times larger than in IPv4.
IPv6 標頭為 40 個八位元組,而非 IPv4 的 20 個八位元組。IPv6 標頭欄位較少,且以 64 位元邊界對齊,讓現行與次世代處理器能快速處理。來源與目的位址欄位比 IPv4 大四倍。
The IPv6 header contains eight fields:
IPv6 標頭包含八個欄位:
- Version:This 4-bit field contains the number 6, instead of the number 4 as in IPv4.版本(Version):此 4 位元欄位包含數字 6,而非 IPv4 中的數字 4。
- Traffic Class: This 8-bit field is similar to the type of service (ToS) field in IPv4. The source node uses this field to mark the priority of outbound packets.流量分類(Traffic Class):此 8 位元欄位類似於 IPv4 中的服務類型(ToS)欄位。來源節點使用此欄位標記傳出封包的優先順序。
- Flow Label: This new field has a length of 20 bits and is used to mark individual traffic flows with unique values. Routers are expected to apply an identical quality of service (QoS) treatment to each packet in a flow.流量標籤(Flow Label):此新增欄位長度為 20 位元,用於以唯一值標記個別流量流。路由器須對同一流量流中的每個封包套用相同的服務品質(QoS)處理方式。
- Payload Length:This field is like the Total Length field for IPv4, but because the IPv6 base header is a fixed size, this field describes the length of the payload only, not of the entire packet.承載長度(Payload Length):此欄位類似於 IPv4 的總長度欄位,但由於 IPv6 基本標頭大小固定,此欄位僅描述承載資料的長度,而非整個封包的長度。
- Next Header: The value of this field determines the type of information that follows the basic IPv6 header.下一標頭(Next Header):此欄位的值決定緊接在基本 IPv6 標頭之後的資訊類型。
- Hop Limit: This field specifies the maximum number of hops that an IPv6 packet can take. The initial hop limit value is set by an operating system (64 or 128 is common, but up to the operating system). Each IPv6 router decrements the hop limit field along the path to the destination. An IPv6 packet is dropped when the hop limit field reaches 0. The hop limit is designed to prevent packets from circulating forever if there is a routing error. In normal routing, this limit should never be reached.跳躍限制(Hop Limit):此欄位指定 IPv6 封包可經過的最大跳躍數。初始跳躍限制值由作業系統設定(常見為 64 或 128,實際依作業系統而定)。每個 IPv6 路由器在路徑上都會遞減跳躍限制欄位。當跳躍限制欄位達到 0 時,該 IPv6 封包會被丟棄。跳躍限制的設計是為了避免在發生路由錯誤時封包永久循環。在正常路由情況下,不應達到此限制。
- Source Address:This field of 16 octets, or 128 bits, identifies the source of the packet.來源位址(Source Address):此欄位為 16 個八位元組,即 128 位元,識別封包的來源。
- Destination Address: This field of 16 octets, or 128 bits, identifies the destination of the packet.目的位址(Destination Address):此欄位為 16 個八位元組,即 128 位元,識別封包的目的地。
The extension headers, if there are any, follow these eight fields. The number of extension headers is not fixed, so the total length of the extension header chain is variable.
若有延伸標頭,會接在這八個欄位之後。延伸標頭的數量不固定,因此延伸標頭鏈的總長度是可變的。
To further explore IPv6 header fields and their functions, see RFC 8200, Internet Protocol, Version 6 (IPv6) Specification.
如需進一步了解 IPv6 標頭欄位及其功能,請參閱 RFC 8200《Internet Protocol, Version 6 (IPv6) Specification》。
Connecting IPv6 and IPv4 Networks
連接 IPv6 與 IPv4 網路
Devices running different protocols - IPv4 and IPv6 - cannot communicate unless some translation mechanism is implemented.
執行不同協定(IPv4 與 IPv6)的裝置,除非實作了某種轉譯機制,否則無法互相通訊。
Three main options are available for transitioning to IPv6 from the existing IPv4 network infrastructure: dual-stack network, tunneling, and translation. It is important to note that the IPv4 and IPv6 devices cannot communicate with each other unless the translation is configured.
從現有的 IPv4 網路基礎架構過渡到 IPv6,主要有三種選項可用:雙堆疊網路、通道技術(tunneling)與轉譯(translation)。必須注意的是,除非設定了轉譯,否則 IPv4 與 IPv6 裝置無法彼此通訊。
In a dual-stack network, IPv4 and IPv6 are fully deployed across the infrastructure, so configuration and routing protocols handle IPv4 and IPv6 addressing and adjacencies separately.
在雙堆疊網路中,IPv4 與 IPv6 完整部署於整個基礎架構中,因此設定與路由協定會分別處理 IPv4 與 IPv6 的定址與鄰接關係。
Using the tunneling option, organizations build an overlay network that tunnels one protocol over the other by encapsulating IPv6 packets within IPv4 packets over the IPv4 network and IPv4 packets within IPv6 packets IPv6 network.
使用通道技術選項時,組織會建立一個覆蓋網路,藉由在 IPv4 網路上將 IPv6 封包封裝於 IPv4 封包中、在 IPv6 網路上將 IPv4 封包封裝於 IPv6 封包中,讓一種協定通過另一種協定的通道傳輸。
Translation facilitates communication between IPv6-only and IPv4-only hosts and networks by performing IP header and address translation between the two address families.
轉譯透過在兩種位址家族之間執行 IP 標頭與位址轉換,促成純 IPv6 與純 IPv4 主機及網路之間的通訊。

