Skip to main content

Web & Networking Foundations · Foundational networking

How Networks Work, Part 1: TCP/IP, IP Addressing, Ports, and Sockets

Learn how IP addresses, ports, sockets, and TCP connect a browser to the right service before DNS and TLS enter the picture.

Before we begin, here is exactly what you will be able to do by the end of this lesson.

By the end of this lesson, you will be able to:

  • Explain why networking is built as a stack of layers, and distinguish between the OSI reference model and the four-layer TCP/IP model the internet runs on.
  • Read IPv4 and IPv6 addresses, recognise private and loopback ranges, and interpret CIDR notation such as /24 as a block of addresses.
  • Explain what a port is, name the well-known ports for HTTP, HTTPS, SSH, and DNS, and describe why one machine can run many services at once.
  • Compare TCP and UDP, and describe the three-way SYN → SYN-ACK → ACK handshake that opens a TCP connection.
  • Define a socket as an IP address combined with a port, and explain how a connection is uniquely identified by the four-tuple of source IP, source port, destination IP, and destination port.

When you are ready, send Continue.