ICMPとPing・Tracerouteの役割
IPと並んで機能する制御プロトコルであるICMPと、pingやtracerouteが到達性やルーティングの診断にICMPを使う仕組みを理解します。
「ICMPとPing・Tracerouteの役割」はCoddyKit上の無料Linux Networking & TCP/IP for Developersレッスンです。 これはレッスン4/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これはLinux Networking & TCP/IP for Developers学習パスの一部であり、ウェブとCoddyKitアプリ全体で進捗が同期されます。 Linux Networking & TCP/IP for Developersコースには全4レッスンが含まれています。
このレッスンの一部はまだ翻訳されておらず、英語で表示されています。
What Is ICMP?
The Internet Control Message Protocol (ICMP) carries control and error messages for the IP layer. It is not used to send application data; it reports problems like unreachable hosts and assists diagnostics.
ICMP Sits Beside IP
ICMP messages are wrapped in IP packets but ICMP is considered part of the network layer. Unlike TCP or UDP, it has no ports, only message types and codes.
Common Message Types
Key ICMP types include:
- Echo Request / Echo Reply (used by ping).
- Destination Unreachable.
- Time Exceeded (used by traceroute).
How Ping Works
ping sends an ICMP Echo Request and waits for an Echo Reply. The round-trip time tells you latency, and missing replies suggest packet loss or an unreachable host.
ping -c 4 example.comReading Ping Output
Ping reports time per packet and a summary with packet loss and min/avg/max round-trip times. Consistent times mean a healthy path; jitter or loss points to network trouble.
The TTL Field
Every IP packet carries a Time To Live (TTL) that decrements at each router. When it hits zero the router drops the packet and sends back an ICMP Time Exceeded message. Traceroute exploits exactly this.
How Traceroute Works
traceroute sends packets with increasing TTL: 1, then 2, then 3. Each router along the path returns a Time Exceeded message, revealing the hops between you and the destination.
traceroute example.comReading Traceroute Hops
Each line is one hop with three timing samples. Asterisks mean no reply from that hop, which can be normal if a router is configured not to answer.
When ICMP Is Blocked
Many firewalls drop ICMP for security. A failed ping does not always mean the host is down; it may simply not answer Echo Requests. Verify with a TCP-based check too.
traceroute -T -p 443 example.comContinuous Monitoring
For ongoing path monitoring, mtr combines ping and traceroute, continuously updating per-hop loss and latency, which is excellent for spotting an intermittent bad hop.
mtr example.comSetting Packet Size
You can vary the ping payload size to test how a path handles larger packets, which helps uncover MTU or fragmentation issues.
ping -c 4 -s 1400 example.comQuick Check
Test your ICMP knowledge.
Recap
You learned the role of ICMP.
- ICMP carries control/error messages for IP, with no ports.
- Ping uses Echo Request/Reply for reachability and latency.
- Traceroute uses TTL and Time Exceeded to map the path; blocked ICMP can hide a live host.
AI チューターと学ぶ Linux Networking & TCP/IP for Developers — 無料
ブラウザでリアルコードを書いて実行し、24/7 の AI チューターから瞬時にサポートを受け、ウェブまたはアプリで続きから学習できます。
- コース
- 12
- レッスン
- 48
よくある質問
「ICMPとPing・Tracerouteの役割」レッスンは無料ですか?
はい。「ICMPとPing・Tracerouteの役割」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、Linux Networking & TCP/IP for Developersコースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 Linux Networking & TCP/IP for Developersコースには全4レッスンが含まれています。
「ICMPとPing・Tracerouteの役割」で何を学びますか?
IPと並んで機能する制御プロトコルであるICMPと、pingやtracerouteが到達性やルーティングの診断にICMPを使う仕組みを理解します。 ブラウザで直接実行するハンズオンコードでLinux Networking & TCP/IP for Developersを演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。
Linux Networking & TCP/IP for Developersを始めるのに経験は必要ですか?
事前経験は必要ありません。CoddyKitのLinux Networking & TCP/IP for Developersは初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン4/4です。
「ICMPとPing・Tracerouteの役割」レッスンにはどのくらい時間がかかりますか?
ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。
このLinux Networking & TCP/IP for Developersレッスンでコードを書いて実行できますか?
はい。すべてのLinux Networking & TCP/IP for Developersレッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。
このコースのすべてのレッスン
- TCP/IPモデルを理解する
- IPアドレスとサブネット化
- TCPとUDPの基礎
- ICMPとPing・Tracerouteの役割