Sign in to save

Bookmark this page so you can find it later.

Sign in to save

Bookmark this page so you can find it later.

Computer networks use layered models to organize how data moves from an application on one host to an application on another. This cheat sheet covers the OSI model, the TCP/IP model, protocol data units, addressing, DNS, web protocols, TCP behavior, and congestion control. College students need these layers because they connect terminology, packet traces, socket programming, routing, and protocol design into one framework.

A clear layer map makes it easier to diagnose where a network problem occurs.

Key Facts

  • The OSI layers from top to bottom are Application, Presentation, Session, Transport, Network, Data Link, and Physical.
  • The TCP/IP model is commonly summarized as Application, Transport, Internet, and Link, with OSI Application, Presentation, and Session usually grouped into TCP/IP Application.
  • Encapsulation means each lower layer wraps data with its own header, so application data becomes a transport segment, then an IP packet, then a link-layer frame.
  • IPv4 addresses are 32 bits written in dotted decimal notation, while IPv6 addresses are 128 bits written in hexadecimal groups separated by colons.
  • A socket endpoint is identified by IP address + transport protocol + port number, such as 203.0.113.5 + TCP + 443.
  • DNS translates names to records, with common records including A for IPv4, AAAA for IPv6, CNAME for aliases, MX for mail servers, and NS for authoritative name servers.
  • TCP connection setup uses a three-way handshake: SYN, SYN-ACK, ACK.
  • TCP congestion window growth is limited by effective send window = min(congestion window, receiver advertised window).

Vocabulary

OSI Model
A seven-layer reference model that describes network communication from physical signaling up to application services.
TCP/IP Model
The practical Internet protocol suite model that groups networking functions into application, transport, internet, and link layers.
Encapsulation
The process of adding protocol headers, and sometimes trailers, as data moves down the network stack.
IP Address
A logical network-layer identifier used to route packets between hosts across interconnected networks.
Port
A transport-layer number that identifies a process or service on a host, such as TCP port 80 for HTTP.
Congestion Window
A TCP sender-side limit that controls how much unacknowledged data may be in the network based on congestion estimates.

Common Mistakes to Avoid

  • Confusing the OSI Network layer with the TCP/IP Internet layer is wrong because both involve IP routing, while the TCP/IP Network Access or Link layer handles local frames.
  • Calling TCP packets frames is wrong because TCP creates segments, IP creates packets or datagrams, and the data link layer creates frames.
  • Assuming DNS sends web pages is wrong because DNS only resolves names to records, while HTTP or HTTPS transfers web content after the address is known.
  • Treating ports as physical connectors is wrong because network ports are software identifiers used by transport protocols to deliver data to applications.
  • Assuming TCP always increases speed linearly is wrong because TCP adjusts its congestion window using slow start, congestion avoidance, and loss recovery behavior.

Practice Questions

  1. 1 Map the OSI layers Application, Transport, Network, Data Link, and Physical to the closest TCP/IP model layers.
  2. 2 A client connects to 198.51.100.20 using TCP port 443 from local port 51500. Write the full client socket endpoint and server socket endpoint.
  3. 3 If a TCP sender has congestion window = 24 KB and receiver advertised window = 16 KB, what is the effective send window?
  4. 4 A browser cannot load example.com, but it can reach 93.184.216.34 directly. Which layer or service is most likely failing, and why?

Understanding Computer Networks OSI and TCP/IP Layers

Layers are useful because each layer has a limited job and can change without rebuilding the whole network. A browser can request a page while the network below it uses Ethernet in one building, Wi-Fi at home, or a mobile connection on a train. The browser does not need to know which cable or radio signal carries its data.

This separation allows common applications to work across many kinds of hardware. It also creates rules called interfaces. A layer passes data downward with enough information for the next layer, while hiding most of its internal details.

As data leaves a computer, each layer adds control information that serves a specific purpose. Transport information helps the receiving computer deliver data to the correct program. Internet layer information helps routers move data between networks.

Link information works only across one local hop, such as from a laptop to a home router. At the destination, these additions are removed in reverse order. Students should notice that a frame does not normally travel unchanged across the entire internet.

Each router removes the incoming link frame, examines the internet layer packet, then creates a new frame for the next link. The IP packet can continue while the local link details change.

Addressing has different meanings at different layers. A local network uses hardware addresses to deliver a frame to the next device nearby. An IP address identifies where a host is reachable across interconnected networks.

A port identifies a service or process on that host. This is why one laptop can run a web browser, a game, and a video call at the same time. Their traffic can share one IP address but use different ports.

Network address translation at many home routers complicates this picture. It rewrites addresses and ports so several private devices can share one public address. This is common in real life, yet it can make direct incoming connections harder to set up.

Reliable delivery is not the same as fast delivery. TCP keeps track of byte order, detects missing data, and retransmits when necessary. Its acknowledgments show which data arrived successfully.

A receiver can slow a sender when its buffer is filling, while congestion control reduces sending when the network itself appears overloaded. These are separate limits. Loss does not always mean a broken cable.

It can mean that a router queue filled and discarded packets during busy traffic. When reading a packet capture, follow one connection by its source and destination addresses, ports, and protocol.

Look for name lookup before a web connection, setup packets before application data, repeated packets after loss, and delays caused by waiting for acknowledgments. This evidence-based approach is more reliable than guessing from a page that loads slowly.