Cross-Platform Networking Command-Line Skills: A Practical Tutorial

View this project on GitHub

Understanding Networking Commands

Networking commands via the Command-Line Interface (CLI) allow IT professionals to effectively diagnose, troubleshoot, and manage network connections by offering detailed insights and real-time control over network environments.


1. Displaying Network Configuration

Quickly retrieving network interface configurations and IP details to address network connectivity and configuration issues promptly.

Windows:
ipconfig /all
ipconfig /release
ipconfig /renew
ipconfig /flushdns

ipconfig-all.PNG
ipconfig-flushdns.PNG
ipconfig-renew-release.PNG
      

Linux:
ifconfig
ip a
sudo dhclient -r
sudo dhclient
sudo systemctl restart NetworkManager

Scenarios for use: IP acquisition issues, outdated DNS cache.
    
ipconfig.png ipa.png dhcp.png RestartNM.png


2. ARP Table Inspection

Inspecting ARP tables to correlate IP addresses with MAC addresses.

arp -a

Benefits: Identify devices, troubleshoot connectivity, detect unauthorized devices.

arp-a.PNG


3. Domain Name Resolution (DNS Lookup)

Resolving domain names to IP addresses for verifying DNS records.

Windows:
nslookup example.com
nslookup -type=mx example.com
nslookup -type=ns example.com

nslookup1.PNG
nslookup2.PNG
nslookup3.PNG

Linux:
host google.com
host -t MX example.com
host -t NS example.com
dig example.com
dig MX example.com
dig NS example.com

host.png
dig1.png
dig2.png
dig3.png

Troubleshooting scenarios: DNS misconfigurations, email delivery issues.
    




4. Network Statistics and Active Connections

Monitoring current connections and ports.

Windows:
netstat -a
netstat -an
netstat -b

netstat1.PNG
netstat3.PNG
netstat-an.PNG


Linux:
netstat -an
ss -tuln

netstat.png
ss.png

Applicable scenarios: Unauthorized connections, port conflicts
    



5. Ping

Testing connectivity and measuring latency.

Windows:
ping example.com
ping -n 10 example.com
ping -t example.com
ping -l 1500 example.com

ping.PNG
Ping2.PNG
ping3.PNG
[omg4.PNG
    

Linux:
ping -c 4 example.com
ping -i 0.5 example.com
ping -s 100 example.com
ping -M do -s 1472 example.com

ping1.png
ping2.png
ping3.png
ping4.png


      
    

6. Trace Routing

Systematically analyzing the route network packets take.

Windows:
tracert google.com
tracert.PNG
    

Linux:
traceroute example.com
traceroute.png



Scenarios for use: Slow connectivity, network outages
    


7. Pathping

Comprehensive analysis of latency and packet loss.

Windows:
pathping example.com

pathping.PNG
    

Linux (using MTR):
mtr example.com
mtr.png"

    

Additional Useful Commands

Route (View routing tables):

Windows:
route print

routeprint.PNG
      

Linux:
route -n
ip route
route.png
    

Hostname (View or change hostname):

Windows:
hostname

hostname.PNG

Linux:
hostname
sudo hostnamectl set-hostname new-hostname
hostname.png
      
    

Mastering these networking commands significantly empowers IT professionals to diagnose, troubleshoot, and optimize network environments. This guide provided practical usage and scenarios for each command, delivering crucial insights into network performance and maintenance.

Back to Home