Networking for vibe coders
Networking from scratch on a live diagram: from home Wi-Fi to your own site on the internet
- Router. How a phone gets online — Devices at home talk through the router, and the internet is many networks joined together. Connect a phone to the home Wi-Fi.
- IP address. Every device has its own — Every device on the network has its own address — an IP address — and the router hands it out. Find the laptop’s address and connect a printer.
- DNS. A site’s name and its address — DNS turns a site’s name into an address, like the contacts on your phone. Fix a site that “won’t open”.
- Ping and hops. An envelope’s way through several routers — The way to a site is a chain of routers, and ping checks the connection. Find the stretch where the connection is lost.
- Wi-Fi. Why the signal is weak — Range, walls and two bands: 2.4 and 5 GHz. Set up the Wi-Fi so it reaches the kitchen.
- Ports and localhost. Flats in one building — One computer runs many programs, and each has its own number — a port. Open your dev server from your phone.
- TCP/IP. An envelope in an envelope — The envelope from lesson 1 is really several nested envelopes: layers and MAC addresses. Take the envelope’s journey apart layer by layer.
- Routing and gateway. How an envelope finds its way — Everything “not for our home” a device hands to the gateway, and traceroute shows which routers the envelope passes next. Bring the internet back to a laptop with a wrong gateway.
- NAT and port forwarding. One address for the whole home — The whole home goes online under one router address — that is NAT. Let a friend into the game on your computer with port forwarding.
- DNS records. Your own domain for a site — A domain is pointed at a server with DNS records, and directories keep the old answer until its TTL runs out. Point your own domain at your own server.
- HTTPS and certificates. The padlock in the address bar — What the padlock in the browser protects, and why a certificate can be invalid.
- Firewall. A doorman at the server’s door — A firewall lets into a port only those its list of firewall rules allows. Everything that is not allowed is closed.
- VPN. A tunnel to the office network — A VPN carries your envelopes inside other envelopes to the office VPN gateway. Send into the tunnel only what needs to go there.
- localhost, Docker and tunnels. A developer’s network — The Docker network, port mapping and a tunnel to show your dev server to others.
- Troubleshooting. Finding the fault from the bottom up — A network in the fog: use symptoms and commands to find what broke.
- Deploy. Final project: your site on the internet — To ship a project is to open to the outside exactly what everyone needs, and not one door more.