Back to the 2021 paper

Module 3: Network Layer & Routing

20217m

Describe the services provided by network layer. Explain ICMP.

Worked SolutionAI Assisted

Services of the Network Layer and ICMP

The network layer (Layer 3) is responsible for host-to-host delivery of packets across possibly heterogeneous networks with different topologies, technologies and MTUs.

Services provided by the network layer

  1. Packet delivery — the essential service: a packet created at the source must be delivered correctly to the destination host. IPv4 gives a best-effort (unreliable, no guarantee of order/duplication-free) service.
  2. Addressing — a hierarchical, technology-independent logical (IP) address identifies every host, so interconnection is possible even when the underlying LANs differ.
  3. Forwarding and routing — each router forwards a packet to the next hop by looking up its forwarding table, while routing algorithms (distance vector, link state, path vector) compute the end-to-end paths that populate those tables.
  4. Packetization & fragmentation — the layer breaks the transport data into datagrams and, when a datagram must cross a link with a smaller MTU, fragments and reassembles it at the destination.
  5. Error reporting, congestion control and QoS — reporting via ICMP, congestion indication/notification, and services such as precedence, delay, throughput and reliability guarantees where the network supports them.
  6. Connectionless datagram service — each packet is routed independently, which keeps routers simple and the network robust to failures.

ICMP (Internet Control Message Protocol)

  • Purpose: the control and error-reporting companion to IP (RFC 792). It carries diagnostics and network problems back to the sending host; it is not a higher layer above IP — ICMP messages are carried inside ordinary IP datagrams with protocol number 1 (2 for IGMP, 58 for ICMPv6).
  • Format: 1-byte Type, 1-byte Code, 2-byte Checksum, 4-byte type-specific "rest of header", followed by as much of the original IP header + first 8 bytes of data as fits — enough for the source to identify the offending packet.
  • Common messages:
Type / Code Meaning
3 / 0,1,3,4 Destination unreachable (net, host, port, protocol)
4 Source quench (congestion, deprecated)
5 Redirect — host told a better route to the destination
8 / 0 Echo request → ping
0 Echo reply
11 Time exceeded — TTL expired (used by traceroute)
12 Parameter problem
  • Key points: ICMP reports errors, it never corrects them — recovery (retransmission, congestion control) is the job of TCP/the application. ICMP traffic is rate-limited so that a fault cannot trigger an infinite echo/error storm, and ICMP errors are never generated for ICMP error messages.

Similar questions

Free AppAndroid App

Coursify Android App

Generate AI courses, take quick quizzes between classes, and master complex engineering concepts on the go.