Networking Toolkit | Resources by Shumbul Arifa

๐Ÿ›ฐ๏ธ Networking Toolkit

The fastest way to make Computer Networks theory click is to run it. This is a hands-on toolkit of copy-paste commands that let you see DNS, TCP, routing, and ports on your own machine, right now.

๐Ÿ“‹ Copy-paste commands ๐Ÿ”— Maps to CN theory ๐ŸชŸ Windows & ๐Ÿง Linux/Mac

See your own network setup

CN: IP addressing, subnets, MAC

Show your IP address, subnet, and network adapters, the identity of your machine on the network.

# Windows
ipconfig /all

# Linux / macOS
ip addr        # (or: ifconfig)

Look for your IPv4 address, subnet mask, default gateway (your router), and MAC (physical) address.

Watch DNS resolve a name to an IP

CN: DNS, application layer

DNS turns a name like github.com into an IP address. These let you watch it happen and see which DNS server answered.

# Windows
nslookup github.com

# Linux / macOS
dig github.com          # detailed
host github.com         # short

Try nslookup github.com 8.8.8.8 to ask Google's DNS specifically, and compare the answer.

Test if a host is reachable (ICMP)

CN: ICMP, round-trip time

Ping sends small ICMP packets and times the round trip, the simplest "is it alive and how far away" test.

# Windows (4 packets by default)
ping github.com

# Linux / macOS (Ctrl+C to stop)
ping github.com

The time in milliseconds is latency. High or wildly varying times hint at network congestion or distance.

Trace the path packets take

CN: routing, hops, TTL

Every packet hops through multiple routers to reach its destination. This reveals each hop on the way, routing made visible.

# Windows
tracert github.com

# Linux / macOS
traceroute github.com   # install if needed: sudo apt install traceroute

Each line is one router (a "hop"). This is the TTL field in action, decremented at every hop until the packet arrives.

See open ports and live connections

CN: ports, TCP states, sockets

Every network service listens on a port. See what is listening and which connections are currently open on your machine.

# Windows
netstat -ano

# Linux / macOS
ss -tulpn        # modern (or: netstat -tulpn)

Notice TCP states like LISTEN and ESTABLISHED, that is the TCP connection lifecycle you read about, live.

Talk to a web server by hand (HTTP)

CN: HTTP, TCP, application layer

A web request is just text sent over TCP. These make an HTTP request and show you the raw response headers, the protocol demystified.

# Any OS with curl
curl -I https://github.com          # headers only
curl -v https://example.com         # verbose: see the TCP + TLS + HTTP steps

The -v flag shows the DNS lookup, TCP connect, TLS handshake, and HTTP exchange in order, the whole stack in one command.

Check if a specific port is open

CN: ports, TCP handshake

Useful for "is the server up on port 443?" Tries to open a TCP connection to one port.

# Linux / macOS (netcat)
nc -zv github.com 443

# Windows PowerShell
Test-NetConnection github.com -Port 443

A success means the TCP three-way handshake completed. A timeout usually means a firewall or a closed port.

Mini challenge: trace a full request

Put it together. Pick any website and, in order:

  1. Resolve its name with nslookup or dig (DNS).
  2. Ping it to measure latency (ICMP).
  3. Trace the route to see the hops (routing).
  4. Run curl -v and watch DNS, TCP, TLS, and HTTP happen.

You just walked the exact path of the classic interview question "what happens when you type a URL and press enter?", except you watched it for real. That is the fastest way to make it stick.

Copy-paste AI prompts

Paste these into any AI chatbot (or this site's โœฆ Ask AI) to go deeper. Fill in the brackets.

๐Ÿ”Ž Explain a command's output
I ran [command, e.g. "traceroute github.com"] and got this output: [paste].
Explain what each part means in plain English, and which Computer Networks concept
(routing, DNS, TCP, etc.) it demonstrates.
๐Ÿงช Diagnose a network problem
My [website / server / connection] is [slow / unreachable]. Give me a step-by-step
checklist of safe, read-only commands (Windows and Linux) to diagnose it, from DNS
to routing to ports, and how to interpret each result.
๐ŸŽ“ Quiz me for interviews
Quiz me on Computer Networks for a fresher SDE interview. Ask one question at a time
(OSI/TCP-IP, TCP vs UDP, HTTP, DNS, "what happens when you type a URL"). After my
answer, tell me if I'm right and add one crisp follow-up.

What to do next

๐ŸŒฑ How to use this

Open a terminal and run these as you read, every command has a Copy button. Each one is tagged with the Computer Networks concept it demonstrates, so theory and practice reinforce each other. For the theory itself, keep the CS Fundamentals guide (Computer Networks section) open alongside. All commands are safe and read-only on your own machine.