CS331 · Chapter 1 · Part 2 · Annotated SlidesIntroduction: Protocol Layering, TCP/IP and the OSI Model
Original
Overview

Introduction: Protocol Layering, TCP/IP and the OSI Model

Why networks are built in layers, the 7 OSI layers and what each one does, its PDU and its address, how encapsulation wraps data on the way down and unwraps it on the way up, and how the 5-layer TCP/IP suite maps onto OSI. Every later chapter is one of these layers, so this deck is the map for the rest of the course.

How to read this page

Every original slide is shown unchanged. Yellow marks on a slide point to a numbered note: hover or tap a mark to jump to its note, and hover a note to see its marks. Questions tagged Past exam appeared on a real paper; Prediction questions are likely angles, not confirmed. Pick an answer to each question: a wrong pick tells you why it is wrong, so you can try again.

All 54 slides
  1. 1 Introduction
  2. 2 Chapter 1-Part 2: Outline
  3. 3 Protocol Layers and Service Models
  4. 4 Layers, protocols, and interfaces
  5. 5 Communication through an internet
  6. 6 Advantages of Layered Architecture
  7. 7 Standard Protocol Models
  8. 8 OSI Model
  9. 9 OSI Model
  10. 10 OSI Model
  11. 11 OSI Protocols Implementation
  12. 12 Peer-to-Peer Processes
  13. 13 OSI model-Basic Operation
  14. 14 An exchange using the OSI model (Figure 2.4)
  15. 15 Data Encapsulation
  16. 16 Decapsulation
  17. 17 How Hosts Talk over a Network
  18. 18 How Hosts Talk over a Network
  19. 19 How Hosts Talk over a Network
  20. 20 How Hosts Talk over a Network
  21. 21 How Hosts Talk over a Network
  22. 22 How Hosts Talk over a Network
  23. 23 How Hosts Talk over a Network
  24. 24 How Hosts Talk over a Network
  25. 25 Physical Layer
  26. 26 Physical Layer
  27. 27 RJ-45 connector
  28. 28 Data Link Layer
  29. 29 Note: data link layer
  30. 30 Data Link Layer
  31. 31 Node-to-node delivery (Figure 2.7)
  32. 32 Example 1 (Figure 2.8)
  33. 33 Network Layer
  34. 34 Note: network layer
  35. 35 Network Layer
  36. 36 Source-to-destination delivery (Figure 2.10)
  37. 37 Example 2 (Figure 2.11)
  38. 38 Transport Layer
  39. 39 Note: transport layer
  40. 40 Reliable process-to-process delivery of a message (Figure 2.12)
  41. 41 Transport layer (Figure 2.12)
  42. 42 Addressing
  43. 43 Layer Addresses
  44. 44 Session
  45. 45 Session layer (Figure 2.12)
  46. 46 Presentation
  47. 47 Presentation layer (Figure 2.13)
  48. 48 Application
  49. 49 Application layer (Figure 2.15)
  50. 50 TCP/IP Protocol Suite
  51. 51 Layers in the TCP/IP protocol suite (Figure 1.17)
  52. 52 TCP/IP and OSI model
  53. 53 TCP/IP and OSI model: protocols
  54. 54 Original TCP/IP Model (4-layers)
Slide 1 / 54

Introduction

Slide 1: Introduction

Notes

  1. Layering → OSI (7 layers) → encapsulation → each layer’s job, PDU and address → TCP/IP (5 layers).

  2. Memorize the layer table on slide 51: it is used in every chapter after this.

Slide 2 / 54

Chapter 1-Part 2: Outline

Slide 2: Chapter 1-Part 2: Outline
Slide 3 / 54

Protocol Layers and Service Models

Slide 3: Protocol Layers and Service Models

Notes

  1. Problem: networks are too complex to understand or build as one piece.

  2. Memory trick A layer only talks to the one directly above and below it on the same machine.

Exam angle

PredictionQ1

The boundary between two adjacent layers is called a(n):

PredictionQ2

In a layered architecture, layer n-1 provides a service to layer n.

Slide 4 / 54

Layers, protocols, and interfaces

Slide 4: Layers, protocols, and interfaces

Notes

  1. Horizontal = protocol (layer 3 talks to the other host’s layer 3). Vertical = interface.

  2. Only layer 1 actually touches the physical medium; everything above is logical communication.

  3. Trap Protocol ≠ interface. A protocol is between peers on different machines; an interface is between neighbours on the same machine.

Exam angle

PredictionQ1

Rules used between the same layer on two different hosts are a:

Slide 5 / 54

Communication through an internet

Slide 5: Communication through an internet

Notes

  1. Hosts use all 5 layers. A switch only needs layers 1–2. A router needs layers 1–3.

  2. Seen again Ch 6, slide 3: Which layer each connecting device works at

Exam angle

PredictionQ1

Up to which layer does a router operate?

PredictionQ2

A link-layer switch uses which layers?

Slide 6 / 54

Advantages of Layered Architecture

Slide 6: Advantages of Layered Architecture

Notes

  1. Each layer has its own unique protocols and a well-defined interface → each layer can be built independently.

  2. So different vendors can build different layers (NIC maker, OS maker, browser maker) and it still works.

Exam angle

PredictionQ1

Give two advantages of a layered network architecture.

Compare with the model answer

It breaks a complex process into simpler pieces, so hardware and software are easier to build. And because each layer has its own protocols and a fixed interface, layers can be built independently by different manufacturers, which encourages collaboration and competition.

Slide 7 / 54

Standard Protocol Models

Slide 7: Standard Protocol Models

Notes

  1. Two standard stacks: OSI (the reference model) and TCP/IP (what the Internet actually runs).

Slide 8 / 54

OSI Model

Slide 8: OSI Model

Notes

  1. Trap ISO is the organization, OSI is the model. Exam options often swap them.

Exam angle

PredictionQ1

The OSI model was developed by:

Slide 9 / 54

OSI Model

Slide 9: OSI Model

Exam angle

PredictionQ1

Which OSI layer number is the transport layer?

PredictionQ2

Which layer sits directly above the network layer in OSI?

Slide 10 / 54

OSI Model

Slide 10: OSI Model

Notes

  1. Top-down: All People Seem To Need Data Processing = Application, Presentation, Session, Transport, Network, Data link, Physical.

  2. Memory trick Bottom-up version: “Please Do Not Throw Sausage Pizza Away”.

Slide 11 / 54

OSI Protocols Implementation

Slide 11: OSI Protocols Implementation

Exam angle

PredictionQ1

Which layers are implemented in hardware on the NIC?

PredictionQ2

The network layer is implemented in a mix of hardware and software.

Slide 12 / 54

Peer-to-Peer Processes

Slide 12: Peer-to-Peer Processes

Notes

  1. Layers 4–7 talk end to end; layers 1–3 talk hop by hop with every intermediate node.

Slide 13 / 54

OSI model-Basic Operation

Slide 13: OSI model-Basic Operation

Notes

  1. Control info goes in a HEADER. Data link is the exception: it adds a header AND a trailer.

  2. Trap Only the data link layer adds a trailer (for error detection).

  3. Seen again Ch 3 Part 1, slide 4: Framing adds the header and trailer

Exam angle

PredictionQ1

Which layer adds both a header and a trailer?

PredictionQ2

The header added by the transport layer is read by the receiver’s transport layer only.

Slide 14 / 54

An exchange using the OSI model (Figure 2.4)

Slide 14: An exchange using the OSI model (Figure 2.4)

Notes

  1. Going down, each layer adds its header (H7 … H2, plus trailer T2). Going up, each layer strips its own.

Slide 15 / 54

Data Encapsulation

Slide 15: Data Encapsulation

Notes

  1. Encapsulation: layer N-1 carries layer N’s whole PDU as its data, without looking inside.

  2. PDU (N-1) = PDU (N) + control info of N-1.

Exam angle

PredictionQ1

Data encapsulation means that layer N-1:

PredictionQ2

During encapsulation, a lower layer inspects and changes the upper layer’s header.

Slide 16 / 54

Decapsulation

Slide 16: Decapsulation

Notes

  1. Decapsulation = the reverse: each layer removes its own header/trailer and hands the rest up.

Slide 17 / 54

How Hosts Talk over a Network

Slide 17: How Hosts Talk over a Network

Notes

  1. Slides 17–24 are one animation: follow the yellow arrow down the sender’s stack, across the link, and up the receiver’s stack.

Slide 18 / 54

How Hosts Talk over a Network

Slide 18: How Hosts Talk over a Network

Notes

  1. Seen again Ch 9, slide 9: Process-to-process delivery with ports

Slide 19 / 54

How Hosts Talk over a Network

Slide 19: How Hosts Talk over a Network
Slide 20 / 54

How Hosts Talk over a Network

Slide 20: How Hosts Talk over a Network

Notes

  1. Data link wraps it in a frame (Ethernet header) using the MAC address of the next device. Physical sends bits.

Slide 21 / 54

How Hosts Talk over a Network

Slide 21: How Hosts Talk over a Network

Notes

  1. Receiver: physical gets bits, data link checks the MAC address and removes the frame header.

Slide 22 / 54

How Hosts Talk over a Network

Slide 22: How Hosts Talk over a Network

Notes

  1. Network sees its own IP as the destination and passes the packet up to TCP.

Slide 23 / 54

How Hosts Talk over a Network

Slide 23: How Hosts Talk over a Network

Notes

  1. TCP uses the DESTINATION PORT to pick which application gets the data.

Slide 24 / 54

How Hosts Talk over a Network

Slide 24: How Hosts Talk over a Network

Notes

  1. The application finally processes the data. Order of headers on the wire: Ethernet | IP | TCP | data.

Exam angle

PredictionQ1

On the wire, the order of headers in front of the data is:

PredictionQ2

Which address does the receiving transport layer use to choose the application?

Slide 25 / 54

Physical Layer

Slide 25: Physical Layer

Exam angle

PredictionQ1

The physical layer is responsible for moving:

Slide 26 / 54

Physical Layer

Slide 26: Physical Layer

Notes

  1. Devices at layer 1: NIC (its physical part), repeater, hub.

  2. Seen again Ch 2 Part 1, slide 2: The physical layer in depth

  3. Seen again Ch 6, slide 4: Hubs and repeaters

Exam angle

PredictionQ1

Which device operates only at the physical layer?

PredictionQ2

Data rate (bits per second) is defined by the physical layer.

Slide 27 / 54

RJ-45 connector

Slide 27: RJ-45 connector

Notes

  1. The connector shape and pins are physical-layer details. RJ-45: female in the NIC, male on the cable.

Slide 28 / 54

Data Link Layer

Slide 28: Data Link Layer

Notes

  1. Trap Destination MAC = the NEXT HOP, not the final host. Destination IP = the final host.

Exam angle

PredictionQ1

The PDU of the data link layer is the:

PredictionQ2

Host A sends to host B through one router. The destination MAC address in A’s frame is:

Slide 29 / 54

Note: data link layer

Slide 29: Note: data link layer
Slide 30 / 54

Data Link Layer

Slide 30: Data Link Layer

Notes

  1. Header H2 in front AND trailer T2 at the end: the only layer with a trailer.

Slide 31 / 54

Node-to-node delivery (Figure 2.7)

Slide 31: Node-to-node delivery (Figure 2.7)
Slide 32 / 54

Example 1 (Figure 2.8)

Slide 32: Example 1 (Figure 2.8)

Notes

  1. Same link (a bus), so the frame carries physical addresses 10 → 87 and every station sees it, but only 87 keeps it.

Exam angle

PredictionQ1

On a bus LAN, station 10 sends a frame to station 87. Which stations receive it and which one keeps it?

Compare with the model answer

All stations on the bus receive the bits, but each compares the destination physical address with its own. Only 87 matches, so only 87 keeps the frame; the rest drop it.

Slide 33 / 54

Network Layer

Slide 33: Network Layer

Notes

  1. Memory trick IP = end-to-end destination. MAC = next-hop destination.

  2. Seen again Ch 7, slide 3: Network-layer duties in depth

Exam angle

PredictionQ1

Host-to-host delivery across multiple networks is the job of the:

PredictionQ2

The IP address changes at each hop, while the MAC address stays the same end to end.

Slide 34 / 54

Note: network layer

Slide 34: Note: network layer
Slide 35 / 54

Network Layer

Slide 35: Network Layer

Notes

  1. Only a header (H3), no trailer.

Slide 36 / 54

Source-to-destination delivery (Figure 2.10)

Slide 36: Source-to-destination delivery (Figure 2.10)
Slide 37 / 54

Example 2 (Figure 2.11)

Slide 37: Example 2 (Figure 2.11)

Notes

  1. The logical (IP) addresses A → P stay the same all the way; the physical addresses are rewritten on each link.

Exam angle

PredictionQ1

A packet travels from host A to host P across two routers. Which addresses change on the way and which stay the same?

Compare with the model answer

The logical (IP) source and destination stay A and P end to end. The physical (MAC) source and destination are replaced on every link, because each frame only travels one hop.

Slide 38 / 54

Transport Layer

Slide 38: Transport Layer

Notes

  1. The network layer treats every packet independently; transport stitches them back together.

  2. Seen again Ch 9, slide 3: Transport-layer services

Exam angle

PredictionQ1

Transport-layer addressing uses:

PredictionQ2

The transport layer PDU is a:

Slide 39 / 54

Note: transport layer

Slide 39: Note: transport layer
Slide 40 / 54

Reliable process-to-process delivery of a message (Figure 2.12)

Slide 40: Reliable process-to-process delivery of a message (Figure 2.12)
Slide 41 / 54

Transport layer (Figure 2.12)

Slide 41: Transport layer (Figure 2.12)

Notes

  1. Transport splits the message into segments (each with H4) and reassembles them at the receiver.

Slide 42 / 54

Addressing

Slide 42: Addressing

Notes

  1. Three addresses in TCP/IP: physical (MAC), IP (logical), port.

Slide 43 / 54

Layer Addresses

Slide 43: Layer Addresses

Notes

  1. Memory trick Bottom-up: MAC (L2) → IP (L3) → Port (L4).

Exam angle

PredictionQ1

Which address belongs to the data link layer?

Slide 44 / 54

Session

Slide 44: Session

Notes

  1. Session: set up, manage and end sessions; keep each application’s data separate.

  2. Synchronization: checkpoints so a long transfer resumes after a crash instead of restarting.

Exam angle

PredictionQ1

Adding checkpoints so a long transfer can resume after a crash is done by the:

Slide 45 / 54

Session layer (Figure 2.12)

Slide 45: Session layer (Figure 2.12)

Notes

  1. The “syn” marks are the synchronization checkpoints.

Slide 46 / 54

Presentation

Slide 46: Presentation

Notes

  1. Memory trick Presentation is about HOW data looks: translate, encrypt, compress.

Exam angle

PredictionQ1

Encryption, compression and translation belong to the:

Slide 47 / 54

Presentation layer (Figure 2.13)

Slide 47: Presentation layer (Figure 2.13)
Slide 48 / 54

Application

Slide 48: Application

Notes

  1. Application layer = the services users see: web (HTTP), remote login (Telnet), file transfer (FTP), mail.

  2. Seen again Ch 10, slide 3: Application layer: DNS

Slide 49 / 54

Application layer (Figure 2.15)

Slide 49: Application layer (Figure 2.15)
Slide 50 / 54

TCP/IP Protocol Suite

Slide 50: TCP/IP Protocol Suite

Notes

  1. TCP/IP: 5 layers. The bottom 4 match OSI’s bottom 4; OSI’s top 3 (session, presentation, application) are ONE application layer.

  2. Trap The textbook TCP/IP model has 5 layers; the original TCP/IP model (slide 54) has 4.

Exam angle

PredictionQ1

In TCP/IP, which OSI layers are merged into the application layer?

PredictionQ2

The TCP/IP protocol suite in the textbook has five layers.

Slide 51 / 54

Layers in the TCP/IP protocol suite (Figure 1.17)

Slide 51: Layers in the TCP/IP protocol suite (Figure 1.17)

Notes

  1. Memory trick “My Silly Pet Fish Bites”: Message, Segment, Packet, Frame, Bits.

Exam angle

PredictionQ1

The PDU at layer 3 is called a:

PredictionQ2

Match: which PDU belongs to the transport layer?

Slide 52 / 54

TCP/IP and OSI model

Slide 52: TCP/IP and OSI model

Notes

  1. Same picture as slide 50, drawn side by side.

Slide 53 / 54

TCP/IP and OSI model: protocols

Slide 53: TCP/IP and OSI model: protocols

Notes

  1. Application: SMTP, FTP, HTTP, DNS, SNMP, Telnet. Transport: TCP, UDP, SCTP. Network: IP + ICMP, IGMP, ARP, RARP.

Exam angle

PredictionQ1

Which protocol belongs to the transport layer?

PredictionQ2

ARP and ICMP sit in which TCP/IP layer?

Slide 54 / 54

Original TCP/IP Model (4-layers)

Slide 54: Original TCP/IP Model (4-layers)

Notes

  1. Original TCP/IP: application, transport, internet, network access (= data link + physical).