How packet switching works
Packet switching is a method of moving data across a network in which each message is broken into small blocks called packets. Each packet carries a header with its source and destination address and a sequence number, followed by a slice of the data, the payload. Network devices forward every packet on its own, and the receiver reassembles them into the original message.
The idea was developed independently in the 1960s by Paul Baran at the RAND Corporation and Donald Davies at the UK National Physical Laboratory, who coined the word packet. ARPANET, the forerunner of the internet, put it into service in 1969. The Internet Protocol, defined for IPv4 in RFC 791, is a packet switching protocol, and so is Ethernet, which calls its packets frames.
A packet switched network lets many conversations share the same links, because packets from different senders are interleaved on the wire. Capacity is used only when someone has data to send, which is far more efficient for bursty computer traffic than reserving a line for each conversation.
The steps a packet takes
Every packet goes through the same steps, whether it crosses one switch or a continent.
-
//
Split. The sending device divides the data into packets small enough for the network, typically up to 1,500 bytes of payload on standard Ethernet.
-
//
Address. Each layer adds a header: TCP or UDP port numbers, IP addresses and Ethernet MAC addresses.
-
//
Forward. Each switch or router reads the header, looks up the next hop and sends the packet on. Switches use MAC addresses and routers use IP addresses.
-
//
Queue. If the outgoing link is busy, the packet waits in a buffer. A full buffer drops packets.
-
//
Reassemble. The receiver puts packets back in order. TCP requests any that are missing, and UDP leaves that to the application.
Circuit switching vs packet switching
Circuit switching sets up a dedicated path between the two ends before any data is sent and holds it for the whole call, as the traditional telephone network did. Packet switching reserves nothing in advance.
| Feature | Circuit switching | Packet switching |
|---|---|---|
| Path | Dedicated, set up before data flows | Chosen per packet or per flow |
| Link use | Reserved even when idle | Shared, used only when sending |
| Delay | Fixed once connected | Varies with queuing |
| Capacity per user | Guaranteed | Best effort unless QoS is applied |
| Effect of a failed link | The call drops | Packets reroute where paths exist |
| Efficiency for bursty data | Low | High |
| Examples | Analogue and ISDN telephone networks | Ethernet, IP, the internet, 4G and 5G data |
Packet networks have largely replaced circuit networks, even for voice, because sharing links is so much cheaper. The trade-off is variable delay, which matters for voice, video and control traffic.
Datagram and virtual circuit switching
Packet switching comes in two forms. In datagram switching, used by IP, each packet is routed independently and packets from one message can take different paths and arrive out of order. In virtual circuit switching, used by older X.25 and Frame Relay networks and by MPLS today, a path is set up first and every packet of the flow follows it, which keeps packets in order and makes traffic easier to engineer.
An Ethernet switch forwards frames using a MAC address table, either storing each frame and checking it before sending (store and forward) or starting to send as soon as it has read the destination (cut-through). Our explainer on how an Ethernet switch forwards traffic covers both, and our comparison of layer 3 switches and routers covers forwarding by IP address.
Delays in a packet switched network
Four delays add up at each hop: processing, while the device reads the header; queuing, while the packet waits for the link; transmission, the time to put the bits on the wire; and propagation, the time the signal takes to travel. Queuing delay is the one that varies, and its variation, called jitter, is the main weakness of packet switching for real-time traffic.
Control networks deal with it in two ways. Quality of service marks time-critical packets so switches send them first. Time-Sensitive Networking goes further, scheduling traffic so delivery times are bounded, and our guide to Time-Sensitive Networking explains how. On the plant floor, managed industrial switches provide the priority queues that keep control traffic ahead of bulk data.
Packet switching on industrial networks
Industrial networks once used dedicated serial links and fieldbuses, which behaved more like circuits: one master, fixed polling and predictable timing. Moving that traffic onto Ethernet brings it onto shared, packet switched links alongside camera streams, file transfers and remote access.
That works well when the network is designed for it. Separate control and bulk traffic with VLANs, give control packets a higher priority, keep switch uplinks well below full load, and avoid chaining so many switches that the delay at each hop adds up. Where a process needs guaranteed timing rather than priority, TSN switches schedule the traffic instead.
Quick answers on packet switching
Packet switching: common questions
Why is packet switching used on the internet?
Because it shares links efficiently. Capacity is used only while data is moving, and packets can route around failed links, which a circuit network cannot do mid-call.
Is Ethernet packet switching?
Yes. Ethernet switches forward each frame independently by its destination MAC address, so a switched Ethernet LAN is a packet switched network.
What happens if a packet is lost?
It depends on the protocol. TCP notices the gap and the sender retransmits. UDP does not, so the application either ignores the loss or handles it, as video and voice do.
Do packets arrive in order?
Not always. IP packets can take different paths and arrive out of order. TCP uses sequence numbers to put them back in order before handing data to the application.
Who invented packet switching?
Paul Baran and Donald Davies. They developed it independently in the 1960s, in the US and the UK. Davies named the packet.
We supply managed industrial switches with the priority queues and VLANs a control network needs, and configure them with the computers and devices in every system we build.