By the end of this chapter you'll be able to…

  • 1State the three-part contract a layer provides and use it to assign a problem to a layer
  • 2Name the seven OSI layers with their functions and their addressing scheme
  • 3Compare OSI with TCP/IP on layer count, network layer service and practical status
  • 4Trace encapsulation and compute the total bytes on the wire for a given payload
  • 5Distinguish connection orientation from reliability as independent axes
  • 6Compare circuit, datagram and virtual circuit switching on setup, state, ordering and failure behaviour
  • 7Separate the four delay components and identify which vary with load and with distance
  • 8Apply the store-and-forward pipelining formula for P packets over N links
  • 9Explain why an optimal packet size exists and what dominates on each side of it
  • 10Compute the bandwidth-delay product and relate it to sender utilisation
💡
Why this chapter matters in GATE
A layer is a contract in three parts, and most conceptual networking questions are about which layer owns a problem. The numerical half of this chapter is the four delay components, which GATE tests through store-and-forward pipelining and bandwidth-delay product calculations that recur in every later networking topic.

Before you start — revise these

🔗
Units of data rate and prefixes: kilo, mega, giga
🔗
Basic ratio and unit conversion between bits, bytes and seconds
🔗
The idea of a header prefixed to a payload

Layering and Switching

Networking is a large subject held together by one structural idea and one performance idea.

The organising fact is that a layer is a contract with three parts: it offers a service to the layer above, uses the service of the layer below, and speaks a protocol with its peer on the other machine.

Almost every conceptual question in networking is deciding which layer owns a problem. Error detection appears at the data link layer and again at the transport layer, and the reason they are not redundant is that they protect different spans.

The second organising fact is that end-to-end delay has four independent components, and confusing them is the single largest source of lost marks in this subject. Transmission delay depends on message size and link rate. Propagation delay depends on distance and signal speed. The two have nothing to do with each other.

The third is that switching is a decision about when resources are committed. Circuit switching commits them before any data flows. Packet switching commits nothing and lets packets contend. Virtual circuits commit a path but not a rate.

1. Why Layering

Layering decomposes a hard problem into pieces with stable interfaces, so that a change inside one layer does not propagate outward.

Replacing copper with fibre changes the physical layer alone. Replacing IPv4 with IPv6 changes the network layer, and applications largely continue working.

The cost is efficiency. Each layer adds a header, and information one layer discards may be exactly what another needs, which is why cross-layer optimisation keeps being proposed.

A wireless link makes the cost concrete. The data link layer sees a lost frame and retransmits; the transport layer sees the resulting delay and infers congestion that does not exist, and slows down for no reason.

Neither layer is wrong. Each is doing exactly what its contract specifies, and the loss of information at the boundary is what produces the bad outcome.

A protocol data unit at layer becomes the payload of layer , a process called encapsulation. Headers accumulate on the way down and are stripped on the way up.

The names differ by layer: a segment at the transport layer, a packet or datagram at the network layer, a frame at the data link layer, and bits at the physical layer.

2. The OSI Model

Seven layers, from the bottom up.

Physical transmits raw bits over a medium, defining voltages, connectors and data rates.

Data link turns a raw bit stream into a reliable link between adjacent nodes, handling framing, error detection, flow control and medium access.

Network moves packets from source to destination across multiple links, handling routing, addressing and congestion.

Transport provides end-to-end delivery between processes, handling segmentation, reliability, flow control and multiplexing.

Session manages dialogues, including checkpointing and recovery.

Presentation handles syntax: encoding, encryption and compression.

Application provides services directly to user programs.

The mnemonic worth having is the addressing at each level. Physical has none, data link uses MAC addresses, network uses IP addresses, transport uses port numbers, and application uses names.

3. TCP/IP and the Comparison

The TCP/IP model has four layers: link, internet, transport and application, with the physical layer sometimes separated to give five.

Session and presentation have no counterpart and their functions are left to applications.

The models differ in more than layer count.

AspectOSITCP/IP
OriginDesigned first, then implementedProtocols first, model described later
Layers74 or 5
Network layer serviceBoth connectionless and connection-orientedConnectionless only
Transport layer serviceConnection-oriented only originallyBoth, through TCP and UDP
Practical statusReference modelWhat actually runs

OSI's lasting contribution is the vocabulary, since the layer numbers are still how engineers describe where a problem lives.

4. Services and Primitives

A connection-oriented service establishes a connection, transfers data, and releases it, guaranteeing ordered delivery within that connection.

A connectionless service sends each unit independently, with no setup and no ordering guarantee.

Reliability is a separate axis from connection orientation. A service can be connection-oriented and unreliable, or connectionless and acknowledged, though the common combinations are reliable connection-oriented and unreliable connectionless.

Five service primitives describe the interface: listen, connect, accept, send or receive, and disconnect.

5. Switching

Circuit switching reserves a dedicated path with a guaranteed rate for the whole conversation.

Three phases occur: setup, data transfer, and teardown.

Its advantage is a guaranteed rate with no per-packet header and no queueing delay. Its cost is that the reservation is held whether or not data flows, so bursty traffic wastes most of the capacity.

Packet switching sends independently routed packets with no reservation.

Statistical multiplexing is what makes it efficient: because sources are bursty and rarely peak together, a link can serve far more users than its capacity divided by peak rate would suggest.

Its cost is queueing delay and the possibility of loss, since nothing is reserved and a burst can exceed a link's capacity.

Store-and-forward means a router must receive a packet entirely before forwarding it, which is why each hop adds a full transmission delay.

Virtual circuit switching is the middle position. A setup phase establishes a path and installs forwarding table entries, and every packet carries a short circuit identifier rather than a full destination address.

PropertyDatagramVirtual circuit
Setup phaseNoneRequired
AddressingFull destination in every packetShort circuit identifier
Router statePer destinationPer connection
PathMay differ per packetFixed for the connection
OrderingNot guaranteedPreserved
Router failureAffects packets in transit onlyTerminates all circuits through it

6. Delay and Throughput

Four delay components exist at each hop.

Processing delay is the time to examine the header and decide an output link, typically microseconds.

Queueing delay is the time waiting behind other packets, and is the only component that varies with load.

Transmission delay is packet length divided by link rate, the time to push the bits onto the wire.

Propagation delay is distance divided by signal speed, the time for a bit to travel, typically two thirds the speed of light in copper or fibre.

Transmission and propagation delay are independent. Doubling the link rate halves transmission delay and leaves propagation delay untouched.

The bandwidth-delay product is the link rate times the propagation delay, and it measures how many bits are in flight on the link at once.

It is the right way to think about a link as a pipe: rate is the diameter and propagation delay is the length, so the product is the volume.

Throughput is bounded by the slowest link on the path, called the bottleneck, regardless of how fast the others are.

Round-trip time is twice the propagation delay plus the transmission and queueing delays in both directions, and it is the quantity most protocol behaviour is timed against.

Multiplexing

Multiplexing shares one medium among several conversations, and the four schemes differ in what they divide.

Frequency division multiplexing gives each conversation its own frequency band for the whole time, with guard bands between them to limit interference.

Time division multiplexing gives each the whole bandwidth for a fixed recurring slot. A slot is reserved whether or not its owner has data, which is what makes it synchronous.

Wavelength division multiplexing is frequency division applied to optical fibre, with each wavelength carrying an independent channel.

Statistical time division multiplexing allocates slots on demand rather than by rotation, which is what packet switching does and why it supports more users than the sum of their peak rates would allow.

The distinction between synchronous and statistical multiplexing is exactly the distinction between circuit and packet switching, viewed at the level of the link rather than the network.

7. Worked Examples

Example 1. A message of 10 megabits is sent from source to destination across 3 links, each of rate 10 megabits per second, with propagation delay ignored and store-and-forward routers. Compare sending it as one packet against splitting it into 10 packets of 1 megabit.

As one packet, each of the 3 links must transmit the entire 10 megabits.

Transmission delay per link is second.

Because routers are store-and-forward, the hops are sequential, so the total is seconds.

As 10 packets of 1 megabit, each transmission takes seconds.

Now the hops overlap. While the second link transmits packet 1, the first link is already transmitting packet 2.

The first packet arrives after 3 transmissions, taking seconds. Each subsequent packet arrives seconds later, and there are 9 more.

Total is seconds.

The general formula for packets over links is times the per-packet transmission time.

Checking: seconds.

The improvement from 3 seconds to 1.2 is pipelining, and it is the fundamental argument for packetisation.

Example 2. Why is there an optimal packet size, and what happens on either side of it?

Smaller packets pipeline better, as the previous example showed, since the first link starts on packet two sooner.

But every packet carries a header, so smaller packets mean the same payload costs more total bits.

Consider a message of bits, header bits per packet, and payload bits per packet, over links at rate .

The number of packets is , and each transmission takes .

Total time is .

As grows, the pipelining term shrinks but the per-packet cost grows. The product has a minimum.

As approaches zero, the header dominates completely and the total time diverges, since almost every bit transmitted is overhead.

As approaches the whole message, pipelining vanishes and the time approaches times the full transmission, the one-packet case.

Real networks resolve this empirically. Ethernet settled on a 1500-byte payload with a 14-byte header, giving about one percent overhead while keeping packets small enough that one flow cannot monopolise a link for long.

Example 3. A link has rate 1 gigabit per second and a one-way propagation delay of 10 milliseconds. Compute the bandwidth-delay product and explain what it means for a sender.

The product is rate times delay.

bits, which is 10 megabits, or 1.25 megabytes.

This is the number of bits in flight when the sender is transmitting continuously.

Interpret the link as a pipe. Rate is the cross-sectional area and propagation delay is the length, so the product is the volume the pipe holds.

The consequence for a sender is decisive. If the protocol requires an acknowledgement before sending more, and the window is smaller than 10 megabits, the sender goes idle waiting.

With a window of 64 kilobytes, which is 512 kilobits, the sender transmits for 0.5 milliseconds and then waits 20 milliseconds for the round trip.

Utilisation is roughly , about 2.4 percent, on a gigabit link.

This is exactly why TCP needed the window scaling option, since the original 16-bit window field caps at 64 kilobytes and cannot fill a modern long-distance link.

Example 4. A user sends a 1000-byte file. Compute the total bytes on the wire given a 20-byte TCP header, a 20-byte IP header and an 18-byte Ethernet header and trailer, with a maximum payload of 1460 bytes.

The file fits in one segment, since 1000 is below 1460.

At the transport layer, the segment is 1000 bytes of data plus a 20-byte TCP header, giving 1020 bytes.

At the network layer, that whole segment becomes the payload of an IP packet, adding 20 bytes, giving 1040.

At the data link layer, the packet becomes the payload of an Ethernet frame, adding 18 bytes, giving 1058 bytes on the wire.

Overhead is 58 bytes out of 1058, about 5.5 percent.

Now repeat with a 1-byte payload, as an interactive keystroke produces.

The total is bytes to carry one byte, an overhead of 98.3 percent.

This is the encapsulation cost that layering imposes, and it is why interactive protocols batch keystrokes and why header compression exists on slow links.

Example 5. A network has 5 routers on the path. Under datagram switching, how much state does each router hold, and how does that change under virtual circuits with 1000 active connections?

Under datagram switching, a router holds one forwarding entry per destination prefix, not per connection.

The table size depends on the size of the network, not on the traffic, so it is the same whether 10 or 10 million connections are active.

Under virtual circuits, each router on a path holds one entry per circuit passing through it.

With 1000 active connections through this router, it holds 1000 entries.

The trade is clear. Virtual circuits move work from the packet to the setup: each packet carries a short identifier and needs only a table lookup, while a datagram carries a full address and may need a longest-prefix match.

But virtual circuit state is per-connection, so it scales with traffic, and a busy core router would need millions of entries.

Failure behaviour differs sharply too. If this router fails under datagram switching, packets in transit are lost but routing reconverges and the flows continue on another path.

Under virtual circuits, every circuit through the failed router is torn down and each must be re-established, because the state that defined the path is gone.

That difference is why the internet chose datagrams, having been designed for survivability, and why virtual circuits survive mainly inside carrier networks where state is manageable and guarantees are sold.

Example 6. For each of the following, name the layer that owns it and say why: converting bits to voltages, retransmitting a lost segment end-to-end, choosing a next hop, detecting a corrupted frame, distinguishing two browser tabs on one host.

Converting bits to voltages is the physical layer, since it concerns the medium and nothing above it.

Retransmitting a lost segment end-to-end is the transport layer. The network layer may drop packets freely, and only the endpoints know the conversation is incomplete.

Choosing a next hop is the network layer, which is the only layer that sees the whole path rather than a single link.

Detecting a corrupted frame is the data link layer, protecting one hop, though the transport layer's checksum protects the whole path.

Both are needed and neither is redundant. A link checksum catches corruption on the wire but not corruption inside a router's memory after the check; the end-to-end checksum catches that, which is the practical content of the end-to-end argument.

Distinguishing two browser tabs on one host is the transport layer, using port numbers, since the IP address identifies only the machine.

Summary

A layer offers a service upward, uses a service downward and speaks a protocol with its peer, and most conceptual questions are about which layer owns a problem.

Encapsulation makes each layer's unit the payload of the layer below: segment, packet, frame, bits.

OSI has seven layers with session and presentation absent from TCP/IP. Addressing runs MAC at the link layer, IP at the network layer, ports at the transport layer, names at the application layer.

Connection orientation and reliability are independent axes.

Circuit switching reserves capacity before data flows, giving guarantees and wasting idle capacity. Packet switching reserves nothing and relies on statistical multiplexing, paying with queueing delay and loss. Virtual circuits install path state at setup and carry short identifiers.

Datagram routers hold state per destination and survive failures gracefully; virtual circuit routers hold state per connection and lose every circuit when one fails.

The four delay components are processing, queueing, transmission and propagation. Transmission is length over rate; propagation is distance over speed; they are independent.

Store-and-forward makes a message over links with packets take transmission times, which is the pipelining result that justifies packetisation.

Packet size has an optimum, because smaller packets pipeline better while headers cost proportionally more.

Bandwidth-delay product is rate times propagation delay and measures bits in flight. A window smaller than it leaves the sender idle, which is why TCP window scaling exists.

Encapsulation overhead is a few percent for bulk transfers and over ninety percent for single-keystroke traffic.

Multiplexing divides frequency, time or wavelength. Synchronous time division reserves a slot whether or not it is used, while statistical time division allocates on demand, and that distinction is circuit versus packet switching seen from the link.

Throughput is set by the bottleneck link, and round-trip time is what protocol timers are measured against.

Key formulas & results

Everything to memorise for the exam hall, in one card. Screenshot this for revision.

The organising principle
a layer offers a service upward, uses a service downward, speaks a protocol with its peer
Most conceptual questions reduce to deciding which layer owns a problem, and duplicated functions at two layers protect different spans.
Transmission delay
packet length divided by link rate
How long it takes to push the bits onto the wire. Doubling the rate halves it.
Propagation delay
distance divided by signal speed, typically two thirds of c
How long a bit takes to travel. Independent of link rate and of packet size.
Four delay components
processing plus queueing plus transmission plus propagation
Only queueing varies with load. Confusing transmission with propagation is the largest single source of lost marks in networking.
Store-and-forward pipelining
total time = (N + P minus 1) times the per-packet transmission time, for P packets over N links
The first packet needs N transmissions and each later one adds one, which is the argument for packetisation.
Optimal packet size trade-off
total = (N minus 1 plus M/p) times (p plus h) divided by R
Smaller payload p pipelines better but pays more header per bit, so the product has a minimum.
Bandwidth-delay product
link rate times one-way propagation delay
The number of bits in flight. Rate is the pipe's diameter and propagation delay its length, so the product is the volume.
Window utilisation
utilisation is roughly window size divided by (window size plus rate times round-trip time)
A window smaller than the bandwidth-delay product leaves the sender idle, which is why TCP window scaling exists.
Encapsulation total
wire bytes = payload plus transport header plus network header plus link header and trailer
About 5 percent overhead on a 1000-byte payload and over 98 percent on a single keystroke.
Bottleneck rule
end-to-end throughput equals the rate of the slowest link on the path
Upgrading any other link changes nothing until the bottleneck moves.
⚠️

Traps GATE sets — and how to dodge them

These are the exact option-traps and misreads that cost marks under negative marking.

WATCH OUT
Treating transmission delay and propagation delay as the same quantity
Transmission depends on packet size and link rate; propagation depends on distance and signal speed. Doubling the rate changes only the first.
Why it happens: Both are measured in seconds and both stand between sending and receiving, so they blur together.
WATCH OUT
Forgetting that store-and-forward makes hops sequential
Each router must receive the whole packet before forwarding, so a single packet over N links costs N transmission delays.
Why it happens: It is tempting to treat a path as one long link and divide total bits by the rate once.
WATCH OUT
Applying N times P transmissions instead of N plus P minus 1
The hops pipeline. Only the first packet pays all N transmissions; each later one adds exactly one.
Why it happens: Multiplying hops by packets looks like the natural count.
WATCH OUT
Using round-trip time where the bandwidth-delay product wants one-way delay
Bits in flight on the link is rate times one-way propagation. If the question gives RTT, halve it unless it explicitly asks for bits in flight in both directions.
Why it happens: Round-trip time is the figure protocols quote, so it is the number at hand.
WATCH OUT
Claiming link-layer and transport-layer error checks are redundant
The link check protects one hop and stops at the router's input. Corruption inside router memory is caught only by the end-to-end check, which is the practical content of the end-to-end argument.
Why it happens: Both compute a checksum over the same data, so one seems to make the other pointless.
WATCH OUT
Saying virtual circuits are just circuit switching
A virtual circuit reserves a path but not a rate, and packets still queue and can be lost. Circuit switching reserves capacity, so there is no queueing at all.
Why it happens: Both have a setup phase and a fixed path.
WATCH OUT
Assuming datagram routers hold per-connection state
A datagram router's table is per destination prefix, so its size depends on the network, not on how many conversations are active.
Why it happens: Virtual circuits are taught alongside and their per-circuit table is the memorable one.
WATCH OUT
Assuming smaller packets are always better
Header overhead grows as payload shrinks, so total time diverges as packet size approaches zero. There is an optimum, and Ethernet's 1500 bytes is one empirical answer.
Why it happens: The pipelining example shows a large improvement from splitting a message.

Exam-pattern practice

PYQ-style questions with full solutions. Work through them as a readiness check — mark yourself honestly and get your gap report at the end.

Readiness check

Are you exam-ready for Layering (OSI & TCP/IP) and Packet, Circuit & Virtual-Circuit Switching?

10 problems from this chapter. Try each one, reveal the worked solution, mark yourself honestly — get your gap report at the end.

10 questions~7 min

5-minute revision

The whole chapter, distilled. Read this the night before the exam.

  • A layer serves upward, uses downward, and speaks a protocol with its peer
  • Encapsulation: segment, packet, frame, bits, each becoming the payload below
  • OSI has 7 layers; TCP/IP drops session and presentation
  • Addressing: MAC at link, IP at network, ports at transport, names at application
  • OSI network layer offers both service types; IP offers connectionless only
  • Connection orientation and reliability are independent axes
  • Circuit switching reserves capacity, has no queueing, and wastes idle capacity
  • Packet switching relies on statistical multiplexing and pays with queueing and loss
  • Virtual circuits reserve a path but not a rate, and carry short identifiers
  • Datagram state is per destination; virtual circuit state is per connection
  • A failed datagram router costs packets in transit; a failed VC router kills every circuit
  • Four delays: processing, queueing, transmission, propagation; only queueing varies with load
  • Transmission is length over rate; propagation is distance over speed; they are independent
  • Store-and-forward: (N plus P minus 1) transmission times
  • Packet size has an optimum between header overhead and pipelining
  • Bandwidth-delay product is rate times one-way propagation, the bits in flight
  • A window below the bandwidth-delay product leaves the sender idle
  • Throughput equals the bottleneck link rate
  • FDM divides frequency, TDM divides time, WDM divides wavelength, statistical TDM allocates on demand

GATE question blueprint

How this topic is asked, tier by tier — so you can prep to the pattern.

Typical weightage: 5

Question styleMarks eachTypical countWhat it tests
Delay and performance21
Switching21
Layering models11

Exam-hall strategy

Battle-tested tips from mentors and toppers for this topic under the sectional clock.

  1. Write the four delay components as separate lines before computing anything, so transmission and propagation never get merged. Convert every quantity to bits and seconds first, since mixed bytes and bits cause most arithmetic errors here. For multi-hop questions, check whether the routers are store-and-forward, which the question usually states, and then reach for the N plus P minus 1 formula rather than reasoning hop by hop. For bandwidth-delay product, read carefully whether the given delay is one way or round trip. Layer identification questions are answered by asking what span the function protects or spans: one link means data link, whole path means network or transport, and process identification always means transport.

Beyond the exam

Where this skill shows up in the job you're competing for — and in life.

Traceroute exposes the per-hop store-and-forward structur…

Traceroute exposes the per-hop store-and-forward structure directly, and the delay it reports is exactly the four components summed along the path

TCP window scaling exists solely because the original 16-…

TCP window scaling exists solely because the original 16-bit window cannot fill a link whose bandwidth-delay product exceeds 64 kilobytes

MPLS is virtual circuit switching running underneath the …

MPLS is virtual circuit switching running underneath the datagram internet, which is how carriers sell path and latency guarantees

Content delivery networks attack propagation delay rather…

Content delivery networks attack propagation delay rather than bandwidth, because moving the server closer is the only way to reduce a distance-bound term

Jumbo frames of 9000 bytes in data centres are a delibera…

Jumbo frames of 9000 bytes in data centres are a deliberate move along the packet size trade-off curve, buying lower header overhead where links are short and error rates low

Where else this topic is tested

Prepare once, score in every exam that asks it.

GATE CS
GATE DA
UGC NET Computer Science
ISRO Scientist SC
BARC Computer Science

Questions aspirants ask

Pulled from the Q&A community and mentor sessions.

Survivability was the design goal. With no per-connection state in routers, a failure loses only packets in transit and routing reconverges, whereas a virtual circuit network loses every conversation through the failed node. The cost is that quality of service guarantees are hard, which is why carrier networks still run virtual circuit technologies underneath.

Yes, because it supplies the vocabulary. Engineers say layer 3 problem or layer 7 load balancer and expect to be understood, and the seven-layer decomposition is still the clearest statement of what functions a network must provide, even where the running protocols group them differently.

Yes, and it fails exactly when its assumption does. It works because sources are bursty and rarely peak together, so when they do correlate, as during a live broadcast or a synchronised backup window, offered load exceeds capacity and the network responds with queueing delay and loss.

Because signals travel through a medium rather than a vacuum. The refractive index of glass fibre and the dielectric properties of copper both slow propagation to roughly 200,000 kilometres per second, which is the figure to use unless a question states otherwise.

Because reordering is the transport layer's problem, not the network's. TCP sequence numbers restore order at the receiver, so the network is free to route each packet independently. Applications using UDP must handle reordering themselves, which is why many of them add their own sequence numbers.

No. If the transfer is limited by propagation delay and window size rather than by link rate, extra bandwidth changes nothing, since the sender is idle waiting for acknowledgements. This is why a satellite link with enormous capacity can still deliver poor throughput to a single connection.
Header Logo