Sub topic 11
End-to-End Delay and the Benefit of Splitting a Message into Packets
Assume you know bits, bytes, bit rate, distance, and basic unit conversion. Also assume that a network path contains store-and-forward links: each intermediate device receives a complete packet before sending it on the next link.
Components of packet delay
For one packet on one link, the total delay is usually modeled as:
\[ d = d{\text{proc}} + d{\text{queue}} + d{\text{trans}} + d{\text{prop}} \]
| Component | Meaning | Formula |
|---|---|---|
| Processing delay | Time to inspect and process the packet | Usually given |
| Queuing delay | Time waiting behind earlier packets | Usually given or calculated |
| Transmission delay | Time to place all bits on the link | \(L/R\) |
| Propagation delay | Time for the signal to travel | \(D/S\) |
Here, \(L\) is packet length in bits, \(R\) is link rate in bits per second, \(D\) is link distance in metres, and \(S\) is signal propagation speed in metres per second.
Transmission delay depends on packet size and link rate. It does not depend on distance. Propagation delay depends on distance and signal speed. It does not depend on packet size.
Store-and-forward delay over several links
Suppose a packet crosses \(k\) links. If processing and queuing delays are ignored, the packet must be transmitted once on every link, but its signal propagates across the entire path only once:
\[ d{\text{packet}} = k\frac{L}{R}+\frac{D{\text{total}}}{S} \]
def end_to_end_delay(packet_bits, rate_bps, links, distance_m, prop_speed_mps):
"""Store-and-forward delay; queuing and processing ignored."""
transmission = packet_bits / rate_bps
propagation = distance_m / prop_speed_mps
return links * transmission + propagation
print(round(end_to_end_delay(12_000, 10_000_000, 3, 3_000_000, 2e8), 6))
# 0.0186The result is 0.0186 seconds, or 18.6 milliseconds. A common error is to multiply propagation delay by the number of links after already using the total distance. That counts the same physical distance more than once.
Why segmentation creates a pipeline
A message can be divided into packets. After packet 1 moves to link 2, packet 2 can begin using link 1. The links then work simultaneously, like stages in a pipeline.
For \(n\) equal packets crossing \(k\) identical links, ignoring propagation, processing, queuing, and headers:
\[ d{\text{segmented}}=(k+n-1)\frac{Lp}{R} \]
where \(L_p\) is the packet size. Sending the same data as one large unit takes approximately:
\[ d{\text{whole}}=k\frac{nLp}{R} \]
Segmentation usually reduces delay when several links are available because it overlaps transmission. It also allows a receiver to begin processing data before the entire message arrives. However, packets require headers, and the final packet may be smaller. These effects must be included when a problem provides them.
Exercise
A 1,000,000-bit message crosses 3 links. Each link rate is 1 Mbps. Compare sending it as one unit with splitting it into 1000-bit packets. Ignore propagation, headers, queuing, and processing.
Show answer
As one unit: 3 × 1,000,000/1,000,000 = 3 seconds. With 1000 packets: (3 + 1000 - 1) × 1000/1,000,000 = 1.002 seconds. Segmentation saves 1.998 seconds through pipelining.