Why packets can take different routes

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Why packets can take different routes

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Why can two packets from the same message take different routes?
A Each router picks the best available path at that moment
B The sender gives every packet a fixed route in advance
2. A router finds that one route is very busy (congested). What does it do with the next packet?
A Always sends it along the busy route anyway
B Sends it along a less busy route
3. A cable on one route is broken. What happens to the packets that are still to be sent?
A Routers send them along a different working route
B The whole message is lost and must be sent again
4. True or false: every packet in a message must travel along the same route.
A True - all packets must follow the first packet
B False - packets can take different routes
5. Packet 1 takes a short route and packet 2 takes a longer route. What is likely to be true?
A The two packets may take different lengths of time to arrive
B Both packets always arrive at exactly the same time

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1route = best_available_path() AA congested route is avoided and the packet is sent another way
2if link_busy: choose_other_route() Bif link_broken: use_working_route()
3A broken link is avoided, so the router sends the packet along a working route instead CA router avoids busy or congested routes and picks a better available path, so the packets are not stuck in a queue.
4Different routes can take different lengths of time, so packets may arrive at different times Darrival_time = sum(route_delays)
5All packets in a message must follow the same route EPackets from one message can take different routes, because each router chooses the best available path at that moment.
6A router keeps sending packets down a busy route FA router picks the best path open at that moment for each packet

Definitions

different routes

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
IF routeBusy = ____ THEN route ← "B" ENDIF
2.
IF linkBroken _ TRUE THEN route ← "C" ENDIF
3.
IF timeA _ timeB THEN route ← "A" ENDIF
4.
IF linkBroken = TRUE ____ route ← "B" ENDIF
5.
IF routeBusy = TRUE THEN route ← "B" _____

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A FOR each packet in message
B router picks worst path
C IF path is busy
D choose another path
Question 2
A router receives packet
B IF link A is working
C send via link B
D ELSE send via link A
Question 3
A route A: 3 routers, 40 ms
B route B: 5 routers, 90 ms
C packet 1 on A arrives last
D packet 2 on B arrives later
Question 4
A message split into packets
B packet 1 goes via route A
C packet 2 goes via route B
D all packets must use route A
Question 5
A route A is congested
B router checks route B
C router sends packet via A
D packet avoids the busy route

Answer Key

Why packets can take different routes
Section A: Quick Questions
Q1
A — Each router picks the best available path at that moment
Q2
B — Sends it along a less busy route
Q3
A — Routers send them along a different working route
Q4
B — False - packets can take different routes
Q5
A — The two packets may take different lengths of time to arrive
Section B: Match the Pairs
Q1
route = best_available_path() → A router picks the best path open at that moment for each packet
Q2
if link_busy: choose_other_route() → A congested route is avoided and the packet is sent another way
Q3
A broken link is avoided, so the router sends the packet along a working route instead → if link_broken: use_working_route()
Q4
Different routes can take different lengths of time, so packets may arrive at different times → arrival_time = sum(route_delays)
Q5
All packets in a message must follow the same route → Packets from one message can take different routes, because each router chooses the best available path at that moment.
Q6
A router keeps sending packets down a busy route → A router avoids busy or congested routes and picks a better available path, so the packets are not stuck in a queue.
Section C: Definitions
Q1
different routes — Packets from one message can take different routes because each router picks the best available path at that moment, avoiding busy or broken links. Routes may take different lengths of time.
Section D: Fill in the Blanks
Q1
IF routeBusy = TRUE THEN route ← "B" ENDIF
Q2
IF linkBroken = TRUE THEN route ← "C" ENDIF
Q3
IF timeA < timeB THEN route ← "A" ENDIF
Q4
IF linkBroken = TRUE THEN route ← "B" ENDIF
Q5
IF routeBusy = TRUE THEN route ← "B" ENDIF
Section E: Spot the Error
Q1
B — A router picks the best available path at that moment, not the worst. Line 2 should be: router picks best path.
Q2
B — The router should avoid a broken link and use link B. The condition should be IF link A is broken, otherwise the ELSE branch would use a broken link.
Q3
C — Route A takes less time (40 ms against 90 ms), so the packet on A arrives first. Different routes take different lengths of time.
Q4
D — Packets from the same message can take different routes. They do not all have to use the same one. The line should say routes may differ per packet.
Q5
C — Route A is congested (busy), so the router should avoid it and send the packet via route B.