FeaturesLearnPersonalOSINTThreat MapConsoleDailyShopAccount
[ NET ]// networking cheatsheet

Networking.

How machines actually find and talk to each other — from a single packet's journey to subnets, ports and the attacks that target them. Read the theory, then use the live calculators and references below.

BasicsAddressesA packet's journeyTCP vs UDPSubnettingDNS · DHCP · NATAttacksBest toolsReference
[ 01 ]// what a network actually is

A network is just devices connected so they can exchange data. Each device (a host) splits its data into small packets and hands them off to be relayed, hop by hop, until they reach the destination — like posting thousands of tiny numbered postcards that get reassembled at the other end.

Switch

Connects devices within one local network (a LAN) and forwards frames by MAC address. Think: the wiring inside your house.

Router

Connects different networks together and decides where packets go next by IP address. Your home router joins your LAN to the internet (a WAN).

Packet

A small chunk of data wrapped in headers (who it's from, who it's for, what kind). Big transfers are thousands of packets, reassembled in order.

Protocol

An agreed set of rules so two machines understand each other — HTTP, TCP, IP, DNS. The OSI model (below) stacks them into layers.

The OSI and TCP/IP models below are maps of these layers — each layer only worries about its own job and hands the rest down. A web request rides Application → Transport → Internet → Link on the way out, and back up the stack on the way in.
[ 02 ]// IP & MAC addresses

Every device needs identities at two levels. A MAC address is burned into the network card (e.g. 02:42:0a:00:00:05) and identifies it on the local link. An IP address is assigned by the network and is used to route between networks. ARP is the protocol that maps "I know the IP, what's the MAC?" on a LAN.

TypeExampleRange / note
IPv4192.168.1.5032 bits, ~4.3 billion addresses — now exhausted
IPv62001:db8::7334128 bits, effectively unlimited
Private (LAN)10.x · 172.16–31.x · 192.168.xNot routable on the internet; reused everywhere behind NAT
Loopback127.0.0.1"localhost" — this machine
MAC02:42:0a:00:00:0548 bits; first half identifies the vendor (OUI)
[ 03 ]// the journey of a packet

What happens when you type https://example.com and hit enter:

traceroute / tracert shows you these hops live; ping uses ICMP to test if a host is reachable and how long the round-trip takes.
[ 04 ]// TCP vs UDP & the 3-way handshake

TCP — reliable

Connection-oriented. Guarantees every byte arrives, in order, with retransmission. Used for web, email, file transfer, SSH. Slower setup, rock-solid delivery.

UDP — fast

Connectionless. Fire-and-forget, no guarantees, no handshake. Used for DNS, video calls, games, streaming — where speed beats perfection.

Before TCP sends data it sets up a connection with a 3-way handshake. Watch it:

Client
Server
SYN →Client → Server. "I want to talk, my sequence number is x."
← SYN/ACKServer → Client. "OK, I acknowledge x; my sequence number is y."
ACK →Client → Server. "Acknowledged y. Connection established." Data flows.
A SYN flood attack abuses this: the attacker sends thousands of SYNs but never the final ACK, leaving half-open connections that exhaust the server — a classic DoS.
[ 05 ]// subnetting, explained

An IP address has two parts: the network (which network you're on) and the host (which device). The subnet mask / CIDR prefix draws the line between them.

A /24 means the first 24 bits are the network, leaving 8 bits for hosts → 2⁸ = 256 addresses, minus the network address and broadcast address = 254 usable hosts. Smaller prefixes = bigger networks; larger prefixes = smaller. The network address is the first (all host-bits 0); the broadcast is the last (all host-bits 1) and reaches every host at once.

[ 06 ]// the services that glue it together

DNS — the phonebook

Translates human names (example.com) into IP addresses. Hierarchical: root → .com → example.com. Poisoning or spoofing it sends victims to attacker servers.

DHCP — auto-config

When you join a network, DHCP hands your device an IP, subnet mask, gateway and DNS server automatically. A rogue DHCP server can hijack clients.

NAT — sharing one IP

Your router rewrites private LAN addresses to its one public IP and back. It's why dozens of home devices share a single internet address (and gives a little inbound protection).

[ 07 ]// how networks get attacked
AttackWhat it doesDefense
SniffingReading traffic on the wire (easy on open Wi-Fi / hubs)Encryption (TLS, VPN)
ARP spoofing / MITMFaking ARP replies to sit between victim and gatewayDynamic ARP inspection, static ARP, encryption
DNS spoofingForging DNS answers to redirect victimsDNSSEC, DoH/DoT
Port scanningProbing which ports/services are open (recon)Firewalls, rate-limiting, IDS
(D)DoSFlooding a target so it can't serve real usersFiltering, rate limits, scrubbing services
See these in motion: read a real capture in the Networking Lab, and scan ports safely against your own VM lab.
[ 08 ]// the tools pros actually use

A small kit covers most networking work. Learn these and you can see, map and test almost any network:

Wireshark

The packet analyzer — capture and dissect every frame on the wire. Must-know. CLI sibling: tshark.

nmap

The network scanner — host discovery, port scanning, service & OS detection. Must-know. GUI: Zenmap.

tcpdump

Lightweight CLI packet capture — perfect on servers with no GUI.

netcat (nc)

The "TCP/IP swiss-army knife" — manual connections, listeners, quick transfers and banner grabbing.

dig / nslookup

Query DNS by hand — resolve names, inspect records, debug resolution.

ping · traceroute · iperf3

Test reachability & latency, map the hops to a host, and measure real throughput.

Start with two: Wireshark to see traffic and nmap to map a network. Practice both safely against your own VM lab.
[ 09 ]// interactive reference

Now the hands-on part — a live subnet calculator, the OSI/TCP-IP models, a searchable port table and a CIDR chart.

Subnet calculator
Enter an IP address + CIDR → network, broadcast, usable hosts & mask.
OSI model
7 layers — top (programs) to bottom (cables).
TCP/IP model
The practical 4-layer variant.
Port table
Common ports — searchable by number or service.
PortServiceProtocolDescription
CIDR cheatsheet
Prefix → subnet mask & usable hosts.