Packet Switching vs.
Circuit Switching: A Comprehensive Overview
Packet Switching
Packet switching is the dominant technique used in computer networks, including the
Internet. It involves dividing the data into smaller units called packets and
transmitting them independently over the network. The key aspects of packet
switching are:
How It Works:
1. Data Division: Large data is broken into smaller packets, each containing a
portion of the data and metadata, such as the source and destination addresses.
2. Store-and-Forward: Each packet is sent to a network node (such as a switch
or router), stored temporarily in its memory, and then forwarded to the next
node.
3. Dynamic Path Selection: Packets may travel along different paths to reach
the destination. The network dynamically determines the best route for each
packet based on factors like traffic load and link availability.
4. Reassembly: At the destination, the packets are reassembled into the original
data stream.
Key Features:
Efficiency: Network resources are utilized dynamically. Multiple devices can
share the same links without requiring dedicated connections.
Scalability: Suitable for large networks with many devices, as resources are not
tied to specific connections.
Resilience: If a link or node fails, packets can be rerouted through alternate
paths.
Support for Variable Traffic: Handles bursty and unpredictable data traffic
efficiently.
Advantages:
Better utilization of network bandwidth.
Suitable for data-intensive applications, such as file transfers, video streaming,
and web browsing.
Inherent support for retransmission in case of packet loss, ensuring reliable
delivery.
Disadvantages:
Higher latency compared to circuit switching due to store-and-forward delays
and reassembly at the destination.
Packets may arrive out of order, requiring additional processing at the
destination.
Increased complexity in routers and switches for handling packet routing.
Applications:
The Internet and most computer networks.
Applications like email, web browsing, and video conferencing.
Circuit Switching
Circuit switching is a traditional communication method, primarily used in telephony
systems. It involves establishing a dedicated communication path (or circuit) between
the source and destination before data transmission begins.
How It Works:
1. Circuit Establishment: A dedicated circuit is set up by reserving resources
(like bandwidth) along the path between the source and destination.
2. Data Transmission: Once the circuit is established, data is sent as a
continuous stream of bits.
3. Circuit Termination: The circuit is released after the communication session
ends, making resources available for other connections.
Key Features:
Dedicated Path: The communication path is fixed for the duration of the
session, ensuring consistent quality.
Continuous Transmission: Data flows in a continuous, ordered manner
without the need for reassembly.
Connection-Oriented: Requires the circuit to be established before data
transfer begins.
Advantages:
Low latency and no reordering of data packets, making it ideal for real-time
applications.
Guaranteed bandwidth ensures consistent performance.
Simple error detection and correction mechanisms due to the dedicated path.
Disadvantages:
Inefficient resource utilization: Resources are reserved even if no data is being
transmitted, leading to underutilization during idle periods.
Lack of scalability: Establishing and maintaining dedicated circuits for many
users is resource-intensive.
Vulnerable to single-point failures: If a link or node in the circuit fails, the entire
connection is lost.
Applications:
Traditional telephone networks (PSTN).
Certain optical networking scenarios where high, consistent bandwidth is
essential.
Addressing and Routing
1. Addressing
Addressing in networking refers to the system used to uniquely identify devices
(nodes) within a network or an internetwork. Addresses ensure that data sent by one
device reaches the correct destination.
Key Features of Addressing:
Uniqueness: Each device on a network must have a unique address to avoid
confusion.
Hierarchical Structure: Addressing schemes often have a structure (e.g., IP
addresses) to facilitate efficient routing.
Types:
o Unicast Address: Identifies a single device (e.g., a computer or a
server).
o Broadcast Address: Targets all devices on a network.
o Multicast Address: Targets a specific group of devices within the
network.
Examples:
MAC Address: A hardware address unique to each network interface card
(NIC), used for local network communication.
IP Address: A logical address assigned to devices in a network to enable global
communication (e.g., IPv4 or IPv6).
2. Routing
Routing is the process of determining the path that data packets take to travel from a
source node to a destination node across one or more networks. It involves finding the
best route through intermediate devices like routers or switches.
Key Features of Routing:
Dynamic Decision-Making: Routers analyze the network's current state to
decide the best path for packet delivery.
Routing Table: A database maintained by routers that lists possible paths and
their associated costs.
Forwarding: Once the best route is determined, the router forwards packets to
the next device along the path.
What is Byte-Oriented Communication?
Byte-oriented communication refers to a framing approach in data transmission
where each frame of data is viewed and structured as a collection of bytes (or
characters), rather than individual bits. This approach is designed to organize and
transmit data in a sequence of clearly defined fields, making it easier to identify the
start and end of each frame.
Approaches in Byte-Oriented Framing
1. Sentinel-Based Approach
Uses special characters as markers for the start and end of a frame.
Examples:
o BISYNC: Uses characters like SYN, SOH, STX, and ETX as sentinels.
o PPP: Uses the special character 01111110 as a flag to denote frame
boundaries.
Character Stuffing: Escapes sentinel characters (e.g., ETX or DLE) when they
appear in the data payload to avoid misinterpretation.
2. Byte-Counting Approach
Adds a field in the frame header specifying the number of bytes in the payload.
Example:
o DDCMP: Includes a COUNT field to indicate payload size.
Challenge: Corruption of the count field can cause framing errors, making it
difficult to determine the correct frame boundaries.