<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Fatih Mert Doğancan</title>
    <description>The latest articles on DEV Community by Fatih Mert Doğancan (@0xfd3495).</description>
    <link>https://dev.to/0xfd3495</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3572291%2F462c6d60-5702-45a0-9e99-04b6588c3a68.png</url>
      <title>DEV Community: Fatih Mert Doğancan</title>
      <link>https://dev.to/0xfd3495</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/0xfd3495"/>
    <language>en</language>
    <item>
      <title>I started writing at the end :). It is my first post, please give me an feedback.</title>
      <dc:creator>Fatih Mert Doğancan</dc:creator>
      <pubDate>Wed, 26 Nov 2025 14:09:28 +0000</pubDate>
      <link>https://dev.to/0xfd3495/i-started-writing-at-the-end-it-is-my-first-post-please-give-me-an-feedback-27o8</link>
      <guid>https://dev.to/0xfd3495/i-started-writing-at-the-end-it-is-my-first-post-please-give-me-an-feedback-27o8</guid>
      <description>&lt;p&gt;

&lt;/p&gt;
&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/0xfd3495/deep-dive-into-the-internet-the-anatomy-of-network-diagnostics-with-icmp-ping-and-mtr-1cpi" class="crayons-story__hidden-navigation-link"&gt;Deep Dive into the Internet: The Anatomy of Network Diagnostics with ICMP, Ping, and MTR&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/0xfd3495" class="crayons-avatar  crayons-avatar--l  "&gt;
            &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3572291%2F462c6d60-5702-45a0-9e99-04b6588c3a68.png" alt="0xfd3495 profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/0xfd3495" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Fatih Mert Doğancan
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Fatih Mert Doğancan
                
              
              &lt;div id="story-author-preview-content-3061136" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/0xfd3495" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&gt;
                        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3572291%2F462c6d60-5702-45a0-9e99-04b6588c3a68.png" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Fatih Mert Doğancan&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/0xfd3495/deep-dive-into-the-internet-the-anatomy-of-network-diagnostics-with-icmp-ping-and-mtr-1cpi" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Nov 26 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/0xfd3495/deep-dive-into-the-internet-the-anatomy-of-network-diagnostics-with-icmp-ping-and-mtr-1cpi" id="article-link-3061136"&gt;
          Deep Dive into the Internet: The Anatomy of Network Diagnostics with ICMP, Ping, and MTR
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/networking"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;networking&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/icmp"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;icmp&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/mtr"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;mtr&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/ping"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;ping&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/0xfd3495/deep-dive-into-the-internet-the-anatomy-of-network-diagnostics-with-icmp-ping-and-mtr-1cpi" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;1&lt;span class="hidden s:inline"&gt; reaction&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/0xfd3495/deep-dive-into-the-internet-the-anatomy-of-network-diagnostics-with-icmp-ping-and-mtr-1cpi#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              &lt;span class="hidden s:inline"&gt;Add Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            16 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;




</description>
      <category>networking</category>
      <category>icmp</category>
      <category>mtr</category>
      <category>ping</category>
    </item>
    <item>
      <title>Deep Dive into the Internet: The Anatomy of Network Diagnostics with ICMP, Ping, and MTR</title>
      <dc:creator>Fatih Mert Doğancan</dc:creator>
      <pubDate>Wed, 26 Nov 2025 13:51:27 +0000</pubDate>
      <link>https://dev.to/0xfd3495/deep-dive-into-the-internet-the-anatomy-of-network-diagnostics-with-icmp-ping-and-mtr-1cpi</link>
      <guid>https://dev.to/0xfd3495/deep-dive-into-the-internet-the-anatomy-of-network-diagnostics-with-icmp-ping-and-mtr-1cpi</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;When we talk about the Internet, it's so important that saying "it's used like this, it's a must-have" would sound too simple. We'll take a look at how the magic behind the internet actually works. What's happening in the background when you visit a webpage, send a message, or watch a video?&lt;/p&gt;

&lt;p&gt;In this guide, we'll take a journey from the basics of the internet towards the most important building blocks of network diagnostic tools. We'll examine the ICMP protocol, ping command, and advanced network diagnostics tool MTR in depth. We're looking under the hood.&lt;/p&gt;




&lt;h2&gt;
  
  
  History and Evolution of the Internet
&lt;/h2&gt;

&lt;h3&gt;
  
  
  ARPANET: Where It All Started (1969)
&lt;/h3&gt;

&lt;p&gt;The story of the internet begins in the late 1960s during the Cold War era. The Advanced Research Projects Agency (ARPA) unit of the US Department of Defense wanted to develop a communication network that could withstand a nuclear attack.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Core Design Philosophy:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Decentralized Structure:&lt;/strong&gt; There was no single point of control&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Packet Switching:&lt;/strong&gt; The revolutionary idea of Paul Baran and Donald Davies&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Redundancy:&lt;/strong&gt; If one connection broke, there should be alternative paths&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On October 29, 1969, the first message was sent from UCLA to Stanford Research Institute. The first word to be transmitted was supposed to be "LOGIN", but the system crashed after the letters "LO" - one of history's most meaningful system crashes :D&lt;/p&gt;

&lt;h3&gt;
  
  
  Birth of TCP/IP (1970s)
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1974:&lt;/strong&gt; Vint Cerf and Bob Kahn started working on "Transmission Control Protocol" (TCP).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Main Problem:&lt;/strong&gt; How will different networks talk to each other?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Different hardware&lt;/li&gt;
&lt;li&gt;Different protocols&lt;/li&gt;
&lt;li&gt;Different error management strategies&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Solution:&lt;/strong&gt; A universal protocol layer - TCP/IP&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1983:&lt;/strong&gt; ARPANET switched from NCP protocol to TCP/IP. This date is called "Flag Day" and is considered the birth date of the modern internet.&lt;/p&gt;




&lt;h2&gt;
  
  
  How Does the Internet Work? Down the Rabbit Hole
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Packet Switching: The Foundation of Internet
&lt;/h3&gt;

&lt;p&gt;Traditional telephone systems had "circuit switching" - a dedicated line was established between caller and called. The Internet works differently though.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How Does Packet Switching Work?&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Original Data: "Hello World!"
↓
Split into Packets:
[Packet 1: "Hell"] [Packet 2: "o Wo"] [Packet 3: "rld!"]
↓
Each packet is routed independently
↓
Reassembled at destination
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Advantages:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Flexibility: If one path is blocked, it goes through another&lt;/li&gt;
&lt;li&gt;Efficiency: Bandwidth is shared&lt;/li&gt;
&lt;li&gt;Reliability: A single failure doesn't crash the entire system&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  TCP/IP Model: 4-Layer Architecture
&lt;/h3&gt;

&lt;p&gt;The Internet is built on a layered architecture. Each layer serves the layer above it and uses the services of the layer below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌─────────────────────────────────────┐
│   4. Application Layer              │
│   (HTTP, FTP, SMTP, DNS)            │
├─────────────────────────────────────┤
│   3. Transport Layer                │
│   (TCP, UDP)                        │
├─────────────────────────────────────┤
│   2. Internet Layer                 │
│   (IP, ICMP, IGMP)                  │
├─────────────────────────────────────┤
│   1. Network Interface Layer        │
│   (Ethernet, Wi-Fi)                 │
└─────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  1. Network Interface Layer (Link Layer)
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Task:&lt;/strong&gt; Data transmission over physical network&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Technologies:&lt;/strong&gt; Ethernet, Wi-Fi, Fiber optic&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MAC Address:&lt;/strong&gt; Physical hardware address (e.g., &lt;code&gt;00:1B:44:11:3A:B7&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  2. Internet Layer
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Task:&lt;/strong&gt; Routing of packets&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Main Protocol:&lt;/strong&gt; IP (Internet Protocol)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ICMP:&lt;/strong&gt; Works at this layer! (Control and error messages)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;IP Address Structure:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;IPv4: 192.168.1.100 (32-bit, ~4.3 billion addresses)
      [Network Part].[Host Part]

IPv6: 2001:0db8:85a3:0000:0000:8a2e:0370:7334 (128-bit, ~340 undecillion addresses)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  3. Transport Layer
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;TCP:&lt;/strong&gt; Reliable, ordered, error-free transmission (e.g., web pages, email)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;UDP:&lt;/strong&gt; Fast but unreliable transmission (e.g., video streaming, DNS)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;TCP vs UDP:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;TCP: If packet is lost, resend it, ordering guaranteed
     [SYN] → [SYN-ACK] → [ACK] (Three-way handshake)
     Slow but reliable

UDP: Send packet and forget. If it's lost, it's lost
     Fast but unreliable
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h5&gt;
  
  
  Note
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;SYN &lt;em&gt;(Synchronize)&lt;/em&gt;&lt;/strong&gt;: The "Shall we establish a connection?" request sent by the side initiating communication.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ACK &lt;em&gt;(Acknowledgment)&lt;/em&gt;&lt;/strong&gt;: The "OK, I received it" confirmation that verifies the previous message was received without problems.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SYN-ACK&lt;/strong&gt;: The server's way of saying "I received your request (ACK) and I'm ready too (SYN)".&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  4. Application Layer
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;HTTP/HTTPS:&lt;/strong&gt; Web&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SMTP/POP3/IMAP:&lt;/strong&gt; Email&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;FTP:&lt;/strong&gt; File transfer&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DNS:&lt;/strong&gt; Domain name resolution&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SSH:&lt;/strong&gt; Secure remote connection&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Routing: How Do Packets Find Their Way?
&lt;/h3&gt;

&lt;p&gt;Each router keeps a "routing table":&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;ip route show
default via 192.168.1.1 dev eth0
192.168.1.0/24 dev eth0 proto kernel scope &lt;span class="nb"&gt;link &lt;/span&gt;src 192.168.1.100
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;OS&lt;/th&gt;
&lt;th&gt;Status / Required Package&lt;/th&gt;
&lt;th&gt;Equivalent&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Linux&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;iproute2&lt;/code&gt; (Usually comes pre-installed)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;ip route show&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Windows&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Native command (CMD / PowerShell)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;route print&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;macOS&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Native command (or &lt;code&gt;brew install iproute2mac&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;netstat -rn&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Routing Process:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Packet arrives at router&lt;/li&gt;
&lt;li&gt;Router looks at destination IP address&lt;/li&gt;
&lt;li&gt;Selects most suitable path from routing table&lt;/li&gt;
&lt;li&gt;Sends packet to next hop (next router)&lt;/li&gt;
&lt;li&gt;This process repeats until destination is reached&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Example Journey:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Istanbul → Frankfurt → London → New York

Your computer in Istanbul:
  ↓ (Send packet: destination 93.184.216.34)
Internet Service Provider (ISP) Router
  ↓ (Best route: Frankfurt)
Frankfurt Backbone Router
  ↓ (Through Atlantic cable)
New York Router
  ↓
Destination Server (93.184.216.34)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each router only knows the next step - not the entire path. This "distributed intelligence" approach is the key to internet scalability.&lt;/p&gt;




&lt;h2&gt;
  
  
  ICMP Protocol: The Nervous System of the Internet
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is ICMP?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Internet Control Message Protocol (ICMP)&lt;/strong&gt; is part of the IP protocol but serves a different purpose:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Doesn't carry data&lt;/li&gt;
&lt;li&gt;Transmits error notifications&lt;/li&gt;
&lt;li&gt;Sends network diagnostic messages&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;History:&lt;/strong&gt; Defined by RFC 792 (1981) - by Jon Postel&lt;/p&gt;

&lt;h3&gt;
  
  
  Why is ICMP Needed?
&lt;/h3&gt;

&lt;p&gt;IP protocol works with "best-effort" principle:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Doesn't guarantee packet delivery&lt;/li&gt;
&lt;li&gt;Doesn't report errors&lt;/li&gt;
&lt;li&gt;Doesn't provide flow control&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;ICMP fills this gap!&lt;/p&gt;

&lt;h3&gt;
  
  
  ICMP Message Structure
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Type      |     Code      |          Checksum             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         Rest of Header                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                         Data Section                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Important ICMP Message Types
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Type 0/8: Echo Reply / Echo Request (PING)
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Type 8: Echo Request (Sending ping)
Type 0: Echo Reply (Pong response)

Usage: Checking if host is alive
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Type 3: Destination Unreachable
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Code 0: Network Unreachable (Can't reach network)
Code 1: Host Unreachable (Can't reach host)
Code 2: Protocol Unreachable (Protocol not supported)
Code 3: Port Unreachable (Port closed)
Code 4: Fragmentation Needed (Packet too large, fragmentation needed)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example Scenario:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;curl http://192.168.1.250:8080
&lt;span class="c"&gt;# Router responds:&lt;/span&gt;
ICMP Type 3, Code 1: Host Unreachable
&lt;span class="c"&gt;# Result: Host doesn't exist on network or is down&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Type 11: Time Exceeded
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Code 0: TTL Exceeded in Transit (Foundation of Traceroute!)
Code 1: Fragment Reassembly Time Exceeded
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;TTL (Time To Live) Mechanism:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Packet sent: TTL=64
Each time passing through router: TTL-1
When TTL=0: Returns ICMP Time Exceeded

This way packets don't loop forever!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Type 5: Redirect
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"There's a better route!" message
Router suggesting routing optimization to host
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Type 30: Traceroute
&lt;/h4&gt;

&lt;p&gt;Used for modern traceroute implementations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Security Aspect of ICMP
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Potential Threats:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;ICMP Flood (Smurf Attack)&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Attacker → Ping to broadcast IP (fake source IP: victim)
All hosts on network → Ping reply to victim
Result: DDoS
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;ICMP Redirect Attacks&lt;/strong&gt;&lt;br&gt;
Redirecting traffic with fake redirect messages&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Ping of Death&lt;/strong&gt;&lt;br&gt;
Buffer overflow by sending excessively large ICMP packets&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Protection Methods:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ICMP rate limiting&lt;/li&gt;
&lt;li&gt;Blocking unnecessary ICMP types in firewall&lt;/li&gt;
&lt;li&gt;Disabling ICMP redirect messages
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Disabling ICMP redirect on Linux&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;sysctl &lt;span class="nt"&gt;-w&lt;/span&gt; net.ipv4.conf.all.accept_redirects&lt;span class="o"&gt;=&lt;/span&gt;0
&lt;span class="nb"&gt;sudo &lt;/span&gt;sysctl &lt;span class="nt"&gt;-w&lt;/span&gt; net.ipv4.conf.all.send_redirects&lt;span class="o"&gt;=&lt;/span&gt;0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Ping Command: The Heart of Network Diagnostics
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is Ping?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Ping&lt;/strong&gt; is a network diagnostic tool that uses the ICMP Echo Request/Reply mechanism. Its name comes from the "ping" sound of submarine sonar - it sends a signal and listens for the echo.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Developer:&lt;/strong&gt; Mike Muuss (1983) - BBN Technologies&lt;/p&gt;

&lt;h3&gt;
  
  
  How Does Ping Work?
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌─────────────┐                           ┌─────────────┐
│   Source    │                           │   Target    │
│   (Your     │                           │  (example.  │
│  Computer)  │                           │    com)     │
└──────┬──────┘                           └──────┬──────┘
       │                                         │
       │ ICMP Echo Request (Type 8)              │
       │ Seq=1, ID=12345, Payload=56 bytes       │
       │                                         │
       │────────────────────────────────────────&amp;gt;│
       │                                         │
       │         ICMP Echo Reply (Type 0)        │
       │         Seq=1, ID=12345                 │
       │                                         │
       │&amp;lt;────────────────────────────────────────│
       │                                         │
       │ ICMP Echo Request (Type 8)              │
       │ Seq=2, ID=12345                         │
       │                                         │
       │────────────────────────────────────────&amp;gt;│
       │                                         │
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step by Step:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Ping converts target hostname to IP via DNS&lt;/li&gt;
&lt;li&gt;Creates ICMP Echo Request packet (Type 8)&lt;/li&gt;
&lt;li&gt;Adds sequence number and timestamp to packet&lt;/li&gt;
&lt;li&gt;Sends packet to target&lt;/li&gt;
&lt;li&gt;Target responds with Echo Reply (Type 0)&lt;/li&gt;
&lt;li&gt;Ping calculates round-trip time (RTT)&lt;/li&gt;
&lt;li&gt;Shows statistics&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Basic Ping Usage
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Simplest Usage
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;ping google.com

PING google.com &lt;span class="o"&gt;(&lt;/span&gt;172.217.169.46&lt;span class="o"&gt;)&lt;/span&gt; 56&lt;span class="o"&gt;(&lt;/span&gt;84&lt;span class="o"&gt;)&lt;/span&gt; bytes of data.
64 bytes from sof02s42-in-f14.1e100.net &lt;span class="o"&gt;(&lt;/span&gt;172.217.169.46&lt;span class="o"&gt;)&lt;/span&gt;: &lt;span class="nv"&gt;icmp_seq&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1 &lt;span class="nv"&gt;ttl&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;117 &lt;span class="nb"&gt;time&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;15.2 ms
64 bytes from sof02s42-in-f14.1e100.net &lt;span class="o"&gt;(&lt;/span&gt;172.217.169.46&lt;span class="o"&gt;)&lt;/span&gt;: &lt;span class="nv"&gt;icmp_seq&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;2 &lt;span class="nv"&gt;ttl&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;117 &lt;span class="nb"&gt;time&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;14.8 ms
64 bytes from sof02s42-in-f14.1e100.net &lt;span class="o"&gt;(&lt;/span&gt;172.217.169.46&lt;span class="o"&gt;)&lt;/span&gt;: &lt;span class="nv"&gt;icmp_seq&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;3 &lt;span class="nv"&gt;ttl&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;117 &lt;span class="nb"&gt;time&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;15.1 ms
^C
&lt;span class="nt"&gt;---&lt;/span&gt; google.com ping statistics &lt;span class="nt"&gt;---&lt;/span&gt;
3 packets transmitted, 3 received, 0% packet loss, &lt;span class="nb"&gt;time &lt;/span&gt;2003ms
rtt min/avg/max/mdev &lt;span class="o"&gt;=&lt;/span&gt; 14.800/15.033/15.200/0.172 ms
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output Analysis:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Field&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;64 bytes&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;ICMP packet size (excluding IP header)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;icmp_seq=1&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Sequence number (for packet loss detection)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;ttl=117&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Time To Live - how many more routers can it pass through&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;time=15.2 ms&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Round-Trip Time&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Real World Ping Examples and Analysis
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Example 1: Healthy Connection
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;ping &lt;span class="nt"&gt;-c&lt;/span&gt; 5 google.com

PING google.com &lt;span class="o"&gt;(&lt;/span&gt;142.250.185.46&lt;span class="o"&gt;)&lt;/span&gt; 56&lt;span class="o"&gt;(&lt;/span&gt;84&lt;span class="o"&gt;)&lt;/span&gt; bytes of data.
64 bytes from lhr25s35-in-f14.1e100.net: &lt;span class="nv"&gt;icmp_seq&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1 &lt;span class="nv"&gt;ttl&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;117 &lt;span class="nb"&gt;time&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;14.2 ms
64 bytes from lhr25s35-in-f14.1e100.net: &lt;span class="nv"&gt;icmp_seq&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;2 &lt;span class="nv"&gt;ttl&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;117 &lt;span class="nb"&gt;time&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;13.9 ms
64 bytes from lhr25s35-in-f14.1e100.net: &lt;span class="nv"&gt;icmp_seq&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;3 &lt;span class="nv"&gt;ttl&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;117 &lt;span class="nb"&gt;time&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;14.1 ms
64 bytes from lhr25s35-in-f14.1e100.net: &lt;span class="nv"&gt;icmp_seq&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;4 &lt;span class="nv"&gt;ttl&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;117 &lt;span class="nb"&gt;time&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;14.3 ms
64 bytes from lhr25s35-in-f14.1e100.net: &lt;span class="nv"&gt;icmp_seq&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;5 &lt;span class="nv"&gt;ttl&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;117 &lt;span class="nb"&gt;time&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;14.0 ms

&lt;span class="nt"&gt;---&lt;/span&gt; google.com ping statistics &lt;span class="nt"&gt;---&lt;/span&gt;
5 packets transmitted, 5 received, 0% packet loss, &lt;span class="nb"&gt;time &lt;/span&gt;4006ms
rtt min/avg/max/mdev &lt;span class="o"&gt;=&lt;/span&gt; 13.937/14.100/14.318/0.143 ms
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Analysis:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;✅ 0% packet loss - Perfect \&lt;br&gt;
    ✅ Consistent RTT (~14ms) - Stable connection \&lt;br&gt;
    ✅ Low mdev (0.143ms) - Very little jitter \&lt;br&gt;
    ✅ TTL=117 - Normal (probably started at 128, passed 11 hops)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Result:&lt;/strong&gt; Healthy internet connection&lt;/p&gt;

&lt;h4&gt;
  
  
  Example 2: Packet Loss Present
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;ping &lt;span class="nt"&gt;-c&lt;/span&gt; 10 instable-server.com

PING instable-server.com &lt;span class="o"&gt;(&lt;/span&gt;203.0.113.45&lt;span class="o"&gt;)&lt;/span&gt; 56&lt;span class="o"&gt;(&lt;/span&gt;84&lt;span class="o"&gt;)&lt;/span&gt; bytes of data.
64 bytes from 203.0.113.45: &lt;span class="nv"&gt;icmp_seq&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1 &lt;span class="nv"&gt;ttl&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;54 &lt;span class="nb"&gt;time&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;45.2 ms
64 bytes from 203.0.113.45: &lt;span class="nv"&gt;icmp_seq&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;3 &lt;span class="nv"&gt;ttl&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;54 &lt;span class="nb"&gt;time&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;89.7 ms
64 bytes from 203.0.113.45: &lt;span class="nv"&gt;icmp_seq&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;5 &lt;span class="nv"&gt;ttl&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;54 &lt;span class="nb"&gt;time&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;52.3 ms
64 bytes from 203.0.113.45: &lt;span class="nv"&gt;icmp_seq&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;7 &lt;span class="nv"&gt;ttl&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;54 &lt;span class="nb"&gt;time&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;145.2 ms
64 bytes from 203.0.113.45: &lt;span class="nv"&gt;icmp_seq&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;10 &lt;span class="nv"&gt;ttl&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;54 &lt;span class="nb"&gt;time&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;67.8 ms

&lt;span class="nt"&gt;---&lt;/span&gt; instable-server.com ping statistics &lt;span class="nt"&gt;---&lt;/span&gt;
10 packets transmitted, 5 received, 50% packet loss, &lt;span class="nb"&gt;time &lt;/span&gt;9145ms
rtt min/avg/max/mdev &lt;span class="o"&gt;=&lt;/span&gt; 45.234/80.040/145.234/35.123 ms
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Analysis:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;❌ 50% packet loss - Serious problem! \&lt;br&gt;
    ❌ High RTT variability (mdev=35.123ms) - Unstable connection \&lt;br&gt;
    ❌ Missing sequence numbers (2,4,6,8,9 lost) - Random packet loss&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Possible Causes:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Network congestion&lt;/li&gt;
&lt;li&gt;Low quality ISP connection&lt;/li&gt;
&lt;li&gt;Wireless signal problems&lt;/li&gt;
&lt;li&gt;Router/firewall under load&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Solution Suggestions:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Ping other servers (is problem isolated?)&lt;/li&gt;
&lt;li&gt;Use MTR to find which hop has the loss&lt;/li&gt;
&lt;li&gt;Contact ISP&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Troubleshooting Strategy with Ping
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Systematic Approach:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Loopback test:
   $ ping 127.0.0.1
   ✓ Is TCP/IP stack working?

2. Local machine:
   $ ping $(hostname -I)
   ✓ Is network interface active?

3. Gateway:
   $ ping 192.168.1.1
   ✓ Can I reach local network?

4. DNS server:
   $ ping 8.8.8.8
   ✓ Do I have internet connection?

5. Domain name:
   $ ping google.com
   ✓ Is DNS resolution working?

6. Target server:
   $ ping target-server.com
   ✓ Is target reachable?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  MTR: My Traceroute - Advanced Network Diagnostics Tool
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is MTR?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;MTR (My TraceRoute)&lt;/strong&gt; is a powerful combination of ping and traceroute. Developed by Matt Kimball, it monitors the network path and performance at each hop in real-time.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;MTR is also known as "Matt's TraceRoute".&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  MTR vs Ping vs Traceroute
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Ping&lt;/th&gt;
&lt;th&gt;Traceroute&lt;/th&gt;
&lt;th&gt;MTR&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Target testing&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Path display&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Per-hop statistics&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Real-time&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Packet loss analysis&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Interactive&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;❌&lt;/td&gt;
&lt;td&gt;✅&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  How Does MTR Work?
&lt;/h3&gt;

&lt;p&gt;MTR combines traceroute's TTL trick with ping's continuous monitoring capability:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Send ICMP/UDP packet with TTL=1
   → First router returns "Time Exceeded"
   → First hop determined

2. Send packet with TTL=2
   → Second router returns "Time Exceeded"
   → Second hop determined

3. ... Continues this way

4. Continuously pings each hop
   → Calculates packet loss, latency, jitter
   → Updates real-time statistics
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  MTR Installation
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Debian/Ubuntu&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install &lt;/span&gt;mtr

&lt;span class="c"&gt;# RHEL/CentOS/Fedora&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;yum &lt;span class="nb"&gt;install &lt;/span&gt;mtr

&lt;span class="c"&gt;# macOS&lt;/span&gt;
brew &lt;span class="nb"&gt;install &lt;/span&gt;mtr

&lt;span class="c"&gt;# Windows&lt;/span&gt;
WinMTR download: https://sourceforge.net/projects/winmtr/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Basic MTR Usage
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Simple Usage
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;mtr google.com

&lt;span class="c"&gt;# Or report mode&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;mtr &lt;span class="nt"&gt;--report&lt;/span&gt; &lt;span class="nt"&gt;--report-cycles&lt;/span&gt; 10 google.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Interactive Interface:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                             My traceroute  [v0.95]
localhost (192.168.1.100)                          2024-11-25T10:30:45+0000
Keys:  Help   Display mode   Restart statistics   Order of fields   quit
                                       Packets               Pings
 Host                                Loss%   Snt   Last   Avg  Best  Wrst StDev
 1. _gateway (192.168.1.1)            0.0%    10    1.2   1.3   1.1   1.8   0.2
 2. 10.20.30.1                        0.0%    10    8.4   9.1   7.9  12.3   1.4
 3. 81.213.147.1                      0.0%    10   12.3  13.2  11.8  16.7   1.6
 4. 195.175.193.141                   0.0%    10   14.5  15.1  13.9  18.2   1.3
 5. 72.14.223.66                      0.0%    10   15.2  16.0  14.8  19.1   1.5
 6. 108.170.252.193                   0.0%    10   15.8  16.5  15.1  19.8   1.6
 7. 142.251.226.67                    0.0%    10   16.1  16.8  15.4  20.2   1.7
 8. lhr25s35-in-f14.1e100.net         0.0%    10   15.9  16.4  15.2  19.5   1.4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Column Descriptions:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Column&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Host&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Router/host at each hop (IP + hostname)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Loss%&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Packet loss percentage at that hop&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Snt&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Total number of packets sent&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Last&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Round-trip time of last packet&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Avg&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Average RTT&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Best&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Best (minimum) RTT&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Wrst&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Worst (maximum) RTT&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;StDev&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Standard deviation (jitter indicator)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  MTR Parameters
&lt;/h3&gt;

&lt;h4&gt;
  
  
  1. Report Mode (-r / --report)
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Send 100 packets and generate report&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;mtr &lt;span class="nt"&gt;--report&lt;/span&gt; &lt;span class="nt"&gt;--report-cycles&lt;/span&gt; 100 google.com

Start: 2024-11-25T10:30:45+0000
HOST: localhost                   Loss%   Snt   Last   Avg  Best  Wrst StDev
  1.|-- _gateway                   0.0%   100    1.2   1.3   1.0   3.2   0.3
  2.|-- 10.20.30.1                 0.0%   100    8.5   9.2   7.8  15.6   1.5
  3.|-- 81.213.147.1               0.0%   100   12.4  13.3  11.7  22.1   2.1
  4.|-- 195.175.193.141            0.0%   100   14.6  15.2  13.8  24.5   2.3
  5.|-- 72.14.223.66               1.0%   100   15.3  16.1  14.7  28.9   2.8
  6.|-- 108.170.252.193            0.0%   100   15.9  16.6  15.0  26.7   2.4
  7.|-- 142.251.226.67             0.0%   100   16.2  16.9  15.3  29.3   2.9
  8.|-- lhr25s35-in-f14.1e100.net  0.0%   100   16.0  16.5  15.1  27.8   2.6
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Usage:&lt;/strong&gt; Use in scripts, log analysis&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Interval Setting (-i / --interval)
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Send packet every 5 seconds (default 1 second)&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;mtr &lt;span class="nt"&gt;-i&lt;/span&gt; 5 google.com

&lt;span class="c"&gt;# Fast mode: 0.1 second (requires root)&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;mtr &lt;span class="nt"&gt;-i&lt;/span&gt; 0.1 google.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  3. Packet Size (-s / --psize)
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Send 1000 byte packets&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;mtr &lt;span class="nt"&gt;-s&lt;/span&gt; 1000 google.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  4. IP Version Selection (-4 / -6)
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Force IPv4&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;mtr &lt;span class="nt"&gt;-4&lt;/span&gt; google.com

&lt;span class="c"&gt;# Force IPv6&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;mtr &lt;span class="nt"&gt;-6&lt;/span&gt; google.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  5. Using TCP or UDP (-T / -u)
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Use TCP (default is ICMP)&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;mtr &lt;span class="nt"&gt;-T&lt;/span&gt; &lt;span class="nt"&gt;-P&lt;/span&gt; 80 google.com
&lt;span class="c"&gt;# -P: Port number&lt;/span&gt;

&lt;span class="c"&gt;# Use UDP&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;mtr &lt;span class="nt"&gt;-u&lt;/span&gt; google.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why TCP/UDP?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Some firewalls block ICMP&lt;/li&gt;
&lt;li&gt;TCP/UDP packets better simulate real application traffic&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  6. Maximum Hop Count (-m / --max-ttl)
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Check maximum 20 hops (default 30)&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;mtr &lt;span class="nt"&gt;-m&lt;/span&gt; 20 google.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  7. Disable Hostname Resolution (-n / --no-dns)
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Don't do DNS lookup, show only IP (faster)&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;mtr &lt;span class="nt"&gt;-n&lt;/span&gt; google.com

HOST: localhost                   Loss%   Snt   Last   Avg  Best  Wrst StDev
  1.|-- 192.168.1.1                0.0%    10    1.2   1.3   1.1   1.8   0.2
  2.|-- 10.20.30.1                 0.0%    10    8.4   9.1   7.9  12.3   1.4
  3.|-- 81.213.147.1               0.0%    10   12.3  13.2  11.8  16.7   1.6
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  8. Show AS Number (-z / --aslookup)
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Show AS (Autonomous System) number of each hop&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;mtr &lt;span class="nt"&gt;-z&lt;/span&gt; google.com

HOST: localhost                   Loss%   Snt   Last   Avg  Best  Wrst StDev
  1.|-- _gateway                   0.0%    10    1.2   1.3   1.1   1.8   0.2
  2.|-- AS15897 10.20.30.1         0.0%    10    8.4   9.1   7.9  12.3   1.4
  3.|-- AS15897 81.213.147.1       0.0%    10   12.3  13.2  11.8  16.7   1.6
  4.|-- AS15169 195.175.193.141    0.0%    10   14.5  15.1  13.9  18.2   1.3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;AS Number:&lt;/strong&gt; Each ISP/organization's unique internet routing number&lt;/p&gt;

&lt;h4&gt;
  
  
  9. CSV/JSON/XML Output
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# CSV format&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;mtr &lt;span class="nt"&gt;--csv&lt;/span&gt; &lt;span class="nt"&gt;--report&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt; 10 google.com

&lt;span class="c"&gt;# JSON format&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;mtr &lt;span class="nt"&gt;--json&lt;/span&gt; &lt;span class="nt"&gt;--report&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt; 10 google.com

&lt;span class="c"&gt;# XML format&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;mtr &lt;span class="nt"&gt;--xml&lt;/span&gt; &lt;span class="nt"&gt;--report&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt; 10 google.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  10. Interactive Mode Shortcuts
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;h - Help
d - Change display mode
r - Restart statistics
p - Pause/Unpause
q - Quit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Real World MTR Examples and Analysis
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Example 1: Healthy Connection
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;mtr &lt;span class="nt"&gt;--report&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt; 50 cloudflare.com

Start: 2024-11-25T11:00:00+0000
HOST: localhost                          Loss%   Snt   Last   Avg  Best  Wrst StDev
  1.|-- _gateway &lt;span class="o"&gt;(&lt;/span&gt;192.168.1.1&lt;span class="o"&gt;)&lt;/span&gt;            0.0%    50    1.1   1.2   0.9   2.1   0.2
  2.|-- 10.20.30.1                        0.0%    50    7.8   8.3   7.2  11.2   0.9
  3.|-- 81.213.147.1                      0.0%    50   11.5  12.1  10.8  15.3   1.1
  4.|-- 195.175.193.141                   0.0%    50   13.2  13.8  12.5  17.8   1.2
  5.|-- 104.16.132.229                    0.0%    50    7.8   8.2   7.1  11.5   1.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Analysis:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;✅ 0% loss at all hops \&lt;br&gt;
    ✅ Low and consistent latency \&lt;br&gt;
    ✅ Low StDev (no jitter) \&lt;br&gt;
    ✅ Straight performance line&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Result:&lt;/strong&gt; Excellent connection quality&lt;/p&gt;

&lt;h4&gt;
  
  
  Example 2: Problem at Specific Hop
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;mtr &lt;span class="nt"&gt;--report&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt; 100 problematic-site.com

HOST: localhost                          Loss%   Snt   Last   Avg  Best  Wrst StDev
  1.|-- _gateway                           0.0%   100    1.2   1.3   1.0   2.5   0.2
  2.|-- 10.20.30.1                         0.0%   100    8.4   8.9   7.8  12.1   0.9
  3.|-- 81.213.147.1                      15.0%   100   45.3  52.1  12.3 198.7  34.2
  4.|-- 195.175.193.141                   14.0%   100   56.7  63.4  14.2 215.3  38.9
  5.|-- 203.0.113.1                       13.0%   100   58.9  65.1  15.1 218.9  39.1
  6.|-- target-server.com                 12.0%   100   59.3  65.8  15.5 220.1  39.5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Analysis:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;❌ 15% loss starting from 3rd hop \&lt;br&gt;
    ❌ High StDev (34-39ms) - Serious jitter \&lt;br&gt;
    ❌ Very high worst case (198-220ms) \&lt;br&gt;
    ⚠️ Loss rate gradually decreasing (15% → 12%)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Comment:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;3rd hop is problematic:&lt;/strong&gt; Probably ISP's backbone router&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Loss decreasing:&lt;/strong&gt; Subsequent hops giving low priority to ICMP (ICMP rate limiting)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real problem:&lt;/strong&gt; 3rd hop - Should contact ISP&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Important Note:&lt;/strong&gt; If loss is only at last hop, it's usually not significant (ICMP rate limiting).&lt;/p&gt;

&lt;h3&gt;
  
  
  Advanced MTR Usage
&lt;/h3&gt;

&lt;h4&gt;
  
  
  1. Continuous Monitoring Script
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;
&lt;span class="c"&gt;# mtr-monitor.sh&lt;/span&gt;

&lt;span class="nv"&gt;TARGET&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"critical-server.com"&lt;/span&gt;
&lt;span class="nv"&gt;THRESHOLD&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;5  &lt;span class="c"&gt;# 5% loss threshold&lt;/span&gt;
&lt;span class="nv"&gt;LOG_FILE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"/var/log/mtr-monitor.log"&lt;/span&gt;

&lt;span class="k"&gt;while &lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
    &lt;/span&gt;&lt;span class="nv"&gt;TIMESTAMP&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;date&lt;/span&gt; &lt;span class="s1"&gt;'+%Y-%m-%d %H:%M:%S'&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;

    &lt;span class="c"&gt;# Get MTR report&lt;/span&gt;
    &lt;span class="nv"&gt;REPORT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;mtr &lt;span class="nt"&gt;--report&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt; 20 &lt;span class="nt"&gt;--no-dns&lt;/span&gt; &lt;span class="nv"&gt;$TARGET&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;

    &lt;span class="c"&gt;# Check packet loss&lt;/span&gt;
    &lt;span class="nv"&gt;LOSS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$REPORT&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; | &lt;span class="nb"&gt;tail&lt;/span&gt; &lt;span class="nt"&gt;-1&lt;/span&gt; | &lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="s1"&gt;'{print $3}'&lt;/span&gt; | &lt;span class="nb"&gt;tr&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'%'&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;((&lt;/span&gt; &lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$LOSS&lt;/span&gt;&lt;span class="s2"&gt; &amp;gt; &lt;/span&gt;&lt;span class="nv"&gt;$THRESHOLD&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; | bc &lt;span class="nt"&gt;-l&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt; &lt;span class="o"&gt;))&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
        &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"[&lt;/span&gt;&lt;span class="nv"&gt;$TIMESTAMP&lt;/span&gt;&lt;span class="s2"&gt;] ALERT: Packet loss &lt;/span&gt;&lt;span class="nv"&gt;$LOSS&lt;/span&gt;&lt;span class="s2"&gt;% detected!"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;$LOG_FILE&lt;/span&gt;
        &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$REPORT&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;$LOG_FILE&lt;/span&gt;

        &lt;span class="c"&gt;# Send email/Slack notification&lt;/span&gt;
        &lt;span class="c"&gt;# mail -s "Network Alert" admin@cyclechain.io &amp;lt; $LOG_FILE&lt;/span&gt;
    &lt;span class="k"&gt;fi

    &lt;/span&gt;&lt;span class="nb"&gt;sleep &lt;/span&gt;300  &lt;span class="c"&gt;# Check every 5 minutes&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Interpreting MTR Output: Best Practices
&lt;/h3&gt;

&lt;h4&gt;
  
  
  1. Interpreting Packet Loss
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Loss Only at Last Hop:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Hops 1-7: 0% loss
Hop 8 (destination): 10% loss
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;→ &lt;strong&gt;Probably insignificant&lt;/strong&gt; (ICMP rate limiting)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Loss at Middle Hop:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Hops 1-3: 0% loss
Hop 4: 15% loss
Hops 5-8: 15% loss
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;→ &lt;strong&gt;Serious problem&lt;/strong&gt; - Entire path after hop 4 is affected&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Gradually Increasing Loss:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Hop 1: 0%
Hop 2: 5%
Hop 3: 10%
Hop 4: 15%
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;→ &lt;strong&gt;Chain effect&lt;/strong&gt; - Find first problematic hop&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Latency Pattern Analysis
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Regular Increase (Normal):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Hop 1:  1ms
Hop 2: 10ms (+9ms)
Hop 3: 20ms (+10ms)
Hop 4: 30ms (+10ms)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;→ Each hop adding similar delay - &lt;strong&gt;normal&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sudden Jump:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Hop 1:  1ms
Hop 2: 10ms
Hop 3: 150ms (+140ms!)
Hop 4: 160ms (+10ms)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;→ &lt;strong&gt;Problem at hop 3&lt;/strong&gt; - International connection, load etc.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Decreasing Latency (Abnormal):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Hop 1: 50ms
Hop 2: 30ms (???)
Hop 3: 40ms
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;→ &lt;strong&gt;Asymmetric routing&lt;/strong&gt; or &lt;strong&gt;time synchronization issue&lt;/strong&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  3. Jitter (StDev) Evaluation
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;StDev &amp;lt; 5ms:   Excellent - Ideal for real-time applications
StDev 5-20ms:  Good - Sufficient for most applications
StDev 20-50ms: Medium - May have issues with VoIP
StDev &amp;gt; 50ms:  Bad - Serious instability
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Important for VoIP:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Jitter &amp;gt; 30ms → Voice quality drops&lt;/li&gt;
&lt;li&gt;Latency &amp;gt; 150ms → Delay is noticeable&lt;/li&gt;
&lt;li&gt;Packet loss &amp;gt; 1% → Voice dropouts&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In this guide, we've examined the ICMP protocol, ping command, and MTR tool in depth, starting from the basics of the internet.&lt;/p&gt;

&lt;h3&gt;
  
  
  Summary of What We've Learned:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Internet Architecture&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Flexible and resilient thanks to packet switching&lt;/li&gt;
&lt;li&gt;Layered architecture (TCP/IP) provides modularity&lt;/li&gt;
&lt;li&gt;Routing works with distributed intelligence&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;ICMP Protocol&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Control and error notification layer of IP&lt;/li&gt;
&lt;li&gt;Foundation of tools like ping and traceroute&lt;/li&gt;
&lt;li&gt;Should be used in controlled manner for security&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Ping Command&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Simple but powerful diagnostic tool&lt;/li&gt;
&lt;li&gt;Reachability, latency and loss detection&lt;/li&gt;
&lt;li&gt;First step of systematic troubleshooting&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;MTR Tool&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Advanced version of ping + traceroute&lt;/li&gt;
&lt;li&gt;Real-time, statistical analysis&lt;/li&gt;
&lt;li&gt;Very effective in localizing network problems&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Mastering Yoda &amp;amp; Resources:
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;RFC Documents:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.rfc-editor.org/rfc/rfc791" rel="noopener noreferrer"&gt;RFC 791: Internet Protocol (IP)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.rfc-editor.org/rfc/rfc792" rel="noopener noreferrer"&gt;RFC 792: Internet Control Message Protocol (ICMP)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.rfc-editor.org/rfc/rfc2151" rel="noopener noreferrer"&gt;RFC 2151: A Primer On Internet and TCP/IP Tools and Utilities&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.rfc-editor.org/rfc/rfc4443" rel="noopener noreferrer"&gt;RFC 4443: Internet Control Message Protocol (ICMPv6)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Books:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.amazon.com/TCP-Illustrated-Vol-Addison-Wesley-Professional/dp/0201633469" rel="noopener noreferrer"&gt;"TCP/IP Illustrated, Volume 1" - W. Richard Stevens&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.amazon.com/Computer-Networks-5th-Andrew-Tanenbaum/dp/0132126952" rel="noopener noreferrer"&gt;"Computer Networks" - Andrew S. Tanenbaum&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.tcpipguide.com/" rel="noopener noreferrer"&gt;"The TCP/IP Guide" - Charles M. Kozierok&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Online Tools:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://mtr.sh" rel="noopener noreferrer"&gt;https://mtr.sh&lt;/a&gt; - Web-based MTR&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.subnet-calculator.com" rel="noopener noreferrer"&gt;https://www.subnet-calculator.com&lt;/a&gt; - IP calculation&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://bgp.he.net" rel="noopener noreferrer"&gt;https://bgp.he.net&lt;/a&gt; - BGP routing information&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://ping.pe" rel="noopener noreferrer"&gt;https://ping.pe&lt;/a&gt; - Global Ping &amp;amp; MTR (Colored block visualization)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.uptrends.com/tools/traceroute" rel="noopener noreferrer"&gt;https://www.uptrends.com/tools/traceroute&lt;/a&gt; - Map-based Visual Traceroute&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://maplatency.com" rel="noopener noreferrer"&gt;https://maplatency.com&lt;/a&gt; - Visual Ping Heat Map (Heatmap)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://toolbox.googleapps.com/apps/dig" rel="noopener noreferrer"&gt;https://toolbox.googleapps.com/apps/dig&lt;/a&gt; - Google Admin Dig &amp;amp; Trace&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://tools.keycdn.com/traceroute" rel="noopener noreferrer"&gt;https://tools.keycdn.com/traceroute&lt;/a&gt; - Geo-Location Traceroute&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://radar.cloudflare.com" rel="noopener noreferrer"&gt;https://radar.cloudflare.com&lt;/a&gt; - Cloudflare Radar (Traffic Map)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://lg.ring.nlnog.net" rel="noopener noreferrer"&gt;https://lg.ring.nlnog.net&lt;/a&gt; - Multi-Location Looking Glass (Command line outputs)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://threatmap.fortiguard.com" rel="noopener noreferrer"&gt;https://threatmap.fortiguard.com&lt;/a&gt; - Live Cyber Threat Map (Visual)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Final Word
&lt;/h3&gt;

&lt;p&gt;The Internet is one of the most complex and impressive engineering achievements in human history. Therefore, the tools we examined are the most basic ways to check the health of this massive structure and diagnose problems.&lt;/p&gt;

&lt;p&gt;Pinging is not just sending a packet and waiting for a response; it's being part of the network that connects billions of people together. Every ICMP Echo Request is a small ambassador that embarks on a journey through the nervous system of the internet.&lt;/p&gt;

&lt;p&gt;When you monitor your network with MTR, you're actually observing the data flow over fiber optic cables stretching around the world, giant data centers, and countless routers.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I also published a longer, more detailed version (with extra examples) on my blog: &lt;a href="https://cyclechain.io/blog/en/p/anatomy-of-network-diagnostics-icmp-ping-mtr/" rel="noopener noreferrer"&gt;https://cyclechain.io/blog/en/p/anatomy-of-network-diagnostics-icmp-ping-mtr/&lt;/a&gt; - Deep Dive into the Internet: The Anatomy of Network Diagnostics with ICMP, Ping, and MTR&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>networking</category>
      <category>icmp</category>
      <category>mtr</category>
      <category>ping</category>
    </item>
  </channel>
</rss>
