IPv6 packet: Difference between revisions

Content deleted Content added
→‎Hop-by-hop options and destination options: use long format of {{APHD|def}}
m unpiped links using script
 
(4 intermediate revisions by one other user 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|Internet Protocol version 6]] (IPv6). [[Network packet|Packet]]s consist of control information for addressing and routing and a [[payload (computing)|payload]] of user data. The control information in IPv6 packets is subdivided into a mandatory fixed [[header (computing)|header]] and optional extension headers. The payload of an IPv6 packet is typically a [[datagram]] or segment of the higher-level [[transport layer]] protocol, but may be data for an [[internet layer]] (e.g., [[ICMPv6]]) or [[link layer]] (e.g., [[OSPF]]) instead.
 
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 20:
;{{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|fieldname=Payload Length|bitslength=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|fieldname=Next Header|bitslength=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|fieldname=Hop Limit|bitslength=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|fieldname=Source Address|bitslength=128 bits|text=The unicast [[IPv6 address]] of the sending node.}}
;{{APHD|def|fieldname=Destination Address|bitslength=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}}
 
Line 82:
{{APHD|8|bits1=0|background1=linen|field1=Optional: more Options and padding}}
{{APHD|end}}
;{{APHD|def|fieldname=Next Header|bitslength=8 bits|text=Specifies the [[List of IP protocol numbers|type]] of the next header.}}
;{{APHD|def|fieldname=Header extension length|bitslength=8 bits|text=Length of this header in 8-octet units, not including the first 8 octets.}}
;{{APHD|def|fieldname=Options and padding|bitslength=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===
Line 93:
{{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 127:
| May be used for testing, not for actual implementations. ''RFC3692-style Experiment 2''.<ref name=rfc3692></ref>
|}
;{{APHD|def|name=Segments Left|length=8 bits|text=Number of nodes this packet still has to visit before reaching its final destination.}}
;{{APHD|def|name=Type-specific Data|length=variable|text=Data that belongs to this type of routing header.}}
 
===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.<ref{{Ref name=rfc8200/>RFC|8200}}
{{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=ReservedReserved2|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 ''[[IPsec#Authentication Header|Authentication Header]]'' and the ''[[IPsec#Encapsulating Security Payload|Encapsulating Security Payload]]'' are part of [[IPsec]] and are used identically in IPv6 and in IPv4.{{Ref RFC|4302}}{{Ref RFC|4303}}
 
==Payload==