MasterTech Technology, official logoGet a quote
English technical publication

Technical publication available in English and Spanish. Read Spanish version ↗

Unit II · Networking & Telecommunications • Course Lecture: Prof. Luis Delgado Ayala (UNAB)

Treatise on the OSI Model and the TCP/IP Stack: Architecture and Protocols

Engineering compendium: complete taxonomy of all 7 layers, PDU encapsulation, canonical port tables, session-control tokens, reliable vs. connectionless transport mechanisms, and worked formative evaluation questions.

Diagram: seven OSI layers and encapsulation Enlarge diagram ↗

// LECTURE OBJECTIVES

  • 1. Understand the OSI model: its seven layers and the purpose of partitioning network communication into tiers.
  • 2. Understand why networking relies on it: guides architecture design, structured troubleshooting, and protocol standardisation.
  • 3. Identify each layer: and recognise the exact boundary differentiating adjacent layers.

1. Encapsulation and Protocol Data Units (PDUs)

To transmit information between two hosts without forcing software rewrites whenever physical hardware changes, the OSI model establishes the principle of encapsulation. Moving down the hierarchical stack, each layer treats data from the layer above as raw payload and prepends its own control header.

LAYERS 7, 6, 5DATA
LAYER 4SEGMENT
LAYER 3PACKET
LAYER 2 / 1FRAME / BITS

Layer 7 · Application

PDU: Data Level 7

The layer users and software interact with directly—the interface between the user process and network services. It does not refer to end-user programs themselves (like a browser or word processor), but to the communication protocols those programs invoke over the network.

Key distinction:

this is the only layer interacting directly with you; all lower layers operate transparently behind every action.

Core protocols:

Protocol Port(s) Role
HTTP80, 8080Client–server communication on the web
HTTPS443Encrypted and authenticated HTTP over TLS
FTP20, 21File transfer
DNS53Translates domain names to IP addresses
SMTP25, 587, 465Sending and relaying electronic mail
SSH22, 2222Encrypted remote shell access
// Technical Deep Dive: Name Resolution and Ephemeral Ports

Before a Layer-7 request leaves the host, DNS (Port 53 UDP/TCP) resolves any FQDN (such as mastertechg.com) into a routable Layer-3 address. The client OS then allocates an ephemeral port (range 49152–65535) to receive replies sent from the server's well-known port (e.g., 443).

Layer 6 · Presentation

PDU: Formatted Data Level 6

Ensures payloads remain readable and protected across heterogeneous platforms—acting as the network's translator across byte orderings (Little vs. Big Endian) and character encodings (ASCII vs. UTF-8).

Key distinction:

unlike the Application layer, the concern is no longer semantic intent, but representation: translation, encryption, and compression.

1
Translation: converts text and structured data into standardised wire syntax (ASN.1, JSON, XML, binary frames).
2
Formatting: guarantees matching structure on both endpoints across serialised types, images (JPEG, PNG), and media formats.
3
Encryption & compression: optimises bandwidth with compression algorithms and secures payloads using symmetric/asymmetric cryptography before passing them down.

Layer 5 · Session

PDU: Synchronised Data Level 5

Opens, arbitrates, and terminates dialogue sessions between communicating hosts, preventing both endpoints from transmitting out of turn or losing resumable checkpoints during disruptions.

Key distinction:

Application and Presentation define content and format; Session governs dialogue lifecycle—start, pause, checkpoints, and teardown.

Token Management:

Token Function
Data TokenIdentifies what payload is transmitted and when. Over half-duplex channels, only the holder of the Data Token is permitted to transmit.
Activity TokenPartitions long dialogues into resumable logical units so transient interruptions do not abort the entire workflow.
Sync TokenInserts numbered synchronisation checkpoints into streams so interrupted large transfers resume from the last confirmed mark.
Release TokenNegotiates clean session closure across both endpoints and releases allocated dialogue buffers.

Layer 4 · Transport

PDU: Segment (TCP) / Datagram (UDP) Level 4

Handles end-to-end delivery between communicating processes, receiving data from Session and passing it to Network. It does not inspect payload semantics or global routing topology; its sole job is reliable or low-latency process-to-process transport via logical port numbers.

Key distinction:

content no longer matters—completeness and pace do: choose between reliability (TCP) and speed (UDP).

TCP (Transmission Control Protocol)

Sends segments sequentially, numbers each unit, and confirms delivery. Prioritises reliability.

Requires a Three-Way Handshake (SYN, SYN-ACK, ACK) before sending application data and tracks acknowledgements continuously.

UDP (User Datagram Protocol)

Faster datagram dispatch without order checks or delivery retries. Prioritises low latency.

Connectionless transport without handshakes or retransmissions, trading recovery overhead for real-time responsiveness.

Transport — Services I (Core Layer-4 Mechanisms):

1
Connection-oriented (TCP): allocates ports and verifies receipt of every segment using sequence numbers and ACKs.
2
Connectionless (UDP): omits delivery confirmation; ideal for live audio, streaming, VoIP, and DNS.
3
In-order delivery: numbers segments so receivers reorder arrivals when packets traverse asymmetric Internet paths.

Transport — Services II (Additional Layer-4 Controls):

1
Data integrity: detects corruption via header/payload checksums and requests retransmission of lost segments.
2
Flow control: matches transmission pace to the receiver's buffer capacity using a Sliding Window.
3
Congestion control: throttles throughput when intermediate routers bottleneck (TCP Slow Start, Congestion Avoidance, Fast Retransmit).
4
Multiplexing: allows concurrent applications to share the same physical network via [IP Address + Port] Sockets.

Layer 3 · Network

PDU: Packet Level 3

Determines the logical path across separate networks via addressing, routing, and forwarding. Routers inspect IP headers and consult dynamic routing tables (BGP, OSPF) to choose each Next Hop.

Key distinction:

Transport guarantees end-to-end delivery; Network decides WHICH PATH packets travel using IP addresses.

Protocols:

Protocol Role
IPIdentifies each interface (IPv4 / IPv6) with hierarchical connectionless "best-effort" delivery.
ICMPError reporting and operational diagnostics supporting ping and traceroute.
IPSecAuthenticates and encrypts IP packets for enterprise VPN tunnels and secure Layer-3 transit.

Layer 2 · Data Link

PDU: Frame Level 2

Transfers frames reliably across nodes inside the same local area network (LAN). While IP addresses change per subnet, Layer-2 frames rely on 48-bit physical MAC addresses burned into Network Interface Cards (NICs). Switches operate at this layer.

Key distinction:

Network moves packets between networks via IP addresses; Data Link moves frames inside the local segment via MAC addresses.

LLC (Logical Link Control - IEEE 802.2)

Manages interaction between upper network protocols and MAC, supplying frame synchronisation, link flow control, and error reporting.

MAC (Media Access Control - IEEE 802.3 / 802.11)

Interfaces with hardware, prepends source/destination MAC headers, and appends CRC/FCS trailers to drop corrupted frames.

Layer 1 · Physical

PDU: Bits Level 1

The bottom layer of the OSI stack: transmits raw binary bits as electrical, optical, or radio signals, defining mechanical, electrical, timing, and signalling rules for physical links.

Key distinction:

the only layer handling raw physical signals on the medium rather than structured protocol headers.

1
Media: copper (UTP/STP twisted pair, coax), optical fibre (single-mode, multi-mode), and RF wireless spectrum (2.4 GHz, 5 GHz, 6 GHz).
2
Standards: Ethernet physical interfaces (IEEE 802.3), RS-232, DSL, and Bluetooth (IEEE 802.15.1).
3
Hardware: cables, repeaters, connectors (RJ-45, LC, SC), and optical transceivers (SFP/SFP+).
// CAUSAL TRACEABILITY

Returning to WhatsApp: What Happens When You Send a Message?

Exact downward traversal through the OSI stack when sending a message:

OSI Layer WhatsApp Flow
ApplicationThe user types "Hello" in WhatsApp; the client interprets the payload and initiates network dispatch.
PresentationThe message is binary-encoded and encrypted (end-to-end encryption in WhatsApp).
SessionAn active session between sender and recipient is validated and maintained continuously.
TransportPayloads are divided into segments using TCP (reliable delivery) or UDP (low-latency media) depending on traffic type.
NetworkSource and destination IP addresses are prepended, forwarding routes are chosen, and each segment becomes an IP packet.
Data LinkMAC addresses are added, payloads are encapsulated into frames, and local link transmission errors are checked.
PhysicalBits are transmitted as electrical voltages, optical light pulses, or RF waves (Wi-Fi / cellular).
// FORMATIVE SELF-ASSESSMENT

Slido Self-Assessment Question Bank

Formative evaluation questions from the lecture accompanied by worked study answers:

1. What is the OSI model?

A conceptual and pedagogical reference model developed by ISO partitioning network communication into 7 standardised layers.

2. How many layers does the OSI model have?

Exactly 7 layers: Application, Presentation, Session, Transport, Network, Data Link, and Physical.

3. Which organisation developed the OSI model?

ISO (the International Organization for Standardization).

4. What is the primary difference between OSI and TCP/IP?

OSI is a 7-layer theoretical reference framework; TCP/IP is the practical 4-layer architecture operating the live Internet.

5. How many layers does the TCP/IP model have?

It has 4 layers: Application, Transport, Internet, and Network Access.

6. Which OSI layer includes HTTP?

Layer 7 (Application), typically listening on ports 80 and 8080.

7. What is the main role of the Presentation layer?

Ensuring data readability and protection across hosts: binary translation, syntax formatting, encryption, and compression.

8. Which protocol ensures reliable delivery?

TCP (Transmission Control Protocol) at Layer 4 (Transport).

9. Which of these belongs specifically to TCP/IP?

The Internet layer (which corresponds to OSI Layer 3, Network).

10. Which layer handles IP addressing?

Layer 3 (Network) via IPv4 and IPv6 protocols.

// ACADEMIC CLOSURE

Conclusion

"The OSI model clarifies how systems communicate across a network via a layered structure. Each layer fulfils a focused responsibility, supporting network design, implementation, and troubleshooting. The TCP/IP model represents the practical stack deployed across the Internet. Both models are essential to understand and work with networking infrastructure."

Technical Breakdown of the 4 Core Takeaways:

1. Modularity & Architectural Design

By isolating duties across 7 independent levels, software developers and hardware vendors can innovate at one layer (e.g., new Physical media) without rewriting upper-layer applications.

2. Troubleshooting Methodology

Establishes systematic debugging workflows—Bottom-Up (physical link upwards) or Top-Down (application downwards)—to isolate IP, socket, or link faults quickly.

3. TCP/IP as the Live Operational Standard

While OSI provides the finest conceptual vocabulary, the live Internet runs on the 4-layer TCP/IP stack, folding Application, Presentation, and Session into software.

4. Global Interoperability

Both architectures ensure disparate hardware, processors, and operating systems interoperate seamlessly under open standards.