IPv6 (ipv6)
- Layer: L3 (network)
- Header: 40 octets (fixed)
- Pseudo header: supplies
src/dstto upper-layer checksums - Notes: Encapsulation and tunnels, IS-IS (P2), MACsec / GTPv2-C / Diameter / SIP / RTP (P2), User-defined protocols (protocols.d)
Reached from
| Lower layer | Selector | Value |
|---|---|---|
ethernet2 | ethertype | 34525 (0x86dd) |
dot1q | ethertype | 34525 (0x86dd) |
dot1ad | ethertype | 34525 (0x86dd) |
snap | pid | 34525 (0x86dd) |
ipv4 | protocol | 41 (0x29) |
ipv6 | next_header | 41 (0x29) |
ipv6_hopopts | next_header | 41 (0x29) |
ipv6_route | next_header | 41 (0x29) |
ipv6_srh | next_header | 41 (0x29) |
ipv6_frag | next_header | 41 (0x29) |
ipv6_dstopts | next_header | 41 (0x29) |
ppp | protocol | 87 (0x0057) |
gre | protocol_type | 34525 (0x86dd) |
mpls | First 4 bits of the payload when s = 1 | 6 |
gtpu | First 4 bits of the payload when message_type = 255 (0xff) | 6 |
geneve | protocol_type | 34525 (0x86dd) |
pim_register | First 4 bits of the payload when type = 1 | 6 |
Fields
| Field | Type | Default | Auto | Description |
|---|---|---|---|---|
version | uint(4) | 6 | IP version, always 6. | |
dscp | uint(6) | 0 | Differentiated services code point (QoS class, 0 to 63). | |
ecn | uint(2) | 0 | Explicit congestion notification (0 = not ECT, 1 / 2 = ECT, 3 = CE). | |
flow_label | uint(20) | 0 | Flow label (20 bits) identifying a flow for routers; 0 = none. | |
payload_length | uint(16) | Length of the payload in octets | Length of everything after this header, including extension headers (Auto). | |
next_header | enum(8) | 253 (experimental) | Protocol number of the next layer (see Next layer) | Protocol number of the next header (Auto; 253 = experimental when none is known). |
hop_limit | uint(8) | 64 | Hop limit; decremented at every router, 0 is never sent. | |
src | ipv6 | 2001:db8::1 | Source IPv6 address. | |
dst | ipv6 | 2001:db8::2 | Destination IPv6 address. |
next_header
| Value | Name |
|---|---|
| 0 (0x00) | hop_by_hop |
| 4 (0x04) | ipv4 |
| 6 (0x06) | tcp |
| 17 (0x11) | udp |
| 41 (0x29) | ipv6 |
| 43 (0x2b) | routing |
| 44 (0x2c) | fragment |
| 46 (0x2e) | rsvp |
| 50 (0x32) | esp |
| 51 (0x33) | ah |
| 58 (0x3a) | icmpv6 |
| 59 (0x3b) | no_next_header |
| 60 (0x3c) | destination_options |
| 88 (0x58) | eigrp |
| 89 (0x59) | ospf |
| 112 (0x70) | vrrp |
| 132 (0x84) | sctp |
| 143 (0x8f) | ethernet |
| 253 (0xfd) | experimental |
Next layer
The next layer is selected by next_header; when the field is Auto the builder writes the value of the protocol stacked above.
| Value | Protocol | Note |
|---|---|---|
| 0 (0x00) | ipv6_hopopts | |
| 4 (0x04) | ipv4 | |
| 6 (0x06) | tcp | |
| 17 (0x11) | udp | |
| 41 (0x29) | ipv6 | |
| 43 (0x2b) | ipv6_route | |
| 44 (0x2c) | ipv6_frag | |
| 46 (0x2e) | rsvp | |
| 47 (0x2f) | gre | |
| 58 (0x3a) | icmpv6 | |
| 60 (0x3c) | ipv6_dstopts | |
| 88 (0x58) | eigrp | |
| 89 (0x59) | ospfv3 | |
| 112 (0x70) | vrrpv3_ipv6 | |
| 115 (0x73) | l2tpv3 | |
| 132 (0x84) | sctp | |
| 143 (0x8f) | ethernet2 |
8 bits of the payload after its first 16 bits when next_header = 43 (0x2b)
| Value | Protocol |
|---|---|
| 4 (0x04) | ipv6_srh |
| (any other value) | ipv6_route |
Constraints
| Level | Rule |
|---|---|
| warning | version = 6 |
| warning | hop_limit ≠ 0 |
Sample templates
- bad-ipv6-payload-length —
templates/malformed/ipv6-bad-payload-length.wpg.yaml - 6in4 —
templates/protocols/encap/6in4.wpg.yaml - vrrpv3-ipv6 —
templates/protocols/fhrp/vrrpv3-ipv6.wpg.yaml - icmpv6-echo-request —
templates/protocols/l3/icmpv6-echo.wpg.yaml - ipv6-dstopts —
templates/protocols/l3/ipv6-dstopts.wpg.yaml - ipv6-ext-chain —
templates/protocols/l3/ipv6-ext-chain.wpg.yaml - ipv6-fragment —
templates/protocols/l3/ipv6-frag.wpg.yaml - ipv6-hopopts-router-alert —
templates/protocols/l3/ipv6-hopopts.wpg.yaml - ipv6-routing-type2 —
templates/protocols/l3/ipv6-routing.wpg.yaml - ipv6-udp —
templates/protocols/l3/ipv6.wpg.yaml - ndp-neighbor-advertisement —
templates/protocols/l3/ndp-na.wpg.yaml - ndp-neighbor-solicitation —
templates/protocols/l3/ndp-ns.wpg.yaml - ndp-router-advertisement —
templates/protocols/l3/ndp-ra.wpg.yaml - ndp-redirect —
templates/protocols/l3/ndp-redirect.wpg.yaml - ndp-router-solicitation —
templates/protocols/l3/ndp-rs.wpg.yaml - sctp-shutdown —
templates/protocols/l4/sctp-shutdown.wpg.yaml - udp-over-ipv6 —
templates/protocols/l4/udp-ipv6.wpg.yaml - bfd-multihop-ipv6 —
templates/protocols/oam/bfd-multihop-ipv6.wpg.yaml - srv6-end-dx2-hmac —
templates/protocols/srv6/srv6-end-dx2-hmac.wpg.yaml - srv6-h-encaps-ipv4 —
templates/protocols/srv6/srv6-h-encaps-ipv4.wpg.yaml - srv6-srh-udp —
templates/protocols/srv6/srv6-srh-udp.wpg.yaml - scenario-ndp-ns-sweep —
templates/scenarios/ndp-ns-sweep.wpg.yaml - scenario-ipv6-ra-flood —
templates/scenarios/ra-flood.wpg.yaml