14.2 Circuit switching, packet switching

Bulk view disabled for Guests. View lessons individually.

Switching & Collision Management

1. Switching Techniques

Before data can be sent, the network must decide how to route it. There are two primary methods:

Circuit Switching

A dedicated physical path is established between the sender and receiver for the entire duration of the connection.

  • Pros: Guaranteed bandwidth; no latency.
  • Cons: Inefficient (path is blocked even if no data is being sent).

Packet Switching

Data is broken into independent packets. Each packet can take a different route to reach the destination.

  • Pros: Highly efficient; robust if one route fails.
  • Cons: Packets may arrive out of order; requires reassembly.
The Postal Analogy:
Circuit Switching is like a private motorcade from Nairobi to Mombasa—the road is cleared just for you.
Packet Switching is like sending 100 postcards. Some might go by plane, some by truck. They arrive at different times, but the receiver can put them in order using the numbers on the back.

2. Handling Collisions

In a shared network, if two devices "speak" at the same time, the signals overlap and become garbled. This is a Collision.

A. CSMA/CD (Collision Detection)

Used in Wired Ethernet. Devices listen to the wire before sending.

  1. Listen: Is the line quiet?
  2. Send: Start transmitting.
  3. Detect: If a collision occurs, send a Jam Signal.
  4. Wait: Both devices wait a random amount of time before retrying.

B. CSMA/CA (Collision Avoidance)

Used in Wireless (Wi-Fi). Collisions are harder to detect in the air, so we try to avoid them entirely.

  • The device sends a Request to Send (RTS) signal to the Router.
  • The Router responds with a Clear to Send (CTS) signal.
  • Other devices see the CTS and stay quiet while the first device transmits.
The Classroom Analogy:
CSMA/CD is like a rowdy classroom where students wait for a gap in noise to speak. If two start at once, they both stop, wait a second, and try again.
CSMA/CA is like raising your hand. The teacher (Router) calls your name, giving you "permission" to speak while everyone else waits.
⚠️ Exam Note: Packet Structure

In A2, remember that a packet contains: Header (Sender/Receiver IP, Sequence Number), Payload (Actual Data), and Trailer (Checksum for error detection).