Packet Switching vs. Message Switching: Key Differences Explained

networking
packet switching
message switching
data communication
protocols

This article delves into the differences between packet switching and message switching. We’ll also touch upon the differences between circuit switching and packet switching. Before diving in, it’s recommended to familiarize yourself with the basics of circuit switching vs. packet switching.

Let’s imagine data communication between a source machine and a destination machine, connected by three routers. (The number of routers can vary in real-world scenarios.)

Message Switching

Figure 1 illustrates the operation of message switching.

message switching Figure 1: Message Switching

As you can see, each router waits to receive the entire message before forwarding it to the next link. This process repeats at each router along the path.

In message switching:

Total Transmission Time = LtPROP+LT=LtPROP+L(kP)L \cdot t_{PROP} + L \cdot T = L \cdot t_{PROP} + L \cdot (k \cdot P)

Where:

  • LL = Number of Hops
  • tPROPt_{PROP} = Propagation delay per hop
  • kk = Number of packets representing each message
  • PP = Time for transmitting each packet
  • TT = Time for transmitting the complete message = kPk \cdot P

Packet Switching

Packet switching can be considered a specialized form of message switching. It emerged with the advancement of computer communication and networking. In packet switching, the message is broken down into smaller units called packets.

This allows each router to begin transmission as soon as the first packet arrives, saving a significant amount of time, especially when the number of hops between source and destination is high and therefore the propagation delay is more significant.

Figure 2 shows how packet switching works.

packet switching Figure 2: Packet Switching

In packet switching:

Total Transmission Time = LtPROP+LP+(k1)PL \cdot t_{PROP} + L \cdot P + (k - 1) \cdot P

Packet Switching vs. Message Switching: A Detailed Comparison

Let’s summarize the key differences between packet switching and message switching.

packet switching vs message switching

Figure 3: Packet Switching vs. Message Switching

  • Overhead: Message switching generally has lower overhead compared to packet switching. In message switching, a single datagram is transmitted, with a header appended to the entire message. In packet switching, the message is divided into smaller packets, and each packet has its own header.

    Overhead in message switching = header(header+message)\frac{header}{(header + message)}

    Overhead in packet switching = nheader(nheader+message)\frac{n \cdot header}{(n \cdot header + message)}, where n=messagepacket_sizen = \frac{message}{packet\_size}

  • Reliability and Complexity: Message switching typically offers higher reliability and lower complexity. In message switching, a single datagram is either received or lost, following a single network path. Packet switching, on the other hand, allows packets from the same source and destination to take different paths. This means packets might arrive out of order, requiring sequencing based on sequence numbers embedded in the header. While packet switching may lose or corrupt only a subset of the message (instead of discarding the entire message like message switching), it introduces complexity in reassembling the original message. Based on the integrity of the overall received (possibly corrupt) message, an effort can be made to “interpret” what the original message should have been. Due to this characteristic, message switching may not be suitable for real-time scenarios like voice communication.

  • Time Efficiency: As explained earlier, message switching generally takes more time than packet switching. This is because the entire message must be stored at each hop point until it’s completely received before being forwarded.

OSI Model: Advantages and Disadvantages

OSI Model: Advantages and Disadvantages

Explore the OSI model's advantages and disadvantages, including its layered architecture, benefits for interoperability, and drawbacks compared to TCP/IP.

osi model
networking
protocols
X.25 Protocol: Advantages and Disadvantages

X.25 Protocol: Advantages and Disadvantages

Explore the X.25 protocol, covering its benefits such as reliability and faster response times, as well as its drawbacks, including low data rates and overhead.

x.25
protocol
networking
TCP vs UDP: Key Differences Explained

TCP vs UDP: Key Differences Explained

Explore the fundamental differences between TCP and UDP, focusing on reliability, connection type, header structure, and use cases.

tcp
udp
networking

Frame Relay vs. X.25: Key Differences Explained

Explore the distinctions between Frame Relay and X.25, two packet-switching technologies, focusing on their error handling, layers, and bandwidth allocation.

frame relay
x.25
packet switching