共用方式為


IPv6 Packets

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

An IPv6 packet, also known as an IPv6 datagram, consists of an IPv6 header and an IPv6 payload, as shown in the following illustration.

Aa916089.4fd61918-d638-4c9a-9828-1c3bff261e94(en-us,MSDN.10).gif

The IPv6 header consists of two parts, the IPv6 base header, and optional extension headers. Functionally, the optional extension headers and upper-layer protocols, for example TCP, are considered part of the IPv6 payload. The following table shows the fields in the IPv6 base header.

IPv6 header field Length Function

Version

4 bits

Identifies the version of the protocol. For IPv6, the version is 6.

Class

8 bits

Intended for originating nodes and forwarding routers to identify and distinguish between different classes or priorities of IPv6 packets.

Flow label

20 bits

Defines how traffic is handled and identified. A flow is a sequence of packets sent either to a unicast or a multicast destination. This field identifies packets that require special handling by the IPv6 node. The following list shows the ways the field is handled if a host or router does not support flow label field functions:

  • If the packet is being sent, the field is set to zero.
  • If the packet is being received, the field is ignored.

Payload length

16 bits

Identifies the length, in octets, of the payload This field is a 16-bit unsigned integer. The payload includes the optional extension headers, as well as the upper-layer protocols, for example, TCP.

Next Header

8 bits

Identifies the header immediately following the IPv6 header. The following list shows examples of the next header:

  • 0 = Hop-by-Hop options
  • 1 = ICMPv4
  • 4 = IP in IP (encapsulation)
  • 6 = TCP
  • 17 = UDP
  • 43 = Routing
  • 44 = Fragment
  • 50 = Encapsulating security payload
  • 51 = Authentication
  • 58 = ICMPv6
  • 59 = None
  • 60 = Destination options

Hop Limit

8 bits

Identifies the number of network segments, also known as links or subnets, on which the packet is allowed to travel before being discarded by a router. The Hop Limit is set by the sending host and is used to prevent packets from endlessly circulating on an IPv6 internetwork.

When forwarding an IPv6 packet, IPv6 routers must decrease the Hop Limit by 1, and must discard the IPv6 packet when the Hop Limit is 0.

Source Address

128 bits

Identifies the IPv6 address of the original source of the IPv6 packet.

Destination Address

128 bits

Identifies the IPv6 address of the intermediate or final destination of the IPv6 packet.

IPv4 headers and IPv6 headers are not interoperable. A host or router must use an implementation of both IPv4 and IPv6 in order to recognize and process both header formats.

See Also

Concepts

Core Protocols of IPv6

Other Resources