Lesson 1 of 81977–19897 min
Layered models: OSI and TCP/IP
In 1977 the International Organization for Standardization set up a committee to answer an awkward question: how do you make computers from rival manufacturers talk to each other without one vendor dictating the design? Hubert Zimmermann, a French engineer who had worked on the Cyclades research network, published the committee's answer in IEEE Transactions on Communications in April 1980: a reference model in seven layers. It became the standard ISO 7498 in 1984.
The OSI protocols that were meant to implement it largely lost to TCP/IP. The model won anyway: forty years later, every network engineer still says “a layer 2 problem” or “a layer 7 firewall”.
Service, interface, protocol
A layered architecture splits the job of communication into levels. Each layer offers a service to the layer above through an interface, and talks to the matching layer on the other machine, its peer, through a protocol: an agreed set of message formats and rules. The transport layer on your laptop never sees a radio wave; it asks the network layer to deliver a packet and trusts it to do so. That separation is what lets you replace Ethernet with Wi-Fi without rewriting your browser. The price is overhead (every layer adds a header) and lost information: a layer cannot react to something only another layer knows, unless the designers deliberately pass it across.
Seven layers and four
- 7 Application: the protocols programs use directly, such as HTTP, SMTP or DNS.
- 6 Presentation: data representation, such as character encoding, compression and encryption.
- 5 Session: opening, managing and closing dialogues between applications.
- 4 Transport: end-to-end delivery between processes, identified by ports (TCP, UDP).
- 3 Network: logical addressing and routing across many networks (IP).
- 2 Data link: framing, MAC addressing and error detection on one link (Ethernet, Wi-Fi).
- 1 Physical: bits as signals on copper, fibre or radio.
The internet's own model, written down in RFC 1122 (1989), has four layers: link, internet, transport and application. OSI layers 5 to 7 collapse into the application, because in practice applications handle sessions and encodings themselves; OSI layers 1 and 2 merge into the link. Behind the TCP/IP design sits the end-to-end argument of Saltzer, Reed and Clark (1984): a function such as reliable delivery can only be completely implemented at the endpoints, so the network core should stay simple and leave it to them.
- HTTP dataGET /index.html
DataThe browser writes an HTTP request. To the application it is just data; it knows nothing about how the bytes will travel.
Encapsulation, measured
The unit of data at each layer has its own name, the protocol data unit (PDU): a message at the application, a segment (TCP) or datagram (UDP) at transport, a packet at the network layer, a frame at the link and bits on the medium. Headers have fixed minimum sizes: TCP 20 bytes, IPv4 20 bytes, Ethernet 14 bytes of header plus a 4-byte frame check sequence at the end. On the wire, Ethernet adds 8 bytes of preamble and start delimiter and leaves a 12-byte idle gap between frames. Those numbers are enough to work out how much of a link's capacity actually carries user data.
Worked exercise
How efficient is a full-size TCP segment on Ethernet?
A host sends bulk data over TCP/IPv4 on a 1 Gb/s Ethernet link with a 1500-byte MTU and no IP or TCP options. What fraction of the bits on the wire is application data, and what is the maximum goodput?
Try it first, then reveal the solution one step at a time.
Key terms
- Protocol
- The rules and message formats two peer layers use to talk to each other.
- Service
- What a layer offers to the layer directly above it, through an interface.
- PDU
- The unit of data at a layer: message, segment or datagram, packet, frame, bits.
- Encapsulation
- Each layer wraps the PDU from above in its own header (and sometimes a trailer).
- End-to-end argument
- Functions like reliability belong at the endpoints, not in the network core.
Check what you learned
1.Which OSI layer is responsible for framing and error detection on a single link?
2.In the four-layer TCP/IP model, where do OSI's session and presentation functions go?
3.With a 1500-byte MTU and no options, how many bytes of application data fit in one TCP/IPv4 segment?
Practise it for the exam
- Network+ · Networking ConceptsQuestions on this topic
- CCNA · Network FundamentalsQuestions on this topic
Sources
- OSI Reference Model: The ISO Model of Architecture for Open Systems Interconnection (H. Zimmermann, 1980) — IEEE Transactions on Communications
- RFC 1122: Requirements for Internet Hosts — Communication Layers — RFC Editor
- End-to-end arguments in system design (Saltzer, Reed, Clark, 1984) — ACM Transactions on Computer Systems
- Computer Science Curricula 2023 (Networking and Communication knowledge area) — ACM, IEEE-CS and AAAI