12.1.3Advanced Networks and SecurityCore

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.

35 min Video by Craig'n'Dave Protocols, Routing and DNS
140. AQA A Level (7517) SLR21 - 4.9.3 Packets and packet switchingCurated by Kepler, not produced by us. Watch it before the notes below.
Open on YouTube

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
1

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.

2

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.

3

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.

ElementRole in the stated example
Network-layer destination addressIdentifies the destination for forwarding
R1 forwarding entry for DSelects the next hop/interface
Outgoing queueWaits for the relevant link capacity
Transport sequencing/recoveryCan reconstruct reliable ordered delivery when TCP is used
Scroll horizontally to see the full code or table.
Keep packet forwarding, link delivery and end-to-end recovery separate.
4

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.
1S sends to its connected router R1.
2R1 forwards towards R2 under the stated entry.
3R2 forwards to D.
Answer
S→R1→R2→D under these supplied forwarding decisions.
Example 2Find one-packet latency over four store-and-forward links with 1 ms transmission and 2 ms propagation per link, ignoring everything else.
1Each link contributes 3 ms for this single-packet model.
2Four contributions give 4×3 ms.
3There is no queueing/processing in the stated assumptions.
Answer
12 ms; do not extend it to a multi-packet bulk transfer without analysing overlap.

Common mistakes to avoid

Putting every layer’s fields into one undifferentiated IP header.
Identify the protocol that defines each field.
Assuming alternate links imply automatic immediate failover.
Explain routing recovery and remaining capacity/connectivity.

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

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.

Next step

Keep practising

Start with the quiz above to check the key ideas. You can also choose another topic from the practice library.

Browse practice topics

Related lessons

All 4 lessons