InfraLab
ICMP-TYPES41 cmd

ICMP / ICMPv6 type & code チート集

ICMPv4 type/code、Destination Unreachable、ICMPv6 type、Neighbor Discovery、Path MTU Discovery とファイアウォール許可方針を整理したチート集。

更新日
2026-05-29
参照範囲
公式ドキュメント / man page / 主要ベンダーCLI
対象実装
主要 Linux / BSD / ネットワーク機器 CLI の一般的な実装
免責
OS とバージョン差分は実環境で確認してください。

このチートシートの使いどころ

ICMP / ICMPv6 type & code チート集は、ICMPv4 type/code、Destination Unreachable、ICMPv6 type、Neighbor Discovery、Path MTU Discovery とファイアウォール許可方針を整理したチート集。 対象は公式ドキュメント、man page、主要ベンダー CLI で確認できる現行の一般的な実装です。カテゴリはICMPv4 type、ICMPv4 Destination Unreachable code、ICMPv6 type、ICMPv6 NDを中心に、41件のコマンドや値を用途別に引けます。障害調査、設定変更前の確認、作業メモ作成で、ICMP、ICMPv6、type、code、Neighbor Discoveryに関連する操作を短時間で探すために使います。

41 / 41

ICMPv4 type 0 Echo Reply

ping 応答。診断用途、通常は許可推奨。

Example
tcpdump -n "icmp[icmptype] == 0" / RFC 792
ICMPv4 type 3 Destination Unreachable

到達不能。PMTUD/障害通知、必要な code は許可推奨。

Example
tcpdump -n "icmp[icmptype] == 3" / RFC 792
ICMPv4 type 4 Source Quench

送信抑制。廃止扱い、許可不要。

Example
RFC 6633 で deprecated
ICMPv4 type 5 Redirect

経路変更通知。LAN 内限定、境界では拒否推奨。

Example
tcpdump -n "icmp[icmptype] == 5"
ICMPv4 type 8 Echo Request

ping 要求。監視用途、ポリシーにより許可。

Example
ping -c 3 203.0.113.1
ICMPv4 type 9 Router Advertisement

IPv4 router discovery。通常は境界で不要。

Example
RFC 1256
ICMPv4 type 10 Router Solicitation

IPv4 router discovery 要求。通常は境界で不要。

Example
RFC 1256
ICMPv4 type 11 Time Exceeded

TTL 超過。traceroute に必要、許可推奨。

Example
traceroute 8.8.8.8
ICMPv4 type 12 Parameter Problem

IP header 問題。障害診断用、許可検討。

Example
RFC 792
ICMPv4 type 13 Timestamp

時刻要求。古い診断、通常拒否。

Example
RFC 792
ICMPv4 type 14 Timestamp Reply

時刻応答。通常拒否。

Example
RFC 792
ICMPv4 type 15 Information Request

廃止された情報要求。拒否推奨。

Example
RFC 792 legacy
ICMPv4 type 16 Information Reply

廃止された情報応答。拒否推奨。

Example
RFC 792 legacy
ICMPv4 type 17 Address Mask Request

古い address mask 要求。拒否推奨。

Example
RFC 950 legacy
ICMPv4 type 18 Address Mask Reply

古い address mask 応答。拒否推奨。

Example
RFC 950 legacy
DU code 0 Net Unreachable

ネットワーク到達不能。障害通知、許可推奨。

Example
ICMPv4 type 3 code 0
DU code 1 Host Unreachable

ホスト到達不能。障害通知、許可推奨。

Example
ICMPv4 type 3 code 1
DU code 2 Protocol Unreachable

上位プロトコル未対応。診断用。

Example
ICMPv4 type 3 code 2
DU code 3 Port Unreachable

UDP port 未待受。traceroute/診断で重要。

Example
ICMPv4 type 3 code 3
DU code 4 Fragmentation Needed

DF 付きで MTU 超過。Path MTU Discovery に必須、許可強く推奨。

Example
ICMPv4 type 3 code 4
DU code 5 Source Route Failed

source route 失敗。通常不要。

Example
ICMPv4 type 3 code 5
DU code 9 Net Administratively Prohibited

管理ポリシーで network 禁止。診断用。

Example
ICMPv4 type 3 code 9
DU code 10 Host Administratively Prohibited

管理ポリシーで host 禁止。診断用。

Example
ICMPv4 type 3 code 10
DU code 13 Communication Administratively Prohibited

FW などで通信禁止。診断用。

Example
ICMPv4 type 3 code 13
ICMPv6 type 1 Destination Unreachable

IPv6 到達不能。診断に必要、許可推奨。

Example
ip6tables -A INPUT -p ipv6-icmp --icmpv6-type destination-unreachable -j ACCEPT
ICMPv6 type 2 Packet Too Big

IPv6 PMTUD に必須。必ず許可推奨。

Example
ip6tables -A INPUT -p ipv6-icmp --icmpv6-type packet-too-big -j ACCEPT
ICMPv6 type 3 Time Exceeded

hop limit 超過。traceroute に必要。

Example
traceroute6 2001:4860:4860::8888
ICMPv6 type 4 Parameter Problem

IPv6 header 問題。診断用、許可推奨。

Example
RFC 4443
ICMPv6 type 128 Echo Request

IPv6 ping 要求。監視用途、ポリシーにより許可。

Example
ping -6 -c 3 2001:4860:4860::8888
ICMPv6 type 129 Echo Reply

IPv6 ping 応答。通常許可。

Example
tcpdump -n "icmp6 && ip6[40] == 129"
ICMPv6 type 133 Router Solicitation

RS。ホストが router を探索、同一リンクで必須。

Example
RFC 4861 / ND
ICMPv6 type 134 Router Advertisement

RA。prefix/default route 配布、同一リンクで必須。

Example
rdisc6 eth0
ICMPv6 type 135 Neighbor Solicitation

NS。ARP 相当、同一リンクで必須。

Example
tcpdump -n "icmp6 && ip6[40] == 135"
ICMPv6 type 136 Neighbor Advertisement

NA。ARP 応答相当、同一リンクで必須。

Example
tcpdump -n "icmp6 && ip6[40] == 136"
ICMPv6 type 137 Redirect

IPv6 redirect。同一リンク限定、境界では拒否検討。

Example
RFC 4861
ICMPv6 type 138 Router Renumbering

router renumbering。通常不要。

Example
RFC 2894
ICMPv6 type 151 MLDv2 Listener Report

マルチキャスト listener report。MLD 用。

Example
RFC 3810
ICMPv6 type 152 MLDv2 Listener Done

マルチキャスト listener done。MLD 用。

Example
RFC 3810
ICMPv6 type 153 MLDv2 Multicast Router Advertisement

マルチキャスト router discovery。環境依存。

Example
RFC 4286
Path MTU Discovery IPv4

IPv4 は type 3 code 4 を遮断しない。

Example
firewall では fragmentation-needed を許可推奨
Path MTU Discovery IPv6

IPv6 は Packet Too Big を遮断しない。

Example
ICMPv6 type 2 は許可推奨
対応ツール
Related