Packet Switching

2 min read Updated Sun May 03 2026 07:56:35 GMT+0000 (Coordinated Universal Time)

A communication method where a data stream is divided into smaller packets and transmitted independently through the network. More efficient than leased lines.

A packet contain a header, data payload.

Steps:

  1. Data is divided into packets.
  2. Each packet is transmitted independently.
  3. Routers forward packets from node to node.
  4. Packets eventually reach the destination host.

Each packet of the same data stream might be routed through different routes.

2 approaches.

Connectionless

Packets transmitted without establishing a connection beforehand. Simple. Flexible.

A network following connectionless packet switching is called as connectionless network or a datagram service.

Each packet contains the destination address. Routing decisions are made independently for each packet. Usually no built-in error control.

Forwarding

The process of switching a packet from an input line to an output line. Done by routers using forwarding tables. Each router maintains a forwarding table mapping from destination address to next hop.

Connection-Oriented

Packets transmitted after establishing a virtual circuit between source and destination before transmitting packets.

A network following connectionless packet switching is called as connectionless network or a datagram service.

Connection setup required. Packets follow the same pre-determined path. Routers maintain connection state. Network may provide error control.

Connection Identifier

Aka. CID. Each incoming and outgoing virtual circuit on a switch has a unique identifier. Unique inside a given link. Used in connection-oriented networks.

Routers maintain forwarding tables mapping from incoming CID to outgoing CID. Packets are forwarded based on the CID. Faster forwarding compared to full destination addresses.

Comparison

FeatureConnectionlessConnection-Oriented
SetupNot requiredRequired
Packet addressingDestination addressConnection ID
Router stateNo stateMaintains state
RoutingPer packetPer connection
Failure handlingMinimal effectVirtual circuits terminate
QoSDifficultPossible
Congestion controlDifficultPossible