Chapters

8 Packet Switching and Performance

networking-core
network
mech
packet

8.1 Start With Many Small Decisions

Prove the Urgent Packet Survives Shared Traffic

Picture an alarm waiting behind a large device update on the same link. Both flows may arrive eventually while the alarm still misses its useful deadline.

Firmware means the software stored on a device that controls its hardware. Label its update packets separately from alarms, status, and routine data before testing the shared path.

Send quiet, burst, full-queue, dropped-link, and recovery cases. Keep packet identity, address, hop, queue time, drop, retry, arrival, and deadline result so another person can repeat the trace.

This check covers chosen flows and loads, not every network failure. The deeper sections develop forwarding, queues, congestion, ordering, recovery, and service trade-offs.

Packet switching works because a long conversation is split into small pieces that can be forwarded independently. Each hop makes a local decision using addresses, tables, queues, and current load.

For IoT, those small decisions shape reliability and delay. A firmware update, alarm burst, or camera stream can all share a network, but only if the switching path has enough evidence to forward, queue, and recover without hiding failure.

Packet Pete, the networking guide

Packet Pete

“A packet you can’t trace is a claim you can’t defend — name the address, the route, and the hop that dropped it.”

Through this chapter, Pete follows each packet hop by hop: the header picks the route; the queue, retry, or drop explains the delay.

8.4 Under the Hood: Forwarding Is a Series of Local Decisions

Packet switching feels end-to-end from the application view, but the network executes it as a chain of local choices. At each hop, a device receives a packet, checks enough metadata to decide what to do, waits for an output opportunity, and either forwards, marks, delays, or drops the packet.

Those local choices depend on tables and state that are smaller than the full application conversation. A router may use a forwarding table, a neighbor cache, a next-hop record, a hop-limit or TTL update, and optional quality-of-service markings. A constrained gateway may also decide whether a packet should cross from a low-power mesh into Ethernet, Wi-Fi, or a cellular backhaul. None of those devices needs to reconstruct the whole sensor workflow. They need enough header evidence to choose the next interface, enough buffer space to wait safely, and enough policy to reject traffic that should not pass.

Receive The interface accepts a frame and performs link-layer checks before handing the enclosed packet to the forwarding path.
Classify The device reads fields such as destination, protocol, priority marking, and ingress interface.
Lookup A forwarding table maps the destination or flow class to an output interface and next hop.
Queue If the output is busy, the packet waits according to buffer limits and scheduling policy.
Forward The packet leaves on the selected interface, often with updated hop metadata.

Store-and-forward

Many devices receive the complete packet before forwarding it. That gives the device a chance to validate the frame and make a forwarding decision before the next hop sees it.

Queues create variable delay

When an output link is busy, packets wait. The wait changes with burst size, scheduling policy, retransmissions, and the traffic already ahead in the buffer.

Drops are part of the contract

If a buffer is full, a link fails, or a policy rejects a packet, the packet can be discarded. Recovery must come from transport or application behavior.

8.4.1 Edge and Core: Two Different Forwarding Styles

Not every hop makes its local decision the same way. Real networks are usually built in two layers: an edge of Ethernet switches connecting cameras, sensors, gateways, and access points at each site, and a core of IP routers carrying traffic between sites over a backbone. The two layers forward packets by different rules.

Ethernet switches at the edge are plug-and-play. Each device keeps a flat, topology-independent MAC address, and a switch that does not yet know where an address lives falls back to flooding the frame out every port until a reply teaches it the right one. That is simple to deploy but does not scale past one site: flooding traffic across a wide-area backbone would waste most of the link on frames nobody wants. IP routers at the core solve that differently: they build a forwarding table from routing protocol exchanges before traffic ever arrives, so a table lookup replaces a flood. The tradeoff is setup cost. An Ethernet switch needs no configuration to start forwarding; an IP router needs its routing state to be correct before it can look anything up.

For an IoT deployment, this split explains a familiar pattern: local traffic between a gateway and its sensors usually rides flat, self-configuring Ethernet or Wi-Fi, while traffic between sites or up to the cloud crosses a routed IP backbone. A device that behaves correctly on one site's flat network can still need explicit routing to reach another building or a cloud region.

8.4.2 Router Internals: Queues, Backplane, and Planes

A network router is more than one input port and one output port. Physical interfaces receive frames, line cards hold queues and forwarding hardware, and an internal backplane or switch fabric moves packets between those interfaces. A small router may share memory or a bus for this transfer. A high-capacity chassis uses switched fabrics and line cards so several ports can move traffic at once.

Provision that fabric against offered port load rather than naming it merely “fast.” Using the source notation, backplane speedup is the aggregate backplane capacity divided by port capacity; input and output speedup compare their respective backplane-side capacities with the port capacity. Output-only queueing exposes the extreme case: if every input sends to the same output at once, the output side would need speedup equal to the number of ports to absorb the whole burst. Combined input-output queueing reduces that demand and can improve utilisation, but requires harder scheduling and backpressure logic.

A switched backplane behaves like a small point-to-point network inside the router: disjoint input-output pairs can transfer simultaneously. The source fragments packets into fixed-size cells, giving 64 bytes as an example, so the fabric schedules uniform transfer units instead of leaving a cycle partly unused by a short packet. Commercial designs place that forwarding work in dedicated ASICs while a route-processor CPU runs control-plane routing; a PC router instead uses NICs on a PCI bus and performs more of both jobs on a commodity CPU. In a large slotted chassis, line cards and the route-processor card can be replaced for repair or upgrade, including hot-swapping where the platform supports it.

Before router internals: queues, backplane, and planes, inspect Figure 8.5: Typical router architecture must be considered with Sending. That visual pairing grounds input interfaces and output interfaces connect through an internal backplane, which can be shared memory, a shared bus, or a switched bus depending in named evidence.

A network router with input interfaces and input queues on the left, an internal backplane in the middle, and output queues and output interfaces on the right, with the three backplane implementation styles named below.
Figure 8.5: Input interfaces and output interfaces connect through an internal backplane, which can be shared memory, a shared bus, or a switched bus depending on router capacity.

Locate Typical router architecture on Figure 8.5 before checking Sending. The visual’s third anchor, device, completes input interfaces and output interfaces connect through an internal backplane, which can be shared memory, a shared bus, or a switched bus depending. Carry Typical router architecture into router internals: queues, backplane, and planes; use device as its limiting condition.

Queue placement changes the failure mode. An input-queued router can be simple, but a packet waiting for one busy output can hold packets behind it that were destined for free outputs. That is head-of-line blocking. Output queues avoid that particular block by collecting packets at the egress side, but they require enough fabric and buffer capacity to absorb bursts. Virtual output queues split each input into per-output queues, reducing head-of-line blocking at the cost of more buffer and scheduling complexity.

The visual evidence for router internals: queues, backplane, and planes sits in Figure 8.6. Find Head-of-line blocking beside INPUT QUEUES before interpreting a busy output stalls the head packet in each input queue, blocking packets behind it bound for free outputs; virtual output queues give each input.

Three router input queues, each with a head packet destined for a busy Output 2 blocking the packets behind it that are destined for free Output 1 and Output 3, with an inset panel showing virtual output queues splitting each input into one sub-queue per destination to avoid the stall.
Figure 8.6: A busy output stalls the head packet in each input queue, blocking packets behind it bound for free outputs; virtual output queues give each input one sub-queue per destination so a busy output only stalls its own sub-queue.

Compare Head-of-line blocking with INPUT QUEUES inside the visual at Figure 8.6. Next find one shared FIFO per input, which completes the scope of a busy output stalls the head packet in each input queue, blocking packets behind it bound for free outputs; virtual output queues give each input. The decision in router internals: queues, backplane, and planes must preserve that labelled boundary.

Keep the control plane and data plane separate in incident notes. The control plane computes routes, learns topology, and updates forwarding tables. The data plane applies those tables at line rate: classify, queue, forward, mark, or drop. A route processor or controller can be healthy while one output queue is congested, and an output queue can be empty while the routing table is wrong. Good evidence names which plane made the decision and where the packet waited.

Figure 8.7 makes router internals: queues, backplane, and planes inspectable through Control plane vs. data plane and ROUTE PROCESSOR. Those diagram labels establish the scope of the control plane’s route processor computes and installs the forwarding table; the data plane’s switching fabric and line cards apply that table to.

A route processor labeled as the control plane sits above a switching fabric, which connects on both sides to line cards labeled as the data plane, with a dashed arrow for the control path installing the forwarding table and solid arrows for the data path forwarding packets at line rate.
Figure 8.7: The control plane’s route processor computes and installs the forwarding table; the data plane’s switching fabric and line cards apply that table to every packet at line rate.

Use ROUTE PROCESSOR to test Control plane vs. data plane in the diagram at Figure 8.7. Then inspect runs routing protocols as the final qualifier on the control plane’s route processor computes and installs the forwarding table; the data plane’s switching fabric and line cards apply that table to. That sequence keeps router internals: queues, backplane, and planes tied to what is visibly labelled.

Decision record for incidents: capture the path, the queue or radio state at each constrained hop, the retry behavior, and the application freshness requirement. That record connects forwarding mechanics to user-visible performance.

Pete’s Delivery Slip

  • Address: the classify step reads destination, protocol, priority marking, and ingress interface.
  • Route: the forwarding table maps destination to output interface and next hop, with hop metadata updated.
  • Receipt: a full buffer, failed link, or policy drop discards the packet — recovery belongs to transport or application.

8.5 Summary

Packet switching lets many IoT flows share the same network by forwarding independent packets instead of reserving a dedicated circuit for each conversation. Routers make local forwarding decisions from packet headers, while queues, retries, overhead, and path changes determine the performance that applications actually experience.

For design reviews, separate bandwidth, throughput, goodput, delay, and jitter. A link can have enough nominal capacity and still fail a control-loop requirement if useful packets wait behind bulk traffic or spend too much of the budget on overhead and recovery.

8.6 Key Takeaway

Packet switching scales IoT because shared links can carry many bursty flows, but shared links also create queueing, overhead, and loss tradeoffs. Measure useful delivered payload and timing evidence, not just nominal link speed.

8.7 See Also