Menu

Earn Premium with Referrals

Invite your friends and earn Premium rewards through our referral program.

See how it works and start inviting friends.

Switching, Error Detection & Flow Control
CN

Switching, Error Detection & Flow Control

How data is moved and validated: From Packet Switching to CRC error checks.

Circuit Switching vs Packet Switching

AspectCircuit SwitchingPacket Switching
PathDedicated end-to-end circuitNo dedicated path — packets routed independently
Resource useReserved even when idleShared — efficient for bursty traffic
SetupConnection established before communicationPackets sent immediately (no setup)
DelayConstant (once connected)Variable (queuing at each hop)
ExampleTraditional telephone networkThe Internet

The Internet uses packet switching because computer traffic is bursty. A web page loads in bursts with idle periods between clicks. Packet switching lets many users share the same link efficiently.

Error Detection — CRC (Cyclic Redundancy Check)

The sender appends an FCS (Frame Check Sequence) to each frame. The receiver recomputes it and discards the frame if it doesn’t match.

CRC is far better than simple checksums at detecting burst errors (multiple consecutive corrupted bits). A 32-bit CRC (CRC-32) detects all single-bit errors, all double-bit errors, and any odd number of errors.

Flow Control

Prevents the sender from overwhelming the receiver.

MethodHow it worksEfficiency
Stop-and-WaitSend one frame, wait for ACK, send nextLow — cable idle while waiting
Sliding WindowSend up to N frames before requiring an ACKHigh — continuous flow

The number of frames a sender can transmit before receiving an ACK is called the window size. TCP’s sliding window is adaptive — it grows when the network is good and shrinks when congestion is detected.

Q: Why is Packet Switching preferred for the Internet?

A: Computer traffic is bursty — active periods of transmission followed by idle time. Packet switching shares the link among many users, maximizing utilization. Circuit switching would waste bandwidth on idle connections.

Q: What is CRC?

A: Cyclic Redundancy Check — an error-detecting code. The sender divides the data by a predetermined polynomial and appends the remainder. The receiver performs the same division — if the remainders differ, a bit error was detected. Highly effective against burst errors.

Q: What is the goal of flow control?

A: To match the sender’s transmission rate to the receiver’s processing capacity. Without flow control, a fast sender can overflow the receiver’s buffer, causing packet loss and retransmissions.

Q: How does sliding window flow control differ from Stop-and-Wait?

A: Stop-and-Wait sends one frame and waits — throughput is limited by latency. Sliding Window allows multiple outstanding frames, keeping the link fully utilized. TCP uses a sliding window.

My Private Notes

Notes are auto-saved locally to this device.