Skip to main content

Micro Cheatsheet

A one‑stop reference for commands, protocols, and troubleshooting tools. It covers Linux, Windows, and cloud‑related networking essentials, so you can quickly diagnose, configure, and secure networks.


Basic Network Configuration

  • View IP & Interfaces
    • ifconfig (Linux, legacy)
    • ip addr show (modern Linux)
    • ip link show → Show interfaces
    • ip link set eth0 up/down → Enable/disable interface
    • ip route show → Display routing table
    • netsh interface ip show config (Windows)
  • Assign IP Address
    • sudo ip addr add 192.168.1.10/24 dev eth0
    • ifconfig eth0 192.168.1.10 netmask 255.255.255.0

Connectivity & Troubleshooting

  • Ping → Test reachability
    • ping google.com
    • ping -c 5 8.8.8.8 (Linux, 5 packets)
    • ping -t 8.8.8.8 (Windows, continuous)
  • Traceroute → Trace packet path
    • traceroute google.com (Linux)
    • tracert google.com (Windows)
  • MTR (My Traceroute) → Continuous path + latency
    • mtr google.com
  • Telnet / nc (Netcat) → Test port connectivity
    • telnet host 80
    • nc -zv host 443

DNS & Host Resolution

  • Check DNS Resolution
    • nslookup example.com
    • dig example.com
    • host example.com
  • Flush DNS Cache
    • sudo systemd-resolve --flush-caches (Linux)
    • ipconfig /flushdns (Windows)

Routing & ARP

  • Routing Table
    • route -n (Linux)
    • netstat -rn (Windows/Linux)
  • Add Default Gateway
    • route add default gw 192.168.1.1
  • ARP Cache
    • arp -n → Show ARP table
    • arp -d 192.168.1.100 → Delete entry

Network Performance Testing

  • Bandwidth Test (iPerf)
    • iperf3 -s → Start server
    • iperf3 -c <server_ip> → Run client test
  • Packet Capture
    • tcpdump -i eth0 → Capture packets
    • tcpdump -i eth0 port 80 → Filter by port
    • wireshark → GUI packet analysis

Security & Firewalls

  • Linux Firewall (iptables/nftables)
    • iptables -L → List rules
    • iptables -A INPUT -p tcp --dport 22 -j ACCEPT → Allow SSH
    • nft list ruleset → Modern firewall
  • Windows Firewall
    • netsh advfirewall show allprofiles
    • netsh advfirewall firewall add rule name="AllowSSH" dir=in action=allow protocol=TCP localport=22

Wireless & Interfaces

  • Wireless Config
    • iwconfig → Show wireless interfaces
    • iwlist wlan0 scan → Scan Wi‑Fi networks
  • Hostname
    • hostname → Show hostname
    • sudo hostnamectl set-hostname newname

Debugging Labs

  1. Connectivity Checkping + traceroute
  2. DNS Failuredig + nslookup
  3. Port Blockednc -zv host port
  4. Packet Lossmtr + iperf3
  5. Suspicious Traffictcpdump + wireshark

Quick Recap

  • Ping/Traceroute = Reachability & path.
  • DNS Tools = Name resolution.
  • Route/ARP = Path & neighbor discovery.
  • iPerf/tcpdump/Wireshark = Performance & packet analysis.
  • Firewalls = Security enforcement.

Tips, Tricks, Roadmaps, Resources, Networking, Motivation, Guidance, and Cool Stuff ♥

Updated on Jan 3, 2026