← Back to module
LFM
Networking 101 // the basics

A network is a set of machines wired so they can pass data to each other. The point that trips people up: when does traffic go out to the internet, and when does it stay inside the house? Send some and watch the path.

Try it · send traffic and watch where it goes
The internet
everything outside
Router
192.168.8.1 · gateway
Switch
local delivery
Your node
192.168.8.50
Laptop
192.168.8.20
Phone
192.168.8.30
Pick a path above. The hops it lights up are the devices the data actually passes through.

Every device on a network gets an IP address: a number that says where it is. An address has two parts, a network part shared by everything on the same network, and a host part unique to each device. The prefix (the /24) marks where the split falls.

Try it · pick an address, then slide the prefix
■ network■ host■ split
prefix /24

People remember names; machines route by numbers. DNS is the lookup that turns a name into an IP address. Look one up and watch the resolver walk the chain. The steps are how real resolution works; the addresses are examples.

Try it · look up a name
A normal name walks the chain to an answer. node.local never leaves your network. A known tracker is refused by your own resolver. Try all three.

One machine runs many services, so each listens on a numbered door called a port. A door is only reachable when two gates are open: a service is listening behind it, and the firewall lets the connection through. Flip the gates and watch what an outsider can reach.

Try it · toggle the two gates on each port
Each port needs both gates open to be reachable. Flip them and watch the verdict.

This is what default-deny means: the firewall gate starts closed on every port, so a service is never exposed just because it is running. You open a gate only for what you need, only toward yourself.

Not needed to build the node. This is the layer underneath: how the pieces are modeled, what a packet carries, how addresses are carved up, and how networks are shaped.

Two models describe the same journey. The 7-layer OSI model is the teaching reference; the 4-layer TCP/IP model is what the internet actually runs. They map onto each other.

OSI layerTCP/IPDoesExample
7 ApplicationApplicationThe app's own data and rulesHTTP, DNS, SSH
6 PresentationEncoding and encryptionTLS
5 SessionKeeps a conversation opensockets
4 TransportTransportSplits into segments, ports, reliabilityTCP, UDP
3 NetworkInternetAddresses and routes packetsIP, ICMP
2 Data LinkLinkFrames between adjacent devicesEthernet, MAC
1 PhysicalThe wire or radio itselfcabling, wifi

Your data does not travel alone. Each layer wraps it in a header, like nested envelopes. Click a segment to see what it carries.

Ethernet
IP
TCP
Your data
Click a segment above.

A prefix splits an address block into a network and the hosts inside it. Enter an address and prefix to see the real numbers.

/
Subnet mask
Network address
Broadcast
Usable hosts

Usable hosts = 2^(32 − prefix) − 2 (the network and broadcast addresses are reserved). A /24 gives 254; a /30 point-to-point link gives 2.

How the machines are wired together. Your build uses a star.

your build

Star

Every device connects to one central point, your switch and router. Simple, and the standard for a home or small network.

Mesh

Devices connect to many others, so traffic has more than one path. Resilient, but more wiring and overhead.

Bus

All devices share one line. Cheap and old; one break can take down the segment.

Ring

Each device links to two neighbors in a loop. Used in some backbones; a break is routed around.

References: MDN, How the internet works · Cisco, Switch vs Router · Cloudflare, What is DNS