Overview

In this lesson students develop a protocol for reliably sending a message over an unreliable internet. For this lesson, we will be using a simulation similar to the one in the previous lesson. Messages will be restricted to no more than 8 characters each, and messages get dropped messages with some probability on every hop (i.e. you will drop (not deliver) every 4th or 5th message that is sent through the network simulation).

Students are given time to experiment and develop their own protocol, possibly testing or demonstrating their protocol to their peers. At the conclusion of the lesson, students watch a short video explaining how these challenges are addressed in the real world with TCP - the Transmission Control Protocol.

Vocabulary

Goals

Students will be able to:

Purpose

This is a problem-solving lesson. On the real Internet packet sizes are limited, and transmission is unreliable. In this lesson, we will restrict the packet-size to be very small - 16-bits for the to and from addresses plus only 8 ASCII characters for the message. Also, during the simulation you will drop packets regularly. In a set of 10 messages you should drop one or two messages. You may need to justify these restrictions to students, acknowledging that, yes, this is a simulation, but these types of constraints are a very real problem on the internet.

The problem students have to solve is how to use the 8-ASCII-characters-worth of data to include both a piece of the message they are trying to send, as well as information about how many messages (packets) there are in the whole message, and which number the current packet is.

Students should invent or at least appreciate the need for something like the Transmission Control Protocol TCP. TCP was designed to overcome the inherent unreliability of the Internet. In order to constrain the extent of these errors, larger messages are divided into many packets which are individually routed to their recipient. The receiving computer will send an acknowledgement confirming the receipt of that packet. If the sending computer does not receive an acknowledgement, it will resend the packet until all packets have been acknowledged.

Since packets may arrive out of order, additional data must be included to indicate the order in which the packets should be arranged. Thus, while individual packets cannot be guaranteed to arrive, eventually an entire message can be accurately reconstructed.

Getting Started

Prompt: Your friend sent you a message on the Internet, but you never received it. Based on what you already know about routers and the physical Internet, list what reasons might explain this fact.

Discuss: In groups or as a class, students should share their lists. Use this opportunity to review the layers of the Internet already covered and potential flaws that could lead to a message getting dropped. Some example points of discussion:

Teacher Tip:

Build on prior knowledge of the structure of the Internet to reflect on the unreliability of the Internet.
Introduce the use of packets.
Motivate the need for protocols to ensure reliability when sending messages across the Internet.

Transitional Remarks: When we communicate on the Internet, we are not just sending short text messages as we did in the previous lesson. We also use the Internet to exchange documents, videos, music, and scientific data, and these files can easily grow to enormous size. All of this would not be a problem if the Internet were perfectly reliable, but in reality, errors sometimes occur. Wires can be cut, routers can be overwhelmed with traffic, and interference with electric or radio signals can cause messages to become corrupted. The response to this problem is to split large messages into smaller pieces of information called packets. It turns out that splitting up a message into packets provides many benefits. If a faster route opens up halfway through transmitting a large file, it is easy to reroute later packets in the transmission through that route. Splitting up a message into smaller chunks doesn’t solve all the problems of unreliability on the Internet. Packets can still be dropped or arrive out of order. Today’s challenge is to develop a protocol to reliably send messages even though the network itself is unreliable.

Activity

Students should be placed in groups again for this activity using the same "IP address" that they were assigned in the previous lesson. The teacher will again act as the "router", delivering the messages (packets) to their final destination. The simulation we will be doing today has been structured to simulate the unreliability of the Internet.

Student Instructions:

Background

Packets: Information travelling across the Internet is not sent all at once. Instead, it is broken into smaller chunks of data called packets. There are many reasons this is done:

Challenge: Develop a protocol for reliably sending a message across an unreliable network. This simulation is modeled after some actual constraints of the Internet - Messages must be divided into packets which may contain at most eight (8) ASCII characters. Messages should be long enough to require at least 10 packets. Packets may not arrive in the order sent. Packets may also be dropped while in transmission.

Directions: With your group, practice sending messages given these new constraints. Once you are comfortable with the challenge, iteratively design a protocol that can reliably send a message to a partner.

Protocol Requirements:

Teacher Tip:

In student solutions you should primarily be looking for:

1. Some way to confirm receipt of a packet/message
2. Some way to define the ordering of packets

This activity is designed to provide students a realistic encounter with the actual challenges of the Internet. It is OK if their solution does not perfectly match TCP, the actual solution to this problem.

The Focus: Should be on the protocol for the recipient to acknowledge or re-request missing packets. That is the real challenging part, and other parts of the protocol that emenate from it.

Suggested Message Format: To come up with a non-english message you could have students send a message as ASCII art. For example they could treat the message as a grid and draw something with ASCII characters.

Throughout this simulation, students should recognize:

If students do not immediately recognize these points, draw them out in subsequent conversations.

The real problem to solve is to think about what the receipient of the messages should do to inform the sender of what's missing and needs to be re-sent. It's tricky because any message the recipient sends back to the sender also stands a chance of being dropped or lost. Your protocol needs to overcome this unreliability for both the sender or receiver. Provide students time to work on their protocol, iteratively testing their work and recording their final protocol.

Provide students an opportunity to either present their protocols in written or auditory form, then test them out by sending a randomly generated message. The goal of this share-out would be to identify the main components of the protocols that groups developed in common.

A Simple Solution

Sender: The simplest solution is to develop something akin to TCP, in which you use part of the message to indicate the the packet number and how many there are total. For example:

Receiver: Should know how many messages there are and can request a resend of any that are missing. For example if you received messages 1, 2, and 4. You could send a message back, something like one of these:

The way the real TCP works is this: every once in awhile TCP sends back a "cumulative acknowldegement" of how many in-order packets it has received. For example, in an 8-packet message if you received packets:

1 2 _ 4 5 6 _ 8

Then you would send back a message like:

This would indicate to the sender that next packet you need is packet 3. The sender would send 3, and once you got it, your next message would be:

Because you received packets 4, 5, and 6 already.

Wrap Up

We're going to watch a short video that talks a little more about the way this protocol and others help us ensure the reliability of the Internet.

Connect Activity to TCP: Either say these points or draw them out through discussion

Assessment

1. Pick the two statements about packets and routing on the Internet which are true.

2. Which of the following is NOT true about packets?

3. Match the Definition with the Term


Extended Learning




Standards Alignment