Show understanding of packet switching
Resources |
Subject Notes |
Computer Science
Packet Switching - A-Level Computer Science
Packet Switching
Packet switching is a method of transmitting data over a network by dividing it into small units called packets. These packets are then transmitted independently across the network and reassembled at the destination.
How Packet Switching Works
- Segmentation: The sending device divides the data into packets.
- Packet Header: Each packet receives a header containing addressing information (source and destination), sequence numbers, and error detection codes.
- Transmission: Packets are sent independently across the network. They may travel different routes.
- Routing: Routers along the network path examine the packet headers and forward the packets towards the destination.
- Reassembly: The receiving device collects the packets, uses the sequence numbers to reorder them, and reconstructs the original data.
Advantages of Packet Switching
- Efficient Use of Bandwidth: Bandwidth is not tied up while data is waiting to be transmitted.
- Robustness: If one route is congested or fails, packets can be rerouted.
- Flexibility: Supports different data types and variable data sizes.
- Cost-Effective: Generally more cost-effective than circuit switching, especially for bursty traffic.
Disadvantages of Packet Switching
- Variable Delay: Packets may experience different delays due to varying network conditions.
- Overhead: The packet headers add overhead to the data transmission.
- Complexity: Requires more complex network infrastructure and protocols.
Packet Switching vs. Circuit Switching
Here's a table comparing packet switching and circuit switching:
Feature |
Circuit Switching |
Packet Switching |
Dedicated Path |
Yes |
No |
Bandwidth Allocation |
Dedicated |
Shared |
Delay |
Predictable |
Variable |
Efficiency |
Less efficient (bandwidth wasted when no data is being transmitted) |
More efficient (bandwidth is only used when data is being transmitted) |
Complexity |
Less complex |
More complex |
Error Detection
Packet headers often include error detection codes, such as checksums or Cyclic Redundancy Checks (CRCs), to detect errors that may occur during transmission. If an error is detected, the packet may be discarded or retransmitted.
Protocols
Common packet switching protocols include:
- IP (Internet Protocol): The fundamental protocol for packet switching on the Internet.
- TCP (Transmission Control Protocol): Provides reliable, connection-oriented data transmission.
- UDP (User Datagram Protocol): Provides connectionless, unreliable data transmission.