- Home
- Courses
- Edexcel International A-Level Computer Science
- Protocols, Routing and DNS
- Packet Switching and Next-hop Routing
Packet Switching and Next-hop Routing
Trace a packet one hop at a time. Separate a router’s next-hop decision from a promise that every packet will take one fixed path or arrive in its original order.
Before you start
- Convert bytes to bits and separate transmission from propagation time.
- Explain when a following packet can overlap another packet on a different link.
Watch, pause, try
Video by Craig'n'Dave. Use the shared AQA explanation for hop-by-hop packet switching. Pearson explicitly excludes required circuit-switching study here. The follow-up timing model states packet size, link rate, propagation, forwarding and competing traffic; IP forwarding and a TCP reliable stream remain different services.
Viewing focus: Explain packet components and store-and-forward decisions
After watching, attempt these questions before opening the answers. You can also use the written lesson below.
After watching 1: One 800-byte packet crosses four identical store-and-forward links, each at 8 Mbit/s with 2 ms propagation. Ignore every other cost. Calculate transmission per link and the first packet’s end-to-end arrival time. Does a router need the entire application file before forwarding this complete packet?
Show answer and reasoning
The packet contains 6,400 bits, so transmission takes 0.8 ms on each link. The first packet’s final-bit arrival is 4×(0.8+2)=11.2 ms under the stipulated store-and-forward model. A router can forward a received packet without waiting for the whole application file; packet, frame and application boundaries should remain labelled.
After watching 2: Now send five such packets back-to-back over those four independent equal-rate links, with no competing traffic, acknowledgements or extra overhead. When does the fifth packet’s final bit arrive? Explain why five times the first-packet latency is wrong, and why this model alone promises neither loss recovery nor ordered application delivery.
Show answer and reasoning
The pipeline delivers each later packet 0.8 ms after its predecessor, so the fifth finishes at 11.2+4×0.8=14.4 ms. Packets overlap on different links; multiplying 11.2 by five ignores that overlap. The simplified forwarding/timing assumptions do not themselves provide recovery or a reliable ordered byte stream; those depend on a relevant transport/application protocol and its conditions.
What you'll be able to do
- Explain packet components and store-and-forward decisions
- Trace next-hop routing through a small network
- Evaluate shared capacity, delay, loss and protocol roles
Give each header field a job
Packet switching divides communication into units that share network resources with other traffic. In a simplified network-layer packet, a header can carry source/destination logical addresses and other delivery/control information; the payload carries the encapsulated data. Different protocol layers have different headers, so a TCP port or sequence field should not automatically be described as an IP-header field.
A router receives a packet via a link, examines relevant network-layer information and uses its routing/forwarding information to choose the next hop or outgoing interface. It does not need the entire application file before forwarding a packet. The routing table is not normally a complete printed route included as an instruction list inside every packet.
Trace a permitted route and shared resources
Consider links S–R1, R1–R2, R1–R3, R2–D and R3–D. If R1’s current forwarding decision for D selects R2, a packet can travel S→R1→R2→D. If a suitable route changes, a later packet may travel via R3. Each router acts using its current information and policy; a drawing of two possible paths does not prove that packets are always alternated between them.
Queued packets wait for outgoing capacity. Congestion can increase delay or cause loss when buffers/policies require dropping. Shared links use available capacity efficiently across bursty senders, but do not guarantee constant per-user delay. The network can provide redundancy through alternative paths, although a failure still needs usable connectivity and routing recovery; a second drawn line is not proof of instant uninterrupted service.
Assign recovery to the correct protocol
IP delivery does not by itself guarantee an ordered complete application byte stream. A transport such as TCP can detect gaps, retransmit and reorder its stream under its protocol. UDP offers a different service and applications may add their own recovery if needed. Identify the protocol rather than saying every router automatically reconstructs the user’s complete file.
For a calculation, four links each requiring 1 ms transmission and 2 ms propagation for one packet give 12 ms in a simple store-and-forward path with no processing or queuing. Extra queueing changes that result. A sequence of several packets can overlap on different links, so multiplying this one-packet latency by packet count is not automatically the total bulk-transfer time. Circuit switching is outside this specification’s required packet-switching content.
| Element | Role in the stated example |
|---|---|
| Network-layer destination address | Identifies the destination for forwarding |
| R1 forwarding entry for D | Selects the next hop/interface |
| Outgoing queue | Waits for the relevant link capacity |
| Transport sequencing/recovery | Can reconstruct reliable ordered delivery when TCP is used |
Work through the problem
Attempt the task before opening its worked response. Record each change of state, explain the rule used, and check the result against the original requirements. Code examples labelled Python 3 use that language’s conventions; pseudocode states its own assumptions.
Example 1R1’s current entry for D selects R2 in the given network. Trace one possible path from S.
Example 2Find one-packet latency over four store-and-forward links with 1 ms transmission and 2 ms propagation per link, ignoring everything else.
Common mistakes to avoid
Key takeaways
- Packets share capacity and are forwarded hop by hop.
- Queueing, loss and route changes affect delivery.
- Transport services and path timing require explicit assumptions.
Explore further
- Pearson YCP01 official specification (opens in a new tab)
Check the International A-level requirements and relevant numbered points; this course remains in progress.
- Pearson International Computer Science subject guide (opens in a new tab)
Official introduction to the four examined units and their theory/practical purposes.
- Topic reading and reference (opens in a new tab)
Use the relevant board requirement or primary technical reference alongside the written examples.
- 140. AQA A Level (7517) SLR21 - 4.9.3 Packets and packet switching — Craig'n'Dave (opens in a new tab)
Original publisher or creator source for the embedded explanation; apply the stated viewing scope.
Return to this tomorrow
Close the notes and answer from memory. Revisit any explanation you cannot yet reconstruct.
- IP alone guarantees every application byte arrives in order:
- A one-packet path latency multiplied by packet count always equals bulk-transfer time:
Test yourself
Answer a few questions, then review anything you missed.
Keep practising
Start with the quiz above to check the key ideas. You can also choose another topic from the practice library.