Content deleted Content added
m unpiped links using script |
|||
(25 intermediate revisions by 9 users not shown) | |||
Line 1:
{{short description|Smallest message entity exchanged using Internet Protocol version 6}}
An '''IPv6 packet''' is the smallest message entity exchanged using [[
IPv6 packets are typically transmitted over the link layer (i.e., over [[Ethernet]] or [[Wi-Fi]]), which encapsulates each packet in a [[frame (networking)|frame]]. Packets may also be transported over a higher-layer [[tunneling protocol]], such as [[IPv4]] when using [[6to4]] or [[Teredo tunneling|Teredo]] transition technologies.
Line 10:
==Fixed header==
The fixed header starts an IPv6 packet and has a size of 40 [[octet (computing)|octets]] (320 [[bit|bits]]).
{{APHD|start|title=Fixed header format}}
{{APHD|0|bits1=4|bits2=8|bits3=20|field1=Version|field2=Traffic class|field3=Flow label}}
{{APHD|4|bits1=16|bits2=8|bits3=8|field1=Payload length|field2=Next header|field3=Hop limit}}
{{APHD|8|bits1=128|field1=Source address}}
{{APHD|24|bits1=128|field1=Destination address}}
{{APHD|end}}
;{{APHD|def|Version|4 bits|The constant 6 (bit sequence {{mono|0110}}).}}
;{{APHD|def|Traffic Class|6+2 bits|The bits of this field hold two values. The six most-significant bits hold the [[differentiated services field]] (DS field), which is used to classify packets.{{Ref RFC|2474}}{{Ref RFC|3260}} Currently, all standard DS fields end with a '0' bit. Any DS field that ends with two '1' bits is intended for local or experimental use.{{Ref RFC|4727}} The remaining two bits are used for [[Explicit Congestion Notification]] (ECN);{{Ref RFC|3168}} priority values subdivide into ranges: traffic where the source provides congestion control and non-congestion control traffic.}}
;{{APHD|def|Flow Label|20 bits|A high-entropy identifier of a flow of packets between a source and destination. A flow is a group of packets, e.g., a TCP session or a media stream. The special flow label 0 means the packet does not belong to any flow (using this scheme). An older scheme identifies flow by source address and port, destination address and port, protocol (value of the last ''Next Header'' field).{{Ref RFC|6437}} It has further been suggested that the flow label be used to help detect spoofed packets.<ref>[http://tools.ietf.org/html/draft-blake-ipv6-flow-label-nonce-02 Use of the IPv6 Flow Label as a Transport-Layer Nonce to Defend Against Off-Path Spoofing Attacks]</ref>}}
;{{APHD|def|name=Payload Length|length=16 bits|text=The size of the payload in octets, including any extension headers. The length is set to zero when a ''Hop-by-Hop'' extension header carries a [[#Jumbogram|Jumbo Payload]] option.{{Ref RFC|2675}}}}
;{{APHD|def|name=Next Header|length=8 bits|text=Specifies the type of the next header. This field usually specifies the [[transport layer]] protocol used by a packet's payload. When extension headers are present in the packet this field indicates which extension header follows. The values are shared with those used for the IPv4 protocol field, as both fields have the same function (see [[List of IP protocol numbers]]).}}
;{{APHD|def|name=Hop Limit|length=8 bits|text=Replaces the [[time to live]] field in IPv4. This value is decremented by one at each forwarding node and the packet is discarded if it becomes 0. However, the destination node should process the packet normally even if received with a hop limit of 0.}}
;{{APHD|def|name=Source Address|length=128 bits|text=The unicast [[IPv6 address]] of the sending node.}}
;{{APHD|def|name=Destination Address|length=128 bits|text=The IPv6 unicast or multicast address of the destination node(s).}}
In order to increase performance, and since current [[link layer]] technology and transport layer protocols are assumed to provide sufficient error detection,{{Ref RFC|1726|section=2.6}} the header has no [[checksum]] to protect it.{{Ref RFC|8200}}
==Extension headers==
Line 125 ⟶ 36:
The defined extension headers below are listed in the preferred order for the case where there is more than one extension header following the fixed header.
|-
! Extension header
Line 164 ⟶ 75:
===Hop-by-hop options and destination options===
{{anchor|hop-by-hop options|destination options}}
The ''Hop-by-Hop Options'' extension header may be examined and altered by all nodes on the packet's path, including sending and receiving nodes. (For authentication, option values that may change along the path are ignored.) The ''Destination Options'' extension header needs to be examined by the destination node(s) only. The extension headers are both at least 8 octets in size; if more options are present than will fit in that space, blocks of 8 octets, containing options and padding, are added to the header repeatedly until all options are represented.
{{APHD|start|title=''Hop-by-Hop Options'' and ''Destination Options'' extension header format}}
{{APHD|0|bits1=8|bits2=8|bits3=16|field1=Next header|field2=Header extension length|field3=Options and padding}}
{{APHD|4|bits1=32|field1=Options and padding}}
{{APHD|8|bits1=0|background1=linen|field1=Optional: more Options and padding}}
{{APHD|end}}
;{{APHD|def|name=Next Header|length=8 bits|text=Specifies the [[List of IP protocol numbers|type]] of the next header.}}
;{{APHD|def|name=Header extension length|length=8 bits|text=Length of this header in 8-octet units, not including the first 8 octets.}}
;{{APHD|def|name=Options and padding|length=variable|text=Contains one or more options, and optional padding fields to align options and to make the total header length a multiple of 8 octets. Options are [[Type–length–value|TLV]]-coded.}}
===Routing===
The ''Routing'' extension header is used to direct a packet to one or more intermediate nodes before being sent to its destination. The header is at least 8 octets in size; if more ''Type-specific Data'' is needed than will fit in 4 octets, blocks of 8 octets are added to the header repeatedly, until all ''Type-specific Data'' is placed.<ref name=rfc8200/>
{{APHD|start|title=''Routing'' extension header format}}
{{APHD|0|bits1=8|bits2=8|bits3=8|bits4=8|field1=Next header|field2=Header extension length|field3=Routing type|field4=Segments left}}
{{APHD|4|bits1=32|field1=Type-specific data}}
{{APHD|8|bits1=0|background1=linen|field1=Optional: more type-specific data...}}
{{APHD|end}}
;{{APHD|def|name=Next header|length=8 bits|text=Indicates the type of the next header.}}
;{{APHD|def|name=Header extension length|length=8 bits|text=The length of this header, in multiples of 8 octets, not including the first 8 octets.}}
;{{APHD|def|name=Routing type|length=8 bits|text=A value between 0 and 255, as assigned by [[IANA]].<ref name=iana_routing_options>{{Cite web|url=https://www.iana.org/assignments/ipv6-parameters/ipv6-parameters.xhtml|title=Internet Protocol Version 6 (IPv6) Parameters: Routing Types|publisher=[[IANA]]|access-date=2021-10-15}}</ref>}}
:{| class="wikitable" style="text-align: left"
!| Type
Line 330 ⟶ 127:
| May be used for testing, not for actual implementations. ''RFC3692-style Experiment 2''.<ref name=rfc3692></ref>
|}
;
;
===Fragment===
In order to send a packet that is larger than the path [[Maximum transmission unit|MTU]], the sending node splits the packet into fragments. The ''Fragment'' extension header carries the information necessary to reassemble the original (unfragmented) packet.
{{APHD|start|title=''Fragment'' extension header format}}
{{APHD|0|bits1=8|bits2=8|bits3=13|bits4=2|field1=Next Header|field2=Reserved|field3=Fragment offset|field4=Res|hint4=Reserved2|field5=M|hint5=M Flag}}
{{APHD|4|bits1=32|field1=Identification}}
{{APHD|end}}
;{{APHD|def|name=Next header|length=8 bits|text=Identifies the type of the next header.}}
;{{APHD|def|name=Reserved|length=8 bits|constraint=Reserved == 0|text=Initialized to all zeroes.}}
;{{APHD|def|name=Fragment offset|length=13 bits|text=Offset, in 8-octet units, relative to the start of the fragmentable part of the original packet.}}
;{{APHD|def|name=Reserved2|short=Res|length=2 bits|constraint=Res == 0|text=Reserved; initialized to zeroes.}}
;{{APHD|def|name=M Flag|short=M|length=1 bit|text=1 means more fragments follow; 0 means last fragment.}}
;{{APHD|def|name=Identification|length=32 bits|text=Packet identification value, generated by the source node. Needed for reassembly of the original packet.}}
===Authentication Header (AH) and Encapsulating Security Payload (ESP)===
The ''[[
==Payload==
|