Networking#
Networking is the backbone of the internet, services, and systems that communicate, coordinate, orchestrate, and share information. The network is the operator’s battlespace.
The five-layer TCP/IP stack on Linux:
flowchart LR
A["Application HTTP DNS SSH SMTP ..."]
B["Transport TCP UDP"]
C["Network IPv4 IPv6 ICMP"]
D["Link eth0 wlan0 lo"]
E["Physical copper fiber radio"]
A --- B --- C --- D --- E
Question |
Command |
|---|---|
Interfaces and IPs? |
|
Default route? |
|
What is listening locally? |
|
Active connections? |
|
Reachable? |
|
Resolve a name? |
|
Capture packets |
|
Show the firewall |
|
Foundations#
The seven-layer reference. The numbering operators still use as shorthand (L2 switch, L7 proxy).
The protocol stack underneath every networking command. Each layer maps to a Linux data structure.
Connectionless transport. DNS, NTP, DHCP, mDNS, SNMP, syslog, QUIC, VoIP, game traffic.
Packet anatomy. Layer headers, payloads, framing.
Configuration#
On-disk configuration and runtime files. The source of truth for what the box does at the next boot.
NICs, virtual links, bridges, tunnels, loopback.
ip is the modern tool.
Routing table, longest-prefix match, default route, and policy routing.
The default connectivity daemon on most desktops and
many servers. nmcli and connection profiles.
What is listening, what is connected, who owns each
socket. ss and lsof -i.
Can this host talk to that host on that port?
ping, nc, traceroute, mtr.
Name resolution through the system resolver chain.
getent, dig, resolvectl.
Dynamic address handout. IPs, gateways, DNS, hostnames, options on a LAN.
Application protocols#
curl and wget against HTTP. Each method through
both clients with common flags.
The UDP-based transport underneath HTTP/3. Reliability, ordering, encryption, multiplexing.
The encryption layer wrapping almost every modern
protocol. openssl and the ecosystem.
The default operator transport. Encrypted shells, file copy, port forwarding, key-based auth.
How email moves between servers. HELO, MAIL FROM,
RCPT TO, DATA, QUIT.
Legacy network-gear management on UDP 161 / 162. The monitoring backbone and a standing pentest target.
Windows file and printer sharing. Samba, smbclient,
mount.cifs.
The original file transfer protocol. Plaintext, two connections, NAT-hostile. Operators meet it on legacy systems.
Microsoft’s display protocol for graphical remote sessions. TCP/UDP 3389.
Advanced#
Kernel VM running sandboxed programs at network, syscall, tracing, and security hooks.
Operator workflows#
Muscle-memory responses for inventory, triage, and quick capture on contact.