Linux Networking & TCP/IP for Developers · درس

‏ICMP ودور Ping وTraceroute

افهم بروتوكول التحكم ICMP الموجود إلى جانب IP، وكيف يستخدمه ping وtraceroute لتشخيص إمكانية الوصول والتوجيه.

الدرس 4 من 413 خطوة

‏ICMP ودور Ping وTraceroute درس مجاني في Linux Networking & TCP/IP for Developers على CoddyKit. هذا هو الدرس 4 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في 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.com

Reading 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.com

Reading 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.com

Continuous 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.com

Setting 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.com

Quick 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.
البدء مجانًا

تعلم Linux Networking & TCP/IP for Developers مع معلم ذكاء اصطناعي — مجانًا

اكتب وقم بتشغيل أكوادك الفعلية في المتصفح، واحصل على مساعدة فورية من معلم ذكاء اصطناعي متاح 24/7، واستمر من حيث توقفت على الويب أو في التطبيق.

الدورات
12
الدروس
48

الأسئلة الشائعة

هل درس «‏ICMP ودور Ping وTraceroute» مجاني؟

نعم — نص درس «‏ICMP ودور Ping وTraceroute» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة Linux Networking & TCP/IP for Developers، انتقل إلى CoddyKit PRO. تتضمن دورة Linux Networking & TCP/IP for Developers 4 دروس في المجموع.

ماذا ستتعلم في «‏ICMP ودور Ping وTraceroute»؟

افهم بروتوكول التحكم ICMP الموجود إلى جانب IP، وكيف يستخدمه ping وtraceroute لتشخيص إمكانية الوصول والتوجيه. تتمرن على Linux Networking & TCP/IP for Developers مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.

هل أحتاج إلى خبرة سابقة لأبدأ Linux Networking & TCP/IP for Developers؟

لا تُشترط خبرة سابقة. Linux Networking & TCP/IP for Developers على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 4 من أصل 4.

كم من الوقت يستغرق درس «‏ICMP ودور Ping وTraceroute»؟

معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.

هل يمكنني كتابة وتشغيل أكواد في درس Linux Networking & TCP/IP for Developers هذا؟

نعم. كل درس في Linux Networking & TCP/IP for Developers يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.

جميع الدروس في هذه الدورة

  1. فهم نموذج TCP/IP
  2. عنونة IP وتقسيم الشبكات
  3. أساسيات TCP وUDP
  4. ‏ICMP ودور Ping وTraceroute
← العودة إلى Linux Networking & TCP/IP for Developers