CS475: Computer Networks - The Transport Layer

Activity Goals

The goals of this activity are:
  1. To describe the role of the Transport Layer
  2. To describe protocols for various levels of quality-of-service including UDP and TCP
  3. To explain how congestion management is handled in a distributed and passive manner using TCP
  4. To differentiate between quality-of-service levels with different Transport Layer protocols
  5. To define a sliding window protocol using TCP for efficient and in-order buffered communications

Supplemental Reading

Feel free to visit these resources for supplemental background reading material.

The Activity

Directions

Consider the activity models and answer the questions provided. First reflect on these questions on your own briefly, before discussing and comparing your thoughts with your group. Appoint one member of your group to discuss your findings with the class, and the rest of the group should help that member prepare their response. Answer each question individually from the activity, and compare with your group to prepare for our whole-class discussion. After class, think about the questions in the reflective prompt and respond to those individually in your notebook. Report out on areas of disagreement or items for which you and your group identified alternative approaches. Write down and report out questions you encountered along the way for group discussion.

Model 1: User Datagram Protocol (UDP)

Source Port (16 bits) Destination Port (16 bits)
Length (16 bits) Checksum (16 bits)

Questions

  1. What do you think a port number represents? In other words, how does the Transport Layer multiplex or share the network?
  2. Review the UDP RFC and describe the format of the checksum.
  3. Error detection is also employed at the link layer. Why might error detection occur at this layer?
  4. UDP does not inherently acknowledge packet receipt. Why is it valuable to detect packet errors anyway?
  5. What must one do if ordered, reliable packet delivery is essential?
  6. What kind of applications might benefit from a transport layer protocol that does not provide reliable automatic retransmission?
  7. Review the example socket program using the UDP protocol. What revisions might you make to incorporate ordered packet delivery, and reliable retransmission of packets?

Model 2: Transmission Control Protocol (TCP)

Source Port (16 bits) Destination Port (16 bits)
Sequence Number (32 bits)
Acknowledgement Number (32 bits)
Offset (4 bits) Reserved (3 bits) Bit Flags (9): Nonce,
Congestion Window
Reduced, ECN Echo,
Urgent, ACK, Push,
Connection Reset,
SYN, FIN
Window Size (16 bits)
Checksum (16 bits) Urgent Pointer (16 bits)
Options

Questions

  1. Which field helps ensure that packets are delivered in the order in which they are sent?
  2. What is the disadvantage of starting the sequence numbering at 0?
  3. How might the sender and receiver agree on starting sequence numbers?
  4. Which fields are used to establish and terminate a connection?

Model 3: The Three-Way Handshake

Tcp-handshake
Tcp state diagram fixed new
TCP CLOSE

Questions

  1. Review the flowchart to terminate a connection. How many connections are present in a typical TCP communication, and why?
  2. The SYN packet is used to synchronize, or start, a connection. Three messages are used to establish such a bidirectional connection: what do you think they contain?
  3. Do you think a UDP connection is also bidirectional? Why or why not?

Model 4: Reliable Retransmission Protocol with TCP

Sender Receiver
Send 100 Bytes SEQ=0 ACK 100
Send 100 Bytes SEQ=100 ACK 200
Send 100 Bytes SEQ=200 (Lost)
Send 100 Bytes SEQ=300 (Received, ACK 200)
Send 100 Bytes, SEQ=400 (Received, ACK 200)
Retransmit Starting at SEQ=200 ACK 500

Questions

  1. What does ACK 100 imply?
  2. Why does the sender continue to send ACK 200 message even as additional packets are received?
  3. Why did the sender retransmit duplicate packets, and what happens to those packets?
  4. What might be an improved sequencing protocol?

Model 5: Congestion and Flow Control with TCP

Tcp
TCP Slow-Start and Congestion Avoidance
CongWin in TCP Tahoe e Reno

Questions

  1. Which phase of TCP transmission features the fastest growth?
  2. When a loss occurs, implying congestion, slow start begins again by sending 1 maximum-segment-size (MSS) and doubling with each successful ACK received. At what point does Slow Start transition to congestion avoidance following a loss?
  3. What are some ways a sender might determine that a loss has occurred?
  4. Might it be a good idea to "fast retransmit" a packet that has been lost perhaps for reasons other than congestion, without restarting Slow Start?
  5. How might you compute a round trip time estimate for determining that a packet has been lost? Should you assume a loss as soon as this estimate has been reached?
  6. How does TCP Tahoe improve over TCP Reno by avoiding a return to Slow Start from the beginning on packet loss?
  7. What would be the advantages and disadvantages of leaving Slow Start after observing rising round trip times, rather than waiting for a loss, as TCP Vegas does?
  8. Suppose you have a UDP socket open and transmitting, causing congestion on the network. The TCP senders throttle back automatically due to congestion control. What happens to the UDP sender? Over time, what happens to the throughputs of the TCP senders? What can we do to make throughput more fair for everyone?

Model 6: Avoiding a Return to Slow Start by Monitoring the Round Trip Time

\(RTT_{i} = \alpha \times RTT_{i-1} + (1 - \alpha) \times t\)

Questions

  1. Describe, in your own words, how the Round Trip Time is updated at each iteration.
  2. What do you think is the purpose of the \(\alpha\) term, which is a value between 0 and 1?
  3. What does it mean if \(\alpha\) is 0.5? How about 0 and 1?

Model 7: Improved Round Trip Time Estimation with the Jacobson/Karels Algorithm

\(RTT_{i} = RTT_{i-1} \times (\alpha \times (t - RTT_{i-1}))\)
\(Deviation_{i} = Deviation_{i-1} + \frac{1}{4} \times (|t - RTT_{i-1}| - Deviation_{i-1})\)
\(TimeOut = RTT_{i} + 4 \times Deviation_{i}\)

Questions

  1. What new feature of the Round Trip Time is being utilized to estimate a good timeout interval?
  2. Why do you think powers of 2 were selected for the constants in these formulas?
  3. How does the role of \(\alpha\) differ between the original definition and this one?

Model 8: The Small Packet Problem and Nagle's Algorithm

Nagle's Algorithm Transmission Timeline; Mogul, J. and G. Minshall. "Rethinking the TCP Nagle algorithm." Comput. Commun. Rev. 31 (2001): 6-20.

Questions

  1. How large would each packet be if a sentence was transmitted one character at a time over TCP?
  2. How might we reduce this overhead? Specifically, from the diagram, how long does Nagle propose to buffer data before sending a single unifed packet? In other words, what event triggers a a TCP transmission when using Nagle's Algorithm?
  3. What do you think the TCP_NODELAY TCP configuration parameter means? How about TCP_QUICKACK? What problem do you think each one solves?

Submission

I encourage you to submit your answers to the questions (and ask your own questions!) using the Class Activity Questions discussion board. You may also respond to questions or comments made by others, or ask follow-up questions there. Answer any reflective prompt questions in the Reflective Journal section of your OneNote Classroom personal section. You can find the link to the class notebook on the syllabus.