Diagnostic Commands

Learn essential diagnostic commands for network troubleshooting.

πŸ§ͺ Diagnostic Commands

Diagnostic commands are the first tools used by help desk engineers and network administrators. They help identify where the problem is before touching cables or configurationsβ€”especially in networks using Cisco Systems devices.

🟒 1️⃣ ping β€” Connectivity Test

Ping Command Example

πŸ“Œ What Is ping?

ping checks:

ping uses ICMP Echo Request / Echo Reply

πŸ”§ Syntax

    ping google.com
    ping 8.8.8.8
      

πŸ§ͺ Example Outputs

    Reply from 8.8.8.8: time=23ms TTL=118
      
    Request timed out.
      

Possible reasons:

🧠 Troubleshooting Logic with ping

Ping Target Meaning
127.0.0.1TCP/IP stack OK
Own IPNIC working
GatewayLAN OK
Internet IPRouting OK
Domain failsDNS issue
Always ping step-by-step

πŸ–₯️ 2️⃣ ipconfig / ifconfig / ip β€” IP Information

ipconfig Command Output

These commands display:

πŸ”§ Commands by OS

    Windows:
    ipconfig
    ipconfig /all
    
    Linux:
    ifconfig
    ip addr
    
    macOS:
    ifconfig
      

πŸ§ͺ Example (Windows)

    IPv4 Address : 192.168.1.10
    Subnet Mask  : 255.255.255.0
    Default GW   : 192.168.1.1
      

🧠 Common Problems Found

169.254.x.x = DHCP problem

🧭 3️⃣ tracert / traceroute β€” Path Discovery

Traceroute Output Traceroute Hop Analysis

πŸ“Œ What Does It Do?

Shows every router (hop) a packet passes through to reach a destination.

πŸ”§ Commands

    Windows:
    tracert google.com
    
    Linux / macOS:
    traceroute google.com
      

πŸ§ͺ Example Output

    1  192.168.1.1
    2  10.10.0.1
    3  ISP Router
    4  google.com
      

βœ” Helps identify where traffic stops

❌ Asterisk (*) Meaning

    *  *  *
      
Traceroute shows path, not speed

🌐 4️⃣ nslookup β€” DNS Testing Tool

nslookup Command Output DNS Resolution Example

πŸ“Œ What Is nslookup?

nslookup checks DNS resolution and shows which IP address a domain resolves to.

πŸ”§ Syntax

    nslookup google.com
      

πŸ§ͺ Example Output

    Name: google.com
    Address: 142.250.192.14
      

βœ” DNS working correctly

❌ DNS Failure Example

    DNS request timed out
      
IP ping works + name fails β†’ DNS issue

πŸ”₯ 5️⃣ Firewall Impact on Results

Firewall Blocking ICMP Firewall Filtering Traffic Firewall Rules Impact

Firewalls can affect command results even when the network is healthy.

🚫 How Firewalls Affect Commands

Timeout β‰  Network down
Always consider security rules

🧠 Real Help Desk Troubleshooting Flow

  1. ipconfig β†’ Check IP & gateway
  2. ping 127.0.0.1 β†’ TCP/IP check
  3. ping gateway β†’ LAN check
  4. ping 8.8.8.8 β†’ Routing check
  5. nslookup google.com β†’ DNS check
  6. tracert β†’ Path issue

πŸ“Š Diagnostic Commands – Quick Comparison

Command Purpose
pingReachability
ipconfig / ifconfigIP details
tracert / traceroutePath discovery
nslookupDNS resolution
FirewallMay block results