Chapter recap
A network stack splits one big job into layers. Peers on different machines follow a protocol; adjacent layers meet at an interface; each layer offers a service upward. OSI has 7 layers (Physical, Data link, Network, Transport, Session, Presentation, Application); TCP/IP has 5 (top three merged). Layers 1–3 are hop by hop and run on routers; 4–7 are end to end. Going down, each layer encapsulates: message → segment → packet/datagram → frame (+ trailer) → bits. Hub = 1, switch = 2, router = 3.
Merged rule card
From 1.1.1 Why layer: protocol, service, interface, peers
- Layer: one job in the stack; serves the layer above, uses the layer below.
- Protocol: rules between peers (same layer, different machines): format, meaning, behaviour.
- Service: what a layer does for the layer above. Interface: how the layer above asks for it.
- Peer talk is logical; the real path is down → link → up.
- Layering = modularity + reuse − some overhead.
From 1.1.2 The OSI 7 layers and the TCP/IP model
- OSI bottom-up: Physical, Data link, Network, Transport, Session, Presentation, Application.
- Scope: link → hop → host-to-host → process-to-process.
- Routers: layers 1–3; hosts: 1–7.
- TCP/IP (5): application (= OSI 5–7), transport, network, data link, physical.
- Encryption/compression = presentation; dialogue control = session.
From 1.1.3 Encapsulation, headers, PDU names, addresses and devices per layer
- Encapsulation: payload + header (+ trailer at data link); decapsulation in reverse.
- PDUs: message (app) → segment (transport) → packet/datagram (network) → frame (data link) → bits.
- Addresses: link (per hop, changes) · network (end to end, fixed) · which-program id · names.
- Devices: hub/repeater 1 · bridge/switch 2 · router 3 · gateway/host up to 7.
- Efficiency = data / (data + all headers + trailer).
Practice questions
- MCQ · 1 mark
Which pair is correctly matched?
- Transport — frame
- Network — segment
- Data link — frame
- Application — packet
- MSQ · 1 mark
Which are end-to-end layers (run only on hosts) in OSI?
- Transport
- Session
- Network
- Presentation
- NAT · 1 mark
A 2000-byte message gets headers of 20, 20 and 14 bytes and a 4-byte trailer. Total frame size in bytes?
Write your answer before opening the key.
- MCQ · 1 mark
Two layer-4 entities on different hosts exchange units following agreed rules. These rules form a:
- service
- interface
- protocol
- topology
- MCQ · 1 mark
A bridge operates up to which OSI layer?
- 1
- 2
- 3
- 4
- NAT · 2 marks
A message of 400 bytes descends 6 layers, each adding a 10-byte header. What percentage of the transmitted bytes is the message (2 decimals)?
Write your answer before opening the key.
- MCQ · 1 mark
Compression belongs to which OSI layer?
- Application
- Presentation
- Session
- Transport
- MSQ · 1 mark
Which statements about layering are true?
- Only the physical layer actually transmits signals.
- A change in the physical medium forces changes in application programs.
- Each layer adds overhead.
- Peer communication is logical.
- MCQ · 2 marks
Which address in a frame is rewritten at every router hop?
- Network-layer destination
- Link-layer source and destination
- Which-program identifier
- None
Answer key
Try the questions first. Open when you are ready to check.
- C — Data link PDU = frame.
- A: Transport PDU is segment.
- B: Network PDU is packet/datagram.
- D: Application PDU is message.
- ABD — Layers 4–7 are end to end.
- C: Network runs on every router too.
- 2058 — 2000 + 58 = 2058.
- C — Rules between peers = protocol.
- A: Service is offered upward on one machine.
- B: Interface is between adjacent layers.
- D: Topology is the network shape.
- B — Bridges and switches read link headers: layer 2.
- A: Repeaters/hubs stop at layer 1.
- C: Routers reach layer 3.
- D: Transport is end-to-end only.
- 86.9..87.0 — 400 / 460 = 86.96 %.
- B — Format conversion, compression and encryption = presentation.
- A: Application serves user programs.
- C: Session manages dialogue.
- D: Transport delivers between processes.
- ACD — Lower layers hide the medium; overhead per layer; peer talk is logical.
- B: Layering exists precisely so that programs need not change.
- B — Each hop builds a new frame with new link addresses.
- A: Network addresses stay end to end.
- C: Transport identifiers are end to end.
- D: Link addresses do change.