🔀 Tutorial 3: Network Core – Packet Switching and Circuit Switching

COMP347 (Revision 10) | TrustOpen University

📑 Table of Contents

🎯 Learning Objectives

Upon completion of this expanded tutorial, students will be able to:

🔭 Overview

The network core is the backbone of the Internet—a vast interconnected mesh of routers and high‑speed links that moves data across continents. This tutorial provides a rigorous, mathematically‑grounded examination of the core's two fundamental switching paradigms: packet switching and circuit switching. We dissect the store‑and‑forward operation, statistical multiplexing, and the queuing dynamics that lead to delay and loss. We then analyse circuit switching with its resource reservation and deterministic performance. Through quantitative examples and comparison tables, we illuminate why packet switching dominates modern data networks. We also explore the Internet's hierarchical structure, peering and transit agreements, and the hybrid approach of virtual circuits. Finally, we introduce queuing theory models that enable engineers to dimension buffers and predict performance.


1. The Network Core: An Overview

The network core comprises the interconnected packet switches (routers) and communication links that form the Internet's backbone. Its primary functions are:

Key components: high‑speed fibre links (10–400 Gbps), routers with large forwarding tables, and Internet Exchange Points (IXPs) where ISPs interconnect.


2. Packet Switching – Principles and Mechanics

2.1 Store‑and‑Forward and Transmission Delay

In packet switching, data is divided into packets. Each router must receive the entire packet before forwarding (store‑and‑forward). This allows error checking and routing decisions.

Transmission delay at a link: \( d_{trans} = L / R \), where \( L \) is packet length (bits) and \( R \) is link rate (bps). For a path with \( N \) links, the total transmission delay (excluding propagation and processing) is \( N \cdot L / R \).

Example: A 1,500‑byte packet (12,000 bits) on a 100 Mbps link: \( d_{trans} = 12000 / 10^8 = 0.12 \) ms. Across 10 links: 1.2 ms.

2.2 Statistical Multiplexing

Statistical multiplexing dynamically allocates bandwidth to users based on their actual traffic demand. Unlike FDM/TDM, where bandwidth is fixed, statistical multiplexing achieves high utilisation because idle users do not consume capacity. The aggregate traffic can exceed the link rate temporarily, but over time the average is within capacity, leveraging the bursty nature of data traffic.

2.3 Queuing and Loss

Each output link has a queue (buffer). If the average arrival rate exceeds the service rate, the queue grows; when full, packets are dropped (loss). The traffic intensity \( \rho = \frac{L \cdot a}{R} \) (where \( a \) is arrival rate in packets/s) determines queuing behaviour:

2.4 Advantages and Disadvantages

Advantages: efficiency, resilience (rerouting), scalability, flexibility. Disadvantages: variable delay, packet loss, no guaranteed QoS without additional mechanisms.


3. Circuit Switching – Dedicated Communication

3.1 Phases of Operation

  1. Circuit establishment: resources are reserved along the path.
  2. Data transfer: data is transmitted over the dedicated circuit.
  3. Circuit teardown: resources are released.

3.2 Multiplexing in Circuit Switching: FDM and TDM

Both allocate fixed capacity, leading to inefficiency during silent periods.

3.3 Advantages and Disadvantages

Advantages: guaranteed bandwidth, fixed delay (no queuing), simple forwarding. Disadvantages: inefficiency, setup overhead, less resilient.


4. Packet vs. Circuit Switching: A Quantitative Comparison

4.1 Performance Analysis Example

Consider a 1 Mbps link. Each user generates 100 kbps when active, and is active 10% of the time.

This illustrates the statistical multiplexing gain of packet switching.

4.2 Comparison Table

Feature Packet Switching Circuit Switching
Resource allocation On‑demand Pre‑allocated
Delay Variable (queuing) Fixed
Loss Possible None (within circuit)
Efficiency High Low (idle)
Setup phase None (or virtual) Required
Complexity Higher Lower
Resilience High (rerouting) Low (must re‑establish)
QoS Best‑effort (without QoS) Guaranteed

5. Internet Structure: A Network of Networks

5.1 ISP Hierarchy

5.2 Peering, Transit, and IXPs


6. Virtual Circuits and MPLS

Virtual circuit switching combines aspects of packet and circuit switching. A setup phase establishes a path and assigns a virtual circuit identifier (VCI). Each packet carries the VCI, and routers forward based on it (no longest prefix match). This provides fast forwarding and can reserve resources.

MPLS (Multi‑Protocol Label Switching) is a widely used virtual‑circuit technology in ISP backbones for traffic engineering and VPNs. It uses labels (short, fixed‑length) for fast forwarding.


7. Queuing Theory and Delay Models

The M/M/1 queue (Poisson arrivals, exponential service times, single server) provides closed‑form expressions:

For finite buffers (M/M/1/K), loss probability is given by \( P_{loss} = \frac{(1-\rho)\rho^K}{1-\rho^{K+1}} \) (for \( \rho \neq 1 \)).

These models are essential for buffer sizing and QoS provisioning.


📝 Quiz: Tutorial 3

Q1: What are the three main functions of the network core?

Answer

Forwarding, routing, and switching.

Q2: What is the store‑and‑forward mechanism?

Answer

A router must receive the entire packet before forwarding it.

Q3: How is transmission delay calculated?

Answer

\( d_{trans} = L / R \), where L is packet length (bits) and R is link rate (bps).

Q4: What is statistical multiplexing?

Answer

Dynamic allocation of bandwidth among users based on actual demand; more efficient than FDM/TDM.

Q5: What happens when traffic intensity \( \rho \) exceeds 1?

Answer

The queue grows without bound and packet loss occurs.

Q6: What are the two multiplexing techniques used in circuit switching?

Answer

FDM (Frequency Division Multiplexing) and TDM (Time Division Multiplexing).

Q7: Why is circuit switching inefficient for data traffic?

Answer

It reserves resources even during idle periods, leading to low utilisation.

Q8: What is the difference between peering and transit?

Answer

Peering is direct exchange, often free; transit is paid access to the Internet.

Q9: What is an IXP?

Answer

An Internet Exchange Point is a physical location where multiple ISPs interconnect to exchange traffic.

Q10: What is the role of MPLS in the network core?

Answer

MPLS uses labels for fast forwarding, enabling traffic engineering and VPNs.

Q11: In an M/M/1 queue, what is the average queuing delay if \( \lambda = 500 \) packets/s and \( \mu = 1000 \) packets/s?

Answer

\( \rho = 0.5 \); \( W = \rho / (\mu - \lambda) = 0.5 / (1000 - 500) = 0.001 \) s = 1 ms.

Q12: What is the main advantage of packet switching over circuit switching?

Answer

Higher efficiency due to statistical multiplexing.


✏️ Exercises: Tutorial 3

Exercise 1 – Transmission delay calculation

A 10,000‑bit packet is sent over a 10 Mbps link. Calculate the transmission delay. If the packet traverses 5 routers (6 links), what is the total transmission delay?

Solution

\( d_{trans} = 10000 / 10^7 = 0.001 \) s = 1 ms. Across 6 links: 6 ms.

Exercise 2 – Circuit vs packet switching capacity

A 10 Mbps link is shared by users, each generating 200 kbps when active, active 5% of the time. How many users can circuit switching support? How many can packet switching support with negligible loss probability?

Solution

Circuit: 10 Mbps / 200 kbps = 50 users. Packet: with 200 users, expected active = 10; probability of > 50 active is tiny, so 200 users are easily supported.

Exercise 3 – Statistical multiplexing gain

Explain why packet switching can support more users than circuit switching on the same link.

Solution

Because users are not simultaneously active; packet switching exploits the burstiness of traffic by allocating bandwidth on demand, while circuit switching reserves fixed capacity for each user regardless of activity.

Exercise 4 – ISP hierarchy

Describe the path of a packet from a user in a small town to a web server in another country, identifying the ISP tiers involved.

Solution

User → Tier‑3 (local ISP) → Tier‑2 (regional ISP) → Tier‑1 (backbone) → possibly IXP → Tier‑1 (destination) → Tier‑2 → Tier‑3 → web server.

Exercise 5 – M/M/1 queuing

A router has a service rate of 2000 packets/s and an arrival rate of 1600 packets/s. Compute the average queuing delay and the average number of packets in the queue.

Solution

\( \rho = 1600/2000 = 0.8 \). \( W = \rho / (\mu - \lambda) = 0.8 / (2000 - 1600) = 0.8 / 400 = 0.002 \) s = 2 ms. Average queue length \( N_q = \rho^2 / (1 - \rho) = 0.64 / 0.2 = 3.2 \) packets.

Exercise 6 – Virtual circuits

Compare virtual circuit switching to datagram packet switching in terms of setup overhead and forwarding speed.

Solution

Virtual circuit requires setup (overhead), but forwarding uses a fast label lookup (VCI) instead of longest prefix match, so forwarding is faster. Datagram has no setup but routing lookups are more complex.


📚 Homework: Tutorial 3

Homework 1 – History of packet switching

Research the contributions of Paul Baran, Donald Davies, and Leonard Kleinrock to the development of packet switching.

Guidance

Baran (RAND) proposed packet switching for military networks; Davies (UK) coined "packet" and built the NPL network; Kleinrock developed queuing theory for packet networks.

Homework 2 – End‑to‑end principle

How does the simplicity of the network core (best‑effort IP) enable innovation at the edge? Provide examples.

Guidance

The core does not enforce reliability or security, allowing applications to implement their own (TCP, TLS). This enables rapid deployment of new protocols like QUIC.

Homework 3 – MPLS and traffic engineering

Explain how MPLS can be used to steer traffic around congested links in an ISP network.

Guidance

MPLS labels can be used to establish explicit paths (label‑switched paths) that bypass congested links, enabling traffic engineering.

Homework 4 – Queuing theory analysis

For an M/M/1 queue with \( \rho = 0.9 \), compute the average queuing delay and compare it to \( \rho = 0.5 \). Discuss the impact of approaching 1.

Guidance

For \( \rho = 0.9 \), delay is 9 times larger than for \( \rho = 0.5 \). As \( \rho \to 1 \), delay grows asymptotically.

Homework 5 – Peering economics

Why do Tier‑1 ISPs peer for free while Tier‑2 ISPs pay for transit? Explain the economic rationale.

Guidance

Tier‑1s have symmetric traffic flows and mutual benefit; Tier‑2s need access to the full Internet and pay for the reach.


📌 Summary

This tutorial has explored the network core in depth:

Understanding the network core is essential for grasping how data moves across the globe. In the next tutorial, we will delve into performance metrics: delay, loss, and throughput, and their impact on applications.