🔒
Pro Content
Subscribe to access all 69 OCR H446 A Level lessons.
£7.99/month
or £59/year
Subscribe now →
🔒 Pro · Component 1 · 1.3.5 TCP/IP Suite
1.3.5c Transport, Network and Link Layers in Depth
OCR H446 · A Level Computer Science · ~14 min read
Notes
Video
Slides
Worksheet
Quiz

The Transport Layer in Depth

The Transport layer (Layer 4 of the OSI model; Layer 3 of TCP/IP) provides end-to-end communication between applications. Key responsibilities:

  • Segmentation: breaking large messages into smaller segments
  • Multiplexing: allowing multiple applications to share a network connection using port numbers
  • Flow control: ensuring the sender doesn't overwhelm the receiver
  • Error control: detecting and recovering from errors (TCP only)
  • Congestion control: adapting to network congestion

TCP Flow Control — Sliding Window

TCP uses a sliding window mechanism for flow control. The receiver advertises a window size — the maximum amount of data (in bytes) the sender may transmit before receiving an ACK.

  • If the receiver's buffer is full, window size = 0 → sender stops sending (back-pressure)
  • As the receiver processes data and frees buffer space, it advertises a larger window size
  • This prevents buffer overflow at the receiver

TCP Congestion Control

TCP detects congestion (packet loss) and reduces its sending rate to avoid making congestion worse:

  • Slow start: begins with a small congestion window, doubles it each RTT (exponential growth)
  • Congestion avoidance: once a threshold is reached, increases window linearly (additive increase)
  • Multiplicative decrease: on detecting packet loss, halves the congestion window

The Network (Internet) Layer in Depth

The Network layer (OSI Layer 3; TCP/IP Internet layer) handles logical addressing and routing. The key protocol is IP (Internet Protocol).

IPv4 Packet Header Fields

FieldSizePurpose
Version4 bitsIPv4 = 4, IPv6 = 6
Header Length4 bitsLength of header (usually 20 bytes)
Total Length16 bitsTotal packet size (header + data)
TTL8 bitsTime To Live — decremented at each router hop; discarded at 0
Protocol8 bitsIdentifies transport protocol in payload (6=TCP, 17=UDP)
Source IP32 bitsSender's IP address
Destination IP32 bitsIntended recipient's IP address
Checksum16 bitsHeader error detection

ARP — Address Resolution Protocol

ARP resolves an IP address to a MAC address within the same local network (LAN):

  1. Device has a packet for IP address 192.168.1.5 but needs the MAC address to send it on the LAN.
  2. Device broadcasts an ARP request: "Who has 192.168.1.5? Tell me your MAC."
  3. The device with that IP unicasts an ARP reply with its MAC address.
  4. The result is cached in the ARP cache (table of IP ↔ MAC mappings).

ARP only works on the local network. For remote destinations, the sender ARPs for the default gateway (router) MAC, then the router handles forwarding.

ICMP — Internet Control Message Protocol

ICMP sends control and error messages. It operates at the Network layer and is not used for data transfer:

  • Echo request / Echo reply: used by ping to test reachability
  • Destination Unreachable: sent when a packet cannot be delivered
  • Time Exceeded: sent when TTL reaches 0 — used by traceroute

The Data Link / Network Access Layer in Depth

The Data Link layer (OSI Layer 2) is responsible for node-to-node delivery on the same network segment. It encapsulates packets into frames and uses MAC addresses.

Ethernet Frame Structure

FieldSizePurpose
Preamble7 bytesSynchronisation — alternating 10101010 pattern
Start Frame Delimiter1 byte10101011 — signals start of frame content
Destination MAC6 bytesRecipient's MAC address
Source MAC6 bytesSender's MAC address
EtherType / Length2 bytesProtocol type (e.g. 0x0800 = IPv4, 0x86DD = IPv6)
Payload (data)46–1500 bytesEncapsulated IP packet
FCS (CRC)4 bytesFrame Check Sequence — error detection using CRC

MAC Addresses

A MAC address (Media Access Control address) is a 48-bit (6-byte) hardware address burned into a NIC at manufacture. Written as 6 hex pairs: AA:BB:CC:DD:EE:FF. The first 3 bytes = OUI (Organisationally Unique Identifier — manufacturer); the last 3 bytes = device-specific.

  • MAC addresses are locally scoped — used only within a LAN segment
  • Switches use MAC address tables to forward frames to the correct port
  • MAC addresses change hop-to-hop; IP addresses stay the same end-to-end

Difference Between MAC and IP Addressing

MAC AddressIP Address
LayerData Link (Layer 2)Network (Layer 3)
ScopeLocal — within a LAN segmentGlobal — end-to-end across networks
Format48-bit hex (AA:BB:CC:DD:EE:FF)32-bit (IPv4) or 128-bit (IPv6)
AssignmentBurned into NIC hardwareAssigned by DHCP or statically
Changes?Changes at each network hop (router)Stays same source→destination
ResolutionARP resolves IP → MACDNS resolves name → IP

Error Detection: CRC

CRC (Cyclic Redundancy Check) is used in Ethernet frames (FCS field). The sender performs polynomial division on the frame data and appends the remainder (checksum) to the frame. The receiver performs the same calculation — if the result doesn't match the FCS, the frame is discarded (corrupt).

Exam tip: Know the difference between MAC and IP addresses. MAC = local (LAN), Layer 2, hardware, changes at each hop. IP = global, Layer 3, logical, stays the same from source to destination. ARP = resolves IP to MAC within a LAN. DNS = resolves name to IP.
Exam tip: Know what ICMP is used for: ping (echo request/reply) tests reachability; traceroute uses ICMP Time Exceeded messages from routers as TTL decrements to 0 at each hop. ICMP is a network-layer protocol — it's not for data transfer, only control/error reporting.
⚠ Common Mistakes
  • Saying MAC addresses are used end-to-end — MAC addresses only work within a local network segment and change at every router hop. IP addresses remain the same from source to destination.
  • Confusing ARP and DNS — ARP resolves IP addresses to MAC addresses (within LAN). DNS resolves domain names to IP addresses (across the internet). They operate at different layers for different purposes.
  • Saying ICMP is a transport protocol — ICMP is a Network layer protocol. It carries error/control messages, not application data. It does not use ports.
✓ Notes completed!
Video coming soon
Click to advance · Arrow keys also work
Click slide or press arrow keys to navigate

Worksheet — 1.3.5c Transport, Network & Link Layers

8 questions · 20 marks · instantly marked

Q1Explain the difference between a MAC address and an IP address. Include in your answer: their scope, which layer they operate at, and how each changes (or doesn't) as a packet travels from source to destination.[6 marks]
✓ Mark scheme
MAC address: 48-bit hardware address burned into NIC; operates at Data Link layer (Layer 2); used for local (LAN) delivery only [1]; changes at every router hop — the source MAC changes to the router's MAC at each hop [1]. IP address: 32-bit (IPv4) or 128-bit (IPv6) logical address assigned by DHCP or statically; operates at Network layer (Layer 3); used for global end-to-end delivery [1]; remains the same source to destination throughout the journey [1]. ARP resolves IP → MAC within a LAN [1]. DNS resolves domain names → IP addresses [1].
Q2Describe the ARP process. Include what triggers it, the messages involved, and the outcome.[4 marks]
✓ Mark scheme
Triggered when a device wants to send a packet to an IP address on the same LAN but does not know the MAC address [1]; the device broadcasts an ARP Request to all devices on the LAN: "Who has IP x.x.x.x? Tell me your MAC" [1]; the device with that IP address sends a unicast ARP Reply containing its MAC address [1]; the requesting device stores the IP→MAC mapping in its ARP cache (table) to avoid repeating the process for subsequent packets [1].
Q3What is ICMP? Name two tools that use ICMP and describe what each does.[4 marks]
✓ Mark scheme
ICMP (Internet Control Message Protocol) operates at the Network layer and carries error/control messages between devices — not used for data transfer [1]. Ping: sends ICMP Echo Requests to a destination; target replies with Echo Replies; used to test reachability and measure round-trip time (RTT) [1]. Traceroute: sends packets with increasing TTL values (1, 2, 3, …); each router decrements TTL to 0 and sends back an ICMP Time Exceeded message, revealing its address; builds a picture of the route taken [1]. Both diagnose network connectivity and latency [1].
Q4Explain TCP's sliding window mechanism for flow control. Why is it necessary?[4 marks]
✓ Mark scheme
The receiver advertises a window size — the maximum number of bytes the sender can transmit before receiving an acknowledgement [1]. The sender may only have this many unacknowledged bytes in flight at any time [1]. If the receiver's buffer fills up (e.g. slow application reading data), it advertises window size = 0, causing the sender to pause [1]. This prevents the sender from overwhelming the receiver's buffer — without flow control, the receiver could receive data faster than it can process it, causing packet loss [1].
Q5Name the fields in an Ethernet frame and briefly describe the purpose of the FCS field.[4 marks]
✓ Mark scheme
Ethernet frame fields: Preamble + Start Frame Delimiter (synchronisation), Destination MAC address, Source MAC address, EtherType/Length, Payload (data — the encapsulated IP packet), FCS [1 each for any three fields = 3 marks]. FCS (Frame Check Sequence) uses CRC (Cyclic Redundancy Check) — the sender performs polynomial division on the frame and appends the remainder; the receiver performs the same calculation; if the result doesn't match, the frame is corrupted and discarded [1].
Q6A student says: "When a packet travels from my computer in London to a server in New York, it keeps the same MAC address the whole way." Evaluate this claim.[3 marks]
✓ Mark scheme
The claim is incorrect [1]. MAC addresses only operate within a local network (LAN) segment — they are not routed across the internet [1]. At every router hop, the frame is stripped of its Data Link layer header; a new frame is created with a new source MAC (the router's outgoing interface MAC) and a new destination MAC (the next-hop device's MAC). The IP addresses (source = London computer, destination = New York server) remain the same end-to-end; only the MAC addresses change at each hop [1].
Q7Name three fields in the IPv4 packet header and explain the role of the TTL field.[3 marks]
✓ Mark scheme
Any three from: Version, Header Length, Total Length, TTL, Protocol, Source IP, Destination IP, Checksum [1]. TTL (Time To Live): an integer value (e.g. 64 or 128) decremented by 1 at each router hop [1]; when TTL reaches 0, the router discards the packet and sends an ICMP Time Exceeded message back to the sender — this prevents packets from circulating indefinitely on the internet in routing loops [1].
Q8Explain the difference between flow control and congestion control in TCP.[2 marks]
✓ Mark scheme
Flow control: prevents the sender from overwhelming the receiver's buffer — managed by the receiver advertising a window size. It addresses the relationship between sender and receiver [1]. Congestion control: prevents the sender from overwhelming the network (intermediate routers/links) — TCP reduces its sending rate when packet loss is detected (e.g. slow start, multiplicative decrease). It addresses the capacity of the network itself [1].
Topic Quiz
1 of 15
You scored
out of 15
🎯

Mini Test — 1.3.5c Transport, Network & Link Layers

  • 10 questions · 10 marks · 10 minutes
  • 5 MCQ + 5 short answer
Card 1 of 15
Click to reveal
🎉
Complete!
TermDefinition
← 1.3.5b Application Protocols 1.3.5 TCP/IP Suite Next: 1.4.1a Primitive Data Types →