Networking Fundamentals

How the Internet Moves Data

25 min

Every web app, API and SSH session sits on top of the same networking ideas. Understanding them turns "it does not connect" from a mystery into a checklist.

Layers

Networking is built in layers; each one only talks to the layers directly above and below.

Layer What it does Examples
Application the conversation programs have HTTP, DNS, SSH, SMTP
Transport reliable streams or quick messages between programs TCP, UDP
Internet addressing and routing between networks IP (v4 and v6), ICMP
Link moving frames on one local network Ethernet, Wi-Fi

When you debug, work up the layers: is there a link? Can I reach the IP? Is the port open? Does the application answer correctly?

Packets

Data is split into packets. Each carries a source and destination address and travels independently through routers, which forward it one hop closer to its destination. TCP numbers the packets and reassembles them in order, resending any that were lost.

What happens when you open https://pandadevhub.com

  1. DNS: your computer asks a resolver for the domain's IP address.
  2. TCP: it opens a connection to that IP on port 443 (a three-way handshake: SYN, SYN-ACK, ACK).
  3. TLS: client and server agree on encryption and the server proves its identity with a certificate.
  4. HTTP: the browser sends GET / with headers; the server responds with status 200 and HTML.
  5. The browser parses the HTML and repeats steps 1 to 4 (often reusing connections) for CSS, JavaScript and images.

Each step can fail separately, and each has its own tool, which the rest of this track teaches.

Latency and bandwidth

  • Latency: how long one round trip takes (ms). Distance matters: light in fibre needs about 70 ms for a round trip across the Atlantic.
  • Bandwidth: how much data per second.

For most web pages latency matters more than bandwidth, because loading a page needs many round trips. That is why CDNs place copies of files close to users, and why HTTP/2 and HTTP/3 reduce the number of round trips.

Check yourself

  • Name the four layers and one protocol in each.
  • List the four steps before a browser receives HTML.
  • Why does a CDN make a site feel faster?

Seu progresso fica salvo apenas neste navegador.

Enviar para revisão (10 pontos)