IPv6 (ipv6)
- レイヤ: L3 (ネットワーク)
- ヘッダ: 40 オクテット (固定長)
- 疑似ヘッダ: 上位レイヤのチェックサムに
src/dstを提供 - 補足: カプセル化・トンネル, IS-IS (P2), MACsec / GTPv2-C / Diameter / SIP / RTP (P2), ユーザ定義プロトコル (protocols.d)
下位レイヤからの到達
| 下位レイヤ | 判別フィールド | 値 |
|---|---|---|
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 | s = 1 のときのペイロード先頭 4 ビット | 6 |
gtpu | message_type = 255 (0xff) のときのペイロード先頭 4 ビット | 6 |
geneve | protocol_type | 34525 (0x86dd) |
pim_register | type = 1 のときのペイロード先頭 4 ビット | 6 |
フィールド
| フィールド | 型 | 既定値 | Auto | 説明 |
|---|---|---|---|---|
version | uint(4) | 6 | IP バージョン。常に 6。 | |
dscp | uint(6) | 0 | DSCP (QoS クラス、0〜63)。 | |
ecn | uint(2) | 0 | 明示的輻輳通知 (0 = 非 ECT、1 / 2 = ECT、3 = CE)。 | |
flow_label | uint(20) | 0 | フローラベル (20 ビット)。ルータがフローを識別する。0 = なし。 | |
payload_length | uint(16) | ペイロードの長さ (オクテット単位) | このヘッダ以降の長さ (拡張ヘッダを含む、Auto)。 | |
next_header | enum(8) | 253 (experimental) | 次レイヤのプロトコル番号 (「次レイヤ」参照) | 次ヘッダのプロトコル番号 (Auto。次レイヤ不明時は 253 = 実験用)。 |
hop_limit | uint(8) | 64 | ホップリミット。ルータごとに減算され、0 は送信されない。 | |
src | ipv6 | 2001:db8::1 | 送信元 IPv6 アドレス。 | |
dst | ipv6 | 2001:db8::2 | 宛先 IPv6 アドレス。 |
next_header
| 値 | 名前 |
|---|---|
| 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_header で判別します。このフィールドが Auto のときは、上に積んだプロトコルの値を書き込みます。
| 値 | プロトコル | 備考 |
|---|---|---|
| 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 |
next_header = 43 (0x2b) のときのペイロードの 16 ビット目から 8 ビット
| 値 | プロトコル |
|---|---|
| 4 (0x04) | ipv6_srh |
| (その他の値) | ipv6_route |
制約
| レベル | 規則 |
|---|---|
| 警告 | version が 6 |
| 警告 | hop_limit が 0 以外 |
サンプルテンプレート
- 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