Study Guide Instructor view
IP forwarding, default gateways and NAT/PAT
Teaching notes for Lesson 3.11, with controls for presenting it.
Keep this page on your own screen. Share only the lesson window. The lesson window holds no teaching notes, so sharing it cannot show them.
Presenting
- Open the lesson in its own window and share that window, not this one.
- Use Next and Previous here, or the lesson’s own, to move through the lesson. Next reveals one thing at a time: the next idea, or the answer to the question on screen, then the next step. Previous takes the last reveal back. The line below says what is on screen and what Next will show.
- Reveal hints and answers when the class is ready, and reset a demonstration before using it again.
The controls need JavaScript and a browser that supports BroadcastChannel. Without them, open the lesson in presentation mode and use its own controls.
The two windows talk to each other only inside this browser, on this device. Nothing is sent to a server, and no account is needed. A second device (a phone or another tablet) cannot follow the lesson window yet.
Now on the lesson window
- On screen
- Next teaching point
Guidance for this point
Lesson plan
- Level
- Beginner
- Time
- About 70 minutes; the steps below add up to 69
Learners work out what to do with a letter for another country and how a home router could tell apart replies for two devices, so the default gateway and the translation table answer problems they have posed. Predictions then precede the routing decision, the route codes, the fields of the outgoing frame and the clash of two identical source ports; checks follow the connected routes and the translation table. The habit to build: separate routing, translation and filtering, even when one box does all three.
Objectives
- Explain why traffic between networks needs a router
- Use a routing table to choose direct delivery or the default gateway
- Read a router’s routing table, including connected, static and inactive routes
- Follow what changes and what stays the same as a packet leaves the local network
- Explain how PAT lets several devices share one public address, and why NAT is not a firewall
Before the lesson
- Open this page on your own screen and use “Open the lesson window” to open the lesson in a second window. Share only that second window.
- Learners need the DHCP and ARP and Ports and Sockets lessons first.
- Keep the example-network table visible for the whole lesson.
- The lesson takes about 69 minutes. To teach it in two parts, stop after “From the laptop to the gateway”; the second part opens with “Two clients sharing one public-facing address”.
- In presentation mode every step is shown in turns: Next reveals one moment, part or answer at a time, and the instructor view names what is on screen and what comes next.
Steps
Introduction Opening
On the lesson window now
On screen: the lesson’s title, module and number; Next adds its objectives and key terms, as the lesson page lists them; Next again begins the first step.
Objectives on screen
- Explain why traffic between networks needs a router
- Use a routing table to choose direct delivery or the default gateway
- Read a router’s routing table, including connected, static and inactive routes
- Follow what changes and what stays the same as a packet leaves the local network
- Explain how PAT lets several devices share one public address, and why NAT is not a firewall
Purpose: Learners work out what to do with a letter for another country and how a home router could tell apart replies for two devices, so the default gateway and the translation table answer problems they have posed. Predictions then precede the routing decision, the route codes, the fields of the outgoing frame and the clash of two identical source ports; checks follow the connected routes and the translation table. The habit to build: separate routing, translation and filtering, even when one box does all three.
1. Leaving the building Think 5 min
On the lesson window now
Purpose: Find the default gateway and the translation note from everyday situations.
Ask
- What do you do with a letter abroad?
- How could the router tell the replies apart?
Responses to expect
- “Post it” comes at once; the second question needs time.
- On screen in turns: the opening question, its answer; then the question on one address shared by five devices, and its answer.
Discussion pause: Let learners suggest how the router could keep track before revealing.
In the lesson window
- Think it through: A letter for a neighbour in your street can be handed over directly. A letter for another country cannot. What do you do with it, and do you need to know its whole route?
- Think it through: A home has one public address and five devices. Two of them load the same website at the same moment. When the replies come back to the one address, how could the home router tell which reply belongs to which device?
2. Two networks need a router Explain 4 min
On the lesson window now
Purpose: Show that different networks need a router between them.
Ask
- Why can PC1 not deliver to PC2 directly?
Responses to expect
- They are in different networks.
- On screen in turns: the opening; then the two networks and the router between them; a switch against a router, in one line.
3. The example network Explain 4 min
On the lesson window now
Purpose: Introduce the home network and the router’s three separate jobs.
Ask
- Which three jobs does the home router do?
Responses to expect
- Routing, translation and filtering.
- On screen in turns: the opening; then the example home network; the three jobs of the home router.
4. Choose local delivery or a next hop Predict 9 min
On the lesson window now
Purpose: Build the local-or-gateway decision and read a two-line routing table.
Ask
- Where do the two packets go?
- Why is the printer not sent to the gateway?
Responses to expect
- Some say the first line wins; the rule is the most specific.
- On screen in turns: the opening; then the rule: deliver directly, or hand it to the router; the default gateway and the next hop; the laptop’s routing table, and the default route; the question on reading the table, and its answer; the printer and the web server, decided; the question on why the printer is not sent to the gateway, and its answer; the most specific match wins.
Misconceptions to challenge
- A learner may believe: “The default gateway is used for all traffic.” Respond: Only when no more specific route matches.
In the lesson window
- Think it through: Using the two-line table, where does the laptop send a packet for 192.168.1.20, and where one for 198.51.100.20?
- Think it through: 0.0.0.0/0 means any address, so it matches the printer too. Why is the printer still not sent to the gateway?
5. Reading a router’s routing table Predict 8 min
On the lesson window now
Purpose: Read connected, static and inactive routes on a router.
Ask
- Which lines are connected networks?
- Can the router forward between its two networks?
Responses to expect
- Learners often think an inactive default stops all forwarding.
- On screen in turns: the opening; then the question on the C and S codes, and its answer; the VyOS routing table; reading the table line by line, starting with connected routes; the loopback interface; the static route; the selected and installed markers; what the table does not show; the check question on forwarding between connected networks, and its answer.
Discussion pause: Reveal the line-by-line reading one point at a time; ask the class to read each line first.
To go further
- What would change in this table if the link towards 10.1.128.1 came up?
In the lesson window
- Think it through: In the table below, some lines start with C and one with S. Before reading the explanation, which do you think are networks the router is plugged into, and which was entered by a person?
- Check your understanding: The router has interfaces in 10.1.16.0/24 and 10.1.24.0/24, and its default route is inactive. Can it forward between those two networks?
6. From the laptop to the gateway Predict 9 min
On the lesson window now
Purpose: Follow the fields of the outgoing frame and what each router changes.
Ask
- Predict the destination hardware and IP addresses.
Responses to expect
- Many put the gateway’s IP address in the packet.
- Diagram: step through the laptop, the gateway and the next link, asking what changes and what stays the same at each.
- On screen in turns: the opening; then the question on filling in the frame, and its answer; every field leaving the laptop, with the values held back; the value of each field; the local frame and the remote destination, step by step; the diagram’s stages one at a time; why the gateway’s MAC address matters only for the first step; what a router changes in a packet.
Misconceptions to challenge
- A learner may believe: “The router replaces the destination IP with its own.” Respond: Routing keeps the destination IP; only the frame is rebuilt.
Discussion pause: The field values are held back: let the class fill in each field before the table’s values appear.
If the explanation does not land: Use an envelope inside a parcel: the parcel label changes at every depot, the envelope address never does.
In the lesson window
- Think it through: The laptop is about to send to 198.51.100.20 through its gateway. Predict the destination hardware address of the frame, and the destination IP address of the packet inside it.
7. Two clients sharing one public-facing address Predict 11 min
On the lesson window now
Purpose: Explain NAT and PAT with the receptionist, then follow a reply home through the table.
Ask
- What goes wrong if only the address is replaced?
- Where does the reply to port 40002 go?
Responses to expect
- Most see the identical replies once both ports are written up.
- The reply’s journey home reveals one step at a time: ask what the router must look up before each.
- On screen in turns: the opening; then the receptionist and the one telephone number; the question on two devices choosing the same port, and its answer; giving each connection its own outside port; the translation table, and what the server sees; the check question on port 40002, and its answer; following one response home, starting with the server’s reply; the router’s lookup; the firewall check and the frame; the laptop matches the reply; what a real translation table also records.
In the lesson window
- Think it through: Laptop A and tablet B both contact the same server, and both happen to choose source port 51542. If the router replaced only the address, what would go wrong?
- Check your understanding: A reply arrives at 203.0.113.5:40002. Using the translation table, where does the router send it?
8. NAT types and limits Explain 5 min
On the lesson window now
Purpose: Name static, dynamic and PAT, and separate NAT from firewall policy.
Ask
- Does translation decide what traffic is allowed?
Responses to expect
- No: policy does.
- On screen in turns: the opening; then three kinds of NAT; why NAT is not a firewall; carrier-grade NAT, and IPv6; what to check when the internet cannot be reached.
Misconceptions to challenge
- A learner may believe: “NAT protects the network like a firewall.” Respond: Translation changes addresses; rules decide what is allowed.
9. Apply it in a new situation Apply 5 min
On the lesson window now
Purpose: Set up independent application, ideally on a later day.
Ask
- Who will try these now, and who later in the week?
Responses to expect
- The desktop tests the gateway; the school router tests specificity; the restart tests what the table is for.
- On screen in turns: the opening question, its answer; then the question on two matching routes, and its answer; the question on a router restart, and its answer.
In the lesson window
- Apply it: A desktop can print to the printer beside it but cannot reach any website. Its address and mask look right. What would you check first?
- Apply it: A school router has 192.168.5.0/24 and 192.168.6.0/24 directly connected, and a working default route. A packet for 192.168.6.40 arrives. Which route does it use?
- Apply it: Two phones at home are streaming when the router restarts and its translation table is emptied. What happens to replies already on their way?
10. Check your understanding Check 6 min
On the lesson window now
Purpose: Check the lesson against the approved revision-bank questions.
Ask
- Answer individually, then compare before revealing.
Responses to expect
- The PC1 and PC2 questions use the two-network drawing from the first step.
- On screen in turns: the opening; then the revision questions one at a time, each followed by its answer; where to practise next.
11. What to remember Consolidate 3 min
On the lesson window now
Purpose: Summarise the five points, the key terms and the misunderstandings.
Ask
- Without looking: which route wins when two match?
Responses to expect
- The more specific one, whatever the order of the lines.
- On screen in turns: the opening; then the summary; the key terms; the common misunderstandings.
Lesson recap Closing
On the lesson window now
On screen: the lesson’s objectives again; Next adds the closing question, which asks the class to explain each one in their own words without looking back. It says nothing about what anyone has learnt: use the answers to decide what to revisit.
Points to listen for
- Within a network, a switch; between networks, a router.
- Local goes direct; everything else goes to the gateway.
- When routes overlap, the most specific wins.
- The frame changes at every hop; the destination IP does not.
- PAT tells connections apart by port; it is not a firewall.
Consolidation
- Within a network, a switch; between networks, a router.
- Local goes direct; everything else goes to the gateway.
- When routes overlap, the most specific wins.
- The frame changes at every hop; the destination IP does not.
- PAT tells connections apart by port; it is not a firewall.