In this lesson you will explore the benefits (and potential security concerns) associated with routing traffic across the Internet. Building on the introduction to IP addresses in the previous lesson, you will simulate the Internet in groups that allow messages to be sent only to an intended recipient, as indicated by an IP address. This simulation will also allow you to examine the traffic that goes through all of the (simulated) routers on the network. You will see that messages go through many different routers, may not always take the same path to reach the final destinaton, and that the routers (and their owners) can see all of this traffic!
- Network Redundancy: having multiple backups to ensure reliability during cases of high usage or failure
- Router: a type of computer that forwards data across a network
Students will be able to:
- Describe the redundancy of routing between two points on the Internet
- Evaluate the benefits and security concerns associated with the use of a routed system of sending packets
- Send messages using a numeric addressing protocol
The main purpose here is to give students a taste for both the scale and
implication of what routers do by examining the network traffic that is generated
by students in the class. Seeing traffic like this in real life is very hard if not
impossible since only engineers of large networks have access to router data on a
large scale, and it's also more complicated to understand. Our "network" is simulated and provides a simple view, the basics are the same, and quick
investigations reveal interesting things.
CS Background: A router is a computer designed to receive and redirect packets of information. based upon the addressing information (e.g. an IP address) contained in the packet. Routers will either deliver a packet to its final desination or forward it to one of several other routers it is connected to. By monitoring current network conditions, a router can determine which of these will allow the packet to reach its destination fastest. There will often be redundant paths between two locations on the Internet, and so if one path is experiencing traffic or otherwise out of service, additional paths will be available. This redundancy makes the Internet more reliable and also helps the Internet to scale, accommodating new users (and routers!) as they are connected to the system.
Imagine you were going to send a letter to a friend living in another state. List the steps you imagine your letter would have to take through the different parts of the postal system. Don't worry if you're not sure about your answers, just make an educated guess.
If possible, discuss your answer with antoher person. Below is an example answer. How is your answer similar to the example? How is it different?
- Mailbox to Mail Carrier
- Mail Carrier to Local Post Office
- Local Post Office to Regional Collection Center 1
- Regional Collection Center 1 to Regional Collection Center 2
- Regional Collection Center 2 to Local Post Office
- Local Post Office to Mail Carrier
- Mail Carrier to Friend's House
The exact details matter less than identifying multiple points where the letter is sorted and rerouted based on its intended destination. No need to go into great detail here, but the hope is to help students develop a mental model for how a system for routing messages looks and what role a router serves.
When we send messages through a network we don’t actually want everyone on the network to receive them. If we include information about who the message is intended for then we can allow portions of the network to focus on sorting and routing messages, so that they can continue on their way to their intended target. In the mail system, mail facilities, post offices, or a mail carrier fills this role.
In a network of computers, certain computers called "routers" do the same thing, directing messages towards the target computer based on the IP addresses included in the message.
Today we will be simulating a network. Students should be in groups for this activity, with each group centered around a shared "router". Assign each student in the group a different 8-bit "IP address", such as "1.7 (0001 0111)" or "5.14 (0101 1110)" and give each student several index cards or another way of communicating separate messages. (Every student in the class should have a separate and unique IP address for this simulation). Alternatively, students could send emails or text messages to the teacher to be "routed" (forwarded) to its final destination. Each message should include a "To" and "From" address field which will allow for messages to be sent to a single intended recipient. This simulation will ask the teacher to route messages across a network, with messages possibly being routed across multiple routers (groups) in unpredictable sequences before finally being delivered to the intended "IP address". This is done to simulate the way traffic travelling across the Internet is constantly rebalanced in response to over-usage or under-usage of some channels. A message will usually make it to its destination, but we can't know for sure how it will get there.
Alternatively, students could send emails or text messages to the teacher to be "routed" (forwarded) to its final destination.
Send a quick test message: Have students send a simple "hello" to a classmate who is connected to the same router.
- Find your classmate's (small) IP address
- Use that IP address in the "To" field on your message.
- Write your IP address in the "From" field.
- Write "hello" as your message.
- Place the message in the center of the group to be picked up by your teacher and "routed" to its destination.
As you are routing messages to their final destination, take different paths to get there, drop some of the messages, and read some messages aloud to enforce the notion that messages may take different paths to the same location, some messages may be dropped, and routers can theoretically read all traffic moving across them.
Have a Conversation: Ask students to conduct a short conversation (e.g. a simple greeting or a question and answer) with two classmates on their "router". They should verbally confirm that both sides are receiving their messages. Provide students a few minutes to practice. Help students construct their messages. If their "To" address is not constructed properly the message will be dropped (not delivered).
- Routing messages functions very differently from broadcasting.
- The messages are only sent to the user they are intended for.
- This is just like when you write a letter to a friend, where an address on the outside of the letter tells the mail service how to properly route your letter.
- A router needs to read the header of a message to route it correctly, but the contents of the message are right there too, and if it wanted, a router could read all the messages going across it, just like I did with some of the messages today.
- This should raise some questions about privacy and security -- we will talk more about this later.
Find a Classmate on a Different Router: Ask students to find two classmates on a different router and ask for their IP address (they will need to actually talk in order to do this). Again students should conduct a short conversation with their two partners, confirming verbally that the messages are being received.
Explaining Redundancy: The simulations students used in today's lesson model many features of the actual Internet, most notably its redundant nature (there are many paths between locations). Assist students in identifying these features with the following comments:
- Messages between two people don't always visit the same routers along the way. Why might the Internet have been designed to
be flexible about how messages get from one person to another? Why go through the trouble of creating multiple paths
- Efficiency: Communication lines can become backed up with traffic. The ability to choose whichever one currently has the least traffic improves the speed of transmission.
- Reliability: Having many redundant paths means if one goes down, there are many others that a message can take.
Ask students to answer these reflection questions:
- Describe the relative benefits of routing over a broadcast style of communication. Is routing traffic more secure than broadcasting? Justify your answer.
- Can you know in advance the path a message will take between you and another computer on the Internet? Justify your answer.
- An Internet service provider (ISP) just purchased all the routers in your area. What types of things is this ISP capable of doing? Are you comfortable with this arrangement?
Discuss: Allow students to share their answers, either in groups or with the class. The discussion should touch on:
- Benefits of redundancy in a routed system, to provide many paths between users of the network.
- Routed messages aren’t seen by all users, but they can still be seen by owners of the router.
- If you control all the routers, you entirely control the way messages travel through the network, and additionally can see all the traffic.
Here's a cheat sheet for the features of the Internet students saw today and
how today's activity is simulating an actual feature of the Internet:
To / From Address: Like an IP address, included on every message sent over the Internet.
Dropped Messages: Poorly formed messages cannot be delivered and so are dropped, just like a letter with a bad address on it. Tomorrow you'll discuss more technical reasons messages are dropped.
Multiple Hops: A message travelling across the Internet will visit many routers as each tries to forward it along the most efficient path to its destination.
Different Paths: Routers respond to traffic on the Internet in real time. The best path at one moment might be backed up a few seconds later. Routers choose the current best path to get the message through.
Note: In this simulation the "hops" are chosen randomly. Actual routers use algorithms to determine the best path to send a message along.
- CSTA K-12 Computer Science Standards (2011): CD.L3A:8, CD.L3A:9, CD.L3B:4
- CSTA K-12 Computer Science Standards (2011): CL.L2:3
- Computer Science Principles: 3.3.1 (A, F)
- Computer Science Principles: 6.1.1 (B, C, E)
- Computer Science Principles: 6.2.1 (A, D)
- Computer Science Principles: 6.2.2 (B)