Packet Switching: Shared Resource Data Networks
Store-and-Forward Switching
Read aloud is unavailable in this browser.
The Fundamental Paradigm Shift in Networking
In the early days of telecommunications, the dominant paradigm was circuit switching—a model that established dedicated, end-to-end paths for each communication session. While effective for continuous voice traffic, circuit switching fundamentally underutilized network resources when applied to the bursty nature of data communication.
The breakthrough came with packet switching, a revolutionary approach that fragments data into discrete units called packets, routes each independently through a shared network infrastructure, and reassembles them at the destination. At the heart of packet switching lies a deceptively simple technique: store-and-forward switching.
This page provides an exhaustive examination of store-and-forward switching—the mechanism that enables modern internetworking. We will explore its fundamental principles, operational mechanics, performance characteristics, and the engineering tradeoffs that make it the cornerstone of virtually all data networks today.
By completing this page, you will: (1) Understand the precise operational mechanics of store-and-forward switching, (2) Calculate store-and-forward delay with mathematical precision, (3) Analyze the advantages and limitations of this approach, (4) Compare store-and-forward with alternative switching techniques, and (5) Apply this knowledge to real-world network design decisions.
Conceptual Foundation: What is Store-and-Forward?
Store-and-forward switching is a data transmission technique where an intermediate network device (switch, router, or node) must receive an entire packet before it can begin forwarding that packet to the next hop. This contrasts sharply with techniques like cut-through switching, where forwarding can begin as soon as the destination address is read.
The Three-Phase Operation
Store-and-forward switching operates through three distinct phases:
-
Store Phase: The entire packet is received bit-by-bit and stored in the device's buffer memory. The device must wait until the complete packet arrives, including all headers, payload, and trailer (typically containing error-detection codes).
-
Process Phase: Once the complete packet is buffered, the device performs essential operations:
- Error checking: Validates the frame check sequence (FCS) or cyclic redundancy check (CRC)
- Destination lookup: Examines addressing information to determine the output port
- Queuing decision: Places the packet in the appropriate output queue
- Policy enforcement: Applies QoS policies, access control, or traffic shaping
-
Forward Phase: The device transmits the packet on the selected output link, bit-by-bit, to the next hop (another switch/router or the final destination).
Why "Store" Before "Forward"?
The requirement to store the complete packet before forwarding serves several critical purposes:
- •Error Detection and Isolation: By receiving the complete packet including the error-detection field (CRC/FCS), the switch can detect corrupted packets and discard them rather than propagating errors through the network. This prevents wasted bandwidth from forwarding damaged frames.
- •Speed Matching: When input and output ports operate at different speeds (e.g., 100 Mbps input, 1 Gbps output), buffering allows the device to receive at one rate and transmit at another—a capability impossible with direct cut-through forwarding.
- •Statistical Multiplexing: Buffering enables multiple input streams to share output capacity through queuing. When aggregate input traffic momentarily exceeds output capacity, packets are queued rather than lost.
- •Complete Header Access: Some routing/switching decisions require information from multiple header fields or even payload inspection (deep packet inspection). Full packet availability enables comprehensive analysis.
- •Protocol Conversion: In heterogeneous networks, buffering allows conversion between different frame formats, maximum transmission units (MTUs), or link-layer protocols.
Store-and-forward predates digital computer networks. The concept originated in telegraph and postal systems where messages were received at relay stations, stored temporarily, and forwarded to the next station. Paul Baran's seminal 1964 RAND report on distributed communication networks formalized this approach for data networks, directly influencing the design of ARPANET—the precursor to the modern Internet.
Mathematical Analysis of Store-and-Forward Delay
Understanding the delay characteristics of store-and-forward switching is essential for network design and performance analysis. Let us develop a rigorous mathematical framework for calculating end-to-end delay.
Fundamental Delay Components
The total delay experienced by a packet traversing a store-and-forward network consists of four components at each hop:
1. Transmission Delay (d_trans)
The time required to push all bits of the packet onto the link. This is a function of packet size and link bandwidth:
$$d_{trans} = \frac{L}{R}$$
Where:
- L = Packet length in bits
- R = Link transmission rate in bits per second
2. Propagation Delay (d_prop)
The time for a bit to travel from sender to receiver across the physical medium:
$$d_{prop} = \frac{d}{s}$$
Where:
- d = Distance between nodes in meters
- s = Propagation speed in the medium (≈2×10⁸ m/s for copper/fiber)
3. Processing Delay (d_proc)
The time required for the switch/router to examine header fields, perform error checking, and determine the output interface. Typically microseconds in modern hardware.
4. Queuing Delay (d_queue)
The time a packet waits in the output buffer before transmission. Highly variable, depending on traffic intensity.
The key characteristic of store-and-forward is that a packet incurs a FULL transmission delay at EVERY hop. Unlike cut-through switching (where forwarding can begin after receiving just the header), store-and-forward requires the entire packet to be received before any forwarding begins. This accumulates into significant latency across multiple hops.
End-to-End Delay Formula
Consider a packet traversing N links (N-1 intermediate switches) from source to destination:
$$D_{total} = N \cdot d_{trans} + \sum_{i=1}^{N} d_{prop,i} + \sum_{i=1}^{N-1} d_{proc,i} + \sum_{i=1}^{N-1} d_{queue,i}$$
Simplifying for identical links and assuming negligible processing delay:
$$D_{total} = N \cdot \frac{L}{R} + N \cdot d_{prop} + D_{queue}$$
Worked Example
Problem: Calculate the end-to-end delay for a 1500-byte packet traversing 3 links (source → switch1 → switch2 → destination). Each link is 100 km with a transmission rate of 100 Mbps. Assume negligible processing and queuing delays.
Solution:
-
Convert packet size: L = 1500 bytes × 8 = 12,000 bits
-
Calculate transmission delay per hop: $$d_{trans} = \frac{12,000 \text{ bits}}{100 \times 10^6 \text{ bps}} = 0.12 \text{ ms} = 120 \text{ μs}$$
-
Calculate propagation delay per hop: $$d_{prop} = \frac{100 \times 10^3 \text{ m}}{2 \times 10^8 \text{ m/s}} = 0.5 \text{ ms} = 500 \text{ μs}$$
-
Total delay with N = 3 links: $$D_{total} = 3 \times 0.12 + 3 \times 0.5 = 0.36 + 1.5 = 1.86 \text{ ms}$$
Notice that the packet incurs three full transmission delays—one at the source and one at each of the two intermediate switches. This is the store-and-forward penalty.
| Component | Per-Hop Value | Number of Occurrences | Total Contribution |
|---|---|---|---|
| Transmission Delay | 120 μs | 3 (each hop) | 360 μs |
| Propagation Delay | 500 μs | 3 (each link) | 1500 μs |
| Processing Delay | ~1-10 μs | 2 (each switch) | ~2-20 μs |
| Queuing Delay | Variable | 2 (each switch) | Variable |
| Total (minimum) | — | — | ~1.86 ms |
Implementation in Network Devices
Store-and-forward switching is implemented across various network devices, each with specific architectural considerations. Understanding these implementations is crucial for network engineering.
Layer 2 Switches (Ethernet Switches)
Modern Ethernet switches primarily operate in store-and-forward mode, though many also support cut-through as a configurable option.
Buffer Architecture:
-
Input Buffering: Packets are stored in memory associated with the input port. Simple but can suffer from head-of-line (HOL) blocking—where a packet destined for an idle output is stuck behind a packet destined for a busy output.
-
Output Buffering: Packets are stored in memory associated with the output port. Eliminates HOL blocking but requires memory bandwidth of N×R (where N is port count and R is port speed)—a significant engineering challenge.
-
Shared Memory: A single large buffer pool shared across all ports. Most efficient memory utilization with statistical multiplexing benefits. Used in most enterprise-class switches.
-
Virtual Output Queueing (VOQ): Each input port maintains separate queues for each output port. Eliminates HOL blocking without the memory bandwidth demands of pure output buffering. Common in high-performance data center switches.
Error Handling:
When a frame's CRC check fails, the switch discards the frame silently. It does not generate any error notification to the sender—that responsibility belongs to higher-layer protocols (TCP, application-level acknowledgments). This follows the end-to-end principle: complex error recovery is handled by endpoints, not intermediate nodes.
- •Ingress: Frame arrives at input port, stored in buffer, timestamp recorded
- •FCS Validation: CRC computed and compared against frame trailer; discard if mismatch
- •MAC Address Extraction: Destination MAC parsed from frame header
- •Table Lookup: Forwarding table consulted to determine output port
- •VLAN Processing: VLAN tags examined/modified if applicable
- •QoS Classification: Frame prioritized based on 802.1p CoS or DSCP values
- •Queue Insertion: Frame placed in appropriate priority queue on output port
- •Scheduling: Scheduler selects next frame from output queue (WRR, strict priority, etc.)
- •Egress: Frame transmitted on output link with new FCS computed
Layer 3 Routers
Routers implement store-and-forward at the packet level, with additional processing for Layer 3 operations:
Additional Router Processing:
- TTL Decrement: Time-to-live field decremented by 1; packet discarded if TTL reaches 0
- Header Checksum Recalculation: IPv4 header checksum recomputed after TTL modification (IPv6 has no header checksum)
- Fragmentation (IPv4): If outgoing MTU is smaller than packet size, router may fragment the packet
- Routing Decision: Longest prefix match on destination IP address to determine next hop
- ARP Resolution: If next hop is on a directly connected network, resolve IP to MAC address
Buffer Management in Routers:
Router buffers must be carefully sized. The traditional rule of thumb (from Villamizar and Song, 1994) suggests:
$$B = RTT \times C$$
Where B is buffer size, RTT is the average round-trip time of flows, and C is link capacity. However, recent research (Appenzeller et al., 2004) suggests that with many flows, this can be reduced to:
$$B = \frac{RTT \times C}{\sqrt{N}}$$
Where N is the number of flows. This has significant implications for router ASIC design.
Excessive buffering causes 'buffer bloat'—a phenomenon where large buffers absorb traffic bursts but introduce hundreds of milliseconds of queuing delay. This degrades interactive applications (VoIP, gaming, video conferencing) and confuses TCP's congestion control algorithms. Modern networks use Active Queue Management (AQM) techniques like CoDel and PIE to manage buffer occupancy intelligently.
Advantages of Store-and-Forward Switching
Store-and-forward switching has become the dominant paradigm in data networks for compelling technical reasons. Let us examine its advantages in depth.
- •Error Isolation: Corrupted packets are detected and discarded at each hop, preventing error propagation. This is especially valuable in lossy environments (wireless links, long-haul fiber with noise). Only valid packets consume downstream bandwidth.
- •Speed Bridging: Enables interconnection of networks operating at different speeds. A 10 Gbps core network can interface with 1 Gbps access networks seamlessly. The buffer absorbs rate differences, enabling true heterogeneous networking.
- •Statistical Multiplexing: Bursty traffic from multiple sources can share link capacity efficiently. When one source is idle, others can utilize the full bandwidth. This yields utilization levels impossible with dedicated circuit allocation.
- •Quality of Service (QoS): Complete packet availability enables sophisticated traffic management—priority queuing, rate limiting, traffic shaping: With store-and-forward, each queue can be managed with precise bandwidth allocation and delay guarantees.
- •Protocol Translation: Buffering enables conversion between different protocols, frame formats, or addressing schemes. This is essential for protocol gateways and network evolution.
- •Deep Packet Inspection: When security or policy enforcement requires examination beyond headers (content filtering, intrusion detection), full packet storage is mandatory. Cut-through cannot support payload inspection.
| Scenario | Store-and-Forward | Cut-Through |
|---|---|---|
| Corrupted frame received | Detected via FCS, frame discarded locally | Partially forwarded before error detected |
| Runt frame (too short) | Detected, discarded | May be forwarded partially |
| Giant frame (too long) | Detected, discarded | Forwarded until buffer overflow |
| Collision fragment | Identified and dropped | May propagate error |
| Network-wide error impact | Errors contained locally | Errors may cascade |
Operational Advantages
Beyond technical merits, store-and-forward provides operational benefits:
Debugging and Troubleshooting: Since packets are fully received before forwarding, switches can log complete packet information for debugging. Many switches offer port mirroring (SPAN) capabilities that rely on store-and-forward buffering.
Traffic Analysis: Network monitoring tools (NetFlow, sFlow, IPFIX) sample packets at switches. Complete packet availability enables comprehensive traffic analysis without missing data in truncated packets.
Regulatory Compliance: In environments requiring lawful intercept or data retention, store-and-forward ensures complete capture capability.
Predictable Behavior: The deterministic nature of store-and-forward (receive-process-forward) simplifies network modeling, capacity planning, and SLA guarantees compared to the variable-latency behavior of cut-through switches adapting between modes.
All IP routers operate in store-and-forward mode—there is no cut-through alternative. The reason: routers must decrement TTL and recompute the IP header checksum (IPv4), potentially fragment packets, and perform longest-prefix-match routing. These operations require access to header fields that arrive throughout the packet, making cut-through impossible at Layer 3.
Limitations and Engineering Tradeoffs
No engineering solution is without tradeoffs. Store-and-forward switching has inherent limitations that influence network design decisions.
- •Latency Accumulation: Each hop adds a full transmission delay. For a large packet (e.g., 9000-byte jumbo frame) on a slower link (100 Mbps), each hop adds 720 μs of transmission delay alone. Across 10 hops, this becomes 7.2 ms—significant for latency-sensitive applications.
- •Buffer Memory Requirements: High-speed switches require substantial buffer memory. A 48-port 100 Gbps switch might need gigabytes of buffer to handle congestion scenarios. High-speed memory (SRAM, HBM) is expensive and power-hungry.
- •Variable Delay (Jitter): Queuing delay is inherently variable, introducing packet delay variation (jitter). Real-time applications (VoIP, video) are sensitive to jitter. Sophisticated QoS mechanisms are needed to bound delay variation.
- •Head-of-Line Blocking Risk: With input buffering, a packet for a congested output can block packets behind it destined for idle outputs. Virtual Output Queuing (VOQ) solves this but adds complexity.
- •Power Consumption: Buffer memory read/write operations consume significant power. In data centers with thousands of switches, this translates to substantial electricity costs and cooling requirements.
Latency Comparison: Store-and-Forward vs. Cut-Through
To quantify the latency penalty, consider a 1500-byte Ethernet frame:
| Link Speed | Store-and-Forward Delay | Cut-Through Delay* | Difference |
|---|---|---|---|
| 10 Mbps | 1200 μs (1.2 ms) | ~50 μs | 1150 μs |
| 100 Mbps | 120 μs | ~5 μs | 115 μs |
| 1 Gbps | 12 μs | ~0.5 μs | 11.5 μs |
| 10 Gbps | 1.2 μs | ~0.05 μs | 1.15 μs |
| 100 Gbps | 0.12 μs | ~0.005 μs | 0.115 μs |
*Cut-through delay assumes forwarding begins after destination MAC address (first 14 bytes) is received.
Key Insight: At higher speeds, the absolute latency difference shrinks. At 100 Gbps, the store-and-forward penalty is merely 115 nanoseconds—often negligible compared to propagation and queuing delays.
When Latency Matters Most
Store-and-forward latency is most significant in:
- High-Frequency Trading: Microseconds matter; cut-through switches are preferred
- Real-Time Control Systems: Industrial automation, robotics with tight timing loops
- Multi-Hop Paths at Lower Speeds: Legacy networks with many hops
- Live Production Video: Uncompressed video streaming with frame-based timing
For typical enterprise and consumer applications, the latency difference is imperceptible.
Many modern switches support 'adaptive' or 'error-free cut-through' mode. The switch operates in cut-through mode under normal conditions but automatically transitions to store-and-forward when error rates exceed a threshold. This provides low latency when conditions are good and error protection when needed.
Store-and-Forward in Modern Networks
Despite the availability of cut-through alternatives, store-and-forward remains the dominant switching paradigm across most network contexts. Let's examine its application in contemporary network architectures.
Data Center Networks
Modern data center networks operate at 25/100/400 Gbps speeds with leaf-spine topologies minimizing hop counts. In these environments:
- Latency Impact: At 100 Gbps, store-and-forward adds only ~1.2 μs per hop. With 2-3 hop leaf-spine designs, total switching latency is 2.4-3.6 μs—acceptable for most workloads.
- Buffer Sizing Debate: The optimal buffer size for data center switches is hotly debated. Shallow buffers (~10 MB) reduce latency but may drop packets during microbursts. Deep buffers (~1 GB) absorb bursts but add latency.
- RDMA and RoCE: Remote Direct Memory Access over Converged Ethernet (RoCEv2) requires lossless operation. Priority Flow Control (PFC) and careful buffer management are essential.
Wide-Area Networks
In WAN contexts (enterprise WANs, ISP networks, internet backbone):
- Heterogeneous Speeds: WANs interconnect diverse link speeds. Store-and-forward's speed bridging capability is essential.
- Error Conditions: Long-haul links experience higher error rates. Store-and-forward's error isolation prevents error propagation across the network.
- Routing Complexity: BGP route computation, MPLS label operations, and policy-based routing demand full packet buffering.
Software-Defined Networking (SDN)
OpenFlow-based SDN implementations are inherently store-and-forward:
- Flow Table Processing: Packets are matched against flow tables that may examine any header field combination. This requires complete header availability.
- Packet-In Messages: When no matching flow is found, the entire packet (or a portion) is sent to the controller for processing.
- Action Execution: Actions may modify any packet field, requiring full packet accessibility.
- •All IP Routers: Layer 3 processing mandates store-and-forward (no exceptions)
- •Enterprise Layer 2 Switches: Default mode; error protection valued over latency reduction
- •Data Center Switches: Often configurable; store-and-forward common outside HFT environments
- •Wireless Access Points: Always store-and-forward due to protocol translation (802.11 ↔ 802.3)
- •Firewalls and Security Appliances: Deep packet inspection requires full packet storage
- •Load Balancers: Application-layer decisions require complete request availability
- •SD-WAN Devices: Encryption, compression, and path selection need full packets
Store-and-forward switching is so fundamental that it's easy to overlook. Every email you send, every web page you load, every video you stream traverses dozens of store-and-forward devices. The entire Internet is built on this simple principle: receive completely, validate, then forward. This reliability-focused approach has enabled the network to scale from a few dozen nodes in 1969 to billions of devices today.
Summary: Store-and-Forward Switching
We have conducted an exhaustive examination of store-and-forward switching—the foundational mechanism underlying packet-switched networks. Let us consolidate the key concepts:
- •Fundamental Operation: Store-and-forward requires receiving the complete packet before forwarding. This three-phase process (store → process → forward) enables error detection, speed bridging, and statistical multiplexing.
- •Delay Characteristics: End-to-end delay = N×(L/R) + N×d_prop + processing + queuing. The key store-and-forward penalty is that transmission delay is incurred at every hop, not just the source.
- •Error Isolation: By validating CRC/FCS before forwarding, corrupted packets are discarded locally rather than propagated—a critical reliability feature.
- •Speed Matching: Buffering enables interconnection of links operating at different speeds, essential for heterogeneous network environments.
- •Implementation Variations: Buffer architectures (input, output, shared, VOQ) involve tradeoffs between complexity, memory bandwidth requirements, and performance.
- •Modern Relevance: Despite cut-through alternatives, store-and-forward dominates networking—all routers and most switches operate in this mode.
What's Next:
With store-and-forward mechanics established, we turn to a fundamental question: how are packets routed through the network? The next page explores the datagram approach—the connectionless, per-packet routing paradigm that characterizes the Internet Protocol (IP) and contrasts sharply with the connection-oriented virtual circuit approach.
You have mastered the store-and-forward switching paradigm—the foundation of packet-switched networks. You can now calculate switching delays, analyze buffer architectures, and explain why this seemingly simple technique underpins the entire Internet. Next, we'll explore how datagrams find their way through networks without pre-established paths.
KEEP LEARNING
Keep learning for free.
Read the complete lesson, save your notes and pick up where you left off with a free account. No card needed.