Back to the 2016 paper

Module 3: Network Layer & Routing

20167m

Explain the responsibility of network and transport layers of OSI model with example.

Worked SolutionAI Assisted

Responsibilities of the Network and Transport Layers in OSI

Network layer (Layer 3) - packet delivery between hosts

Responsibilities:

  • Logical addressing: defines a universal, hierarchical address (IP address) that identifies a host regardless of the underlying LAN technology.
  • Forwarding: moves each packet hop-by-hop from the correct input interface to the output interface of every router.
  • Routing: computes the path using routing protocols - distance vector (RIP), link state (OSPF), path vector (BGP).
  • Packetization and fragmentation/reassembly: encapsulates transport segments into packets and fragments them when a link's MTU is smaller, reassembling only at the destination host.
  • Internetworking and diagnostics: routers interconnect dissimilar networks; ARP maps IP to MAC and ICMP reports errors ("destination unreachable", "TTL expired", echo request/reply).

Service: connectionless best-effort datagram service (IP).

Example: a packet from 192.168.1.10 to 8.8.8.8 is handed to the default gateway, routed hop-by-hop using OSPF-derived tables, and if a router's TTL expires it returns an ICMP "Time Exceeded" message.

Transport layer (Layer 4) - end-to-end delivery between processes

Responsibilities:

  • Segmentation and reassembly: splits the message into segments and reassembles them in order at the receiver.
  • Process multiplexing/demultiplexing: port numbers deliver data to the correct application (80 = web, 53 = DNS, 22 = SSH).
  • Connection management: TCP performs the three-way handshake (SYN / SYN-ACK / ACK) and orderly close (FIN/ACK); UDP is connectionless.
  • Flow control: the receiver's advertised window prevents the sender from overrunning the receiver's buffer.
  • Error control and reliability: sequence and acknowledgment numbers, checksum, ACKs and retransmission on timeout give exactly-once, in-order delivery (TCP).
  • Congestion control: slow start, congestion avoidance (AIMD), fast retransmit and fast recovery protect the network itself.
  • Low-overhead delivery: UDP provides minimal encapsulation with low delay for real-time applications.

Example: a web page arrives as thousands of TCP segments which may be lost or reordered by IP; TCP numbers, ACKs, retransmits and reorders them so the browser receives one contiguous byte stream.

Comparison

Aspect Network layer Transport layer
Addressing unit IP address (host) Port number (process)
PDU Packet / datagram Segment (TCP) / datagram (UDP)
Scope Host-to-host, hop-by-hop End-to-end, process-to-process
Reliability Best effort TCP reliable, UDP unreliable
Protocols IP, ICMP, ARP, OSPF, RIP TCP, UDP, SCTP
Devices / location Routers, layer-3 switches Implemented in end hosts (OS/kernel)

Key idea: the network layer finds and forwards packets between machines, while the transport layer guarantees correct, ordered, congestion-free delivery between applications on those machines.

Similar questions

AI LearningWeb Platform

Coursify — Personal AI Course Generator

Struggling with a difficult subject or concept? Turn any engineering topic into a structured course with interactive lessons, quizzes, and research-backed explanations.