Department of Electrical and Information Technology ETSF10 Internet Protocols Home / Laboratory Project II

Similar documents
Department of Electrical and Information Technology ETSF10 Internet Protocols Home / Laboratory Project II

Department of Electrical and Information Technology ETSF10 Internet Protocols Home Laboratory Project II

ETSF10 Internet Protocols Transport Layer Protocols

To see the details of TCP (Transmission Control Protocol). TCP is the main transport layer protocol used in the Internet.

Problem Set 7 Due: Start of Class, November 2

Chapter 6. What happens at the Transport Layer? Services provided Transport protocols UDP TCP Flow control Congestion control

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

Topics. TCP sliding window protocol TCP PUSH flag TCP slow start Bulk data throughput

Wireshark Lab: TCP v7.0

Transport Layer PREPARED BY AHMED ABDEL-RAOUF

TCP. CSU CS557, Spring 2018 Instructor: Lorenzo De Carli (Slides by Christos Papadopoulos, remixed by Lorenzo De Carli)

Congestion Control In The Internet Part 2: How it is implemented in TCP. JY Le Boudec 2014

ECE 610: Homework 4 Problems are taken from Kurose and Ross.

Lecture 20 Overview. Last Lecture. This Lecture. Next Lecture. Transport Control Protocol (1) Transport Control Protocol (2) Source: chapters 23, 24

Lecture 4: Congestion Control

Before beginning this lab, you ll probably want to review sections 3.5 and 3.7 in the text. 1

TCP Performance. EE 122: Intro to Communication Networks. Fall 2006 (MW 4-5:30 in Donner 155) Vern Paxson TAs: Dilip Antony Joseph and Sukun Kim

TCP and Congestion Control (Day 1) Yoshifumi Nishida Sony Computer Science Labs, Inc. Today's Lecture

Congestion Control In The Internet Part 2: How it is implemented in TCP. JY Le Boudec 2014

ECE 333: Introduction to Communication Networks Fall 2001

4. What is the sequence number of the SYNACK segment sent by spinlab.wpi.edu to the client computer in reply to the SYN? Also Seq=0 (relative

SharkFest'17 US. Understanding Throughput & TCP Windows. A Walk-Through of the Factors that can limit TCP Throughput Performance

EE586 Homework and Laboratory #5 Due November 3, 2010

Basic Reliable Transport Protocols

User Datagram Protocol

Transport Layer Marcos Vieira

COMP/ELEC 429/556 Introduction to Computer Networks

Lab Exercise UDP & TCP

Section #6 Handout. B has processed this packet and updated its position of its sliding window. Everything is in terms of bytes.

Congestion Control In The Internet Part 2: How it is implemented in TCP. JY Le Boudec 2015

Before beginning this lab, you ll probably want to review sections 3.5 and 3.7 in the text.

CS419: Computer Networks. Lecture 10, Part 3: Apr 13, 2005 Transport: TCP performance

SSFNET TCP Simulation Analysis by tcpanaly

UNIT IV TRANSPORT LAYER

TCP/IP Protocol Suite 1

User Datagram Protocol (UDP):

Chapter 24. Transport-Layer Protocols

UNIT IV -- TRANSPORT LAYER

Guide To TCP/IP, Second Edition UDP Header Source Port Number (16 bits) IP HEADER Protocol Field = 17 Destination Port Number (16 bit) 15 16

Congestion Control In The Internet Part 2: How it is implemented in TCP. JY Le Boudec 2015

CS 356: Introduction to Computer Networks. Lecture 16: Transmission Control Protocol (TCP) Chap. 5.2, 6.3. Xiaowei Yang

> : S. timestamp > : (0) win <mss 1460,nop,wscale 0,nop,nop, 4 different options used

CS419: Computer Networks. Lecture 10, Part 2: Apr 11, 2005 Transport: TCP mechanics (RFCs: 793, 1122, 1323, 2018, 2581)

ECE 435 Network Engineering Lecture 10

TSIN02 - Internetworking

TSIN02 - Internetworking

TCP Sendbuffer Advertising. Costin Raiciu University Politehnica of Bucharest

Chapter 23 Process-to-Process Delivery: UDP, TCP, and SCTP 23.1

CS519: Computer Networks. Lecture 5, Part 4: Mar 29, 2004 Transport: TCP congestion control

Flow and Congestion Control (Hosts)

Chapter 7. The Transport Layer

Fast Retransmit. Problem: coarsegrain. timeouts lead to idle periods Fast retransmit: use duplicate ACKs to trigger retransmission

TSIN02 - Internetworking

Performance Analysis of TCP Variants

CS321: Computer Networks Congestion Control in TCP

Transport Layer. -UDP (User Datagram Protocol) -TCP (Transport Control Protocol)

Computer Networks Spring 2017 Homework 2 Due by 3/2/2017, 10:30am

Multiple unconnected networks

Transport Over IP. CSCI 690 Michael Hutt New York Institute of Technology

TRANSMISSION CONTROL PROTOCOL. ETI 2506 TELECOMMUNICATION SYSTEMS Monday, 7 November 2016

CSCI-1680 Transport Layer I Rodrigo Fonseca

Chapter 23 Process-to-Process Delivery: UDP, TCP, and SCTP

8. TCP Congestion Control

Department of Computer and IT Engineering University of Kurdistan. Transport Layer. By: Dr. Alireza Abdollahpouri

Transport layer. UDP: User Datagram Protocol [RFC 768] Review principles: Instantiation in the Internet UDP TCP

05 Transmission Control Protocol (TCP)

Transport layer. Review principles: Instantiation in the Internet UDP TCP. Reliable data transfer Flow control Congestion control

TCP/IP Transport Layer Protocols, TCP and UDP

Transport Protocols. Raj Jain. Washington University in St. Louis

TCP Congestion Control

Transmission Control Protocol (TCP)

6.1 Internet Transport Layer Architecture 6.2 UDP (User Datagram Protocol) 6.3 TCP (Transmission Control Protocol) 6. Transport Layer 6-1

CPSC 3600 HW #4 Solutions Fall 2017 Last update: 12/10/2017 Please work together with your project group (3 members)

Answers to Sample Questions on Transport Layer

Stream Control Transmission Protocol

Mobile Transport Layer Lesson 10 Timeout Freezing, Selective Retransmission, Transaction Oriented TCP and Explicit Notification Methods

Chapter 3 outline. 3.5 Connection-oriented transport: TCP. 3.6 Principles of congestion control 3.7 TCP congestion control

COMPUTER NETWORK. Homework #3. Due Date: May 22, 2017 in class

TCP Selective Acknowledgement

23-3 TCP. Topics discussed in this section: TCP Services TCP Features Segment A TCP Connection Flow Control Error Control 23.22

CPSC 3600 HW #4 Fall 2017 Last update: 11/9/2017 Please work together with your project group (3 members)

COMPUTER NETWORK. Homework #3. Due Date: May 22, 2017 in class

Investigating the Use of Synchronized Clocks in TCP Congestion Control

Lecture - 36 Effect on Higher Layer I

TCP Performance Analysis Based on Packet Capture

Computer Networks. Homework #3: Due 11 November 2015 (Wednesday) Just before Midterm#2!

Neural-based TCP performance modelling

Computer Networks and Data Systems

Computer Networks. Homework #4: No Grading

Outline Computer Networking. TCP slow start. TCP modeling. TCP details AIMD. Congestion Avoidance. Lecture 18 TCP Performance Peter Steenkiste

Advanced Computer Networks

Review Questions for Midterm Exam-2 Fall 2016

Congestion / Flow Control in TCP

TCP: Flow and Error Control

Network Protocols. Transmission Control Protocol (TCP) TDC375 Autumn 2009/10 John Kristoff DePaul University 1

Transport Protocols & TCP TCP

TCP Service Model. Today s Lecture. TCP Support for Reliable Delivery. EE 122:TCP, Connection Setup, Reliability

TCP so far Computer Networking Outline. How Was TCP Able to Evolve

Preview Test: HW3. Test Information Description Due:Nov. 3

6. The Transport Layer and protocols

Transcription:

Department of Electrical and Information Technology ETSF10 Internet Protocols Home / Laboratory Project II TCP The aim of this lab is to guide you while you familiarise yourselves with some of the basic TCP concepts you encounter during the lectures. For this purpose, you are going to analyse the packet capture file of a clientserver communication, i.e. communication between two end points in a real IP network such as the Internet. The data you will analyse is stored in advance to PCAP files, i.e. they are the outcome of a real communication session but they are not live. What you need to do is to perform the tasks defined later in this document, analyse and interpret your observations as requested, and write a report summarising your findings. Enjoy! 1. Lab Setup For the analysis, you need a software called packet analyser. There are a number of packet analysers you can actually use for this lab; and you re free to pick the one you like most. Your lecturers, on the other hand, will only assume Wireshark knowledge when they answer possible questions from you. You will have the opportunity to complete the lab on your personal computers, if you prefer, or use the department's computer laboratory facilities as usual. In the latter case, you can use one of the common computer laboratories in E-huset's basement (varg, val, falk, hacke, panter, lo, venus, mars and jupiter). Please keep in mind that, in the laboratories, you will only be able to work with Wireshark on Linux machines. It is recommended to familiarise yourselves with the tool you ll work with before getting started. In case you opt for Wireshark but haven t used it before, download (http://www.wireshark.org/download.html) and install it, or go to one of the laboratories in the basement. Play along with the user preferences, capture some network traffic only if you are working from home, as the department s network security policy won t let you do this in the laboratories, download, open and investigate some previously captured files (http://wiki.wireshark.org/samplecaptures), etc. Also, check the Wireshark user documentation (http://www.wireshark.org/docs, esp. sections 1.2, 2.5, 2.8, 3, 4.3, 4.5, 4.10, 4.11, 5.2, 5.7, and 6). 2. Groups You will work in groups of two. The groups you have established for the routing lab will also be valid for the TCP lab unless you specifically point out that you'd like to form a new group with someone else. In the latter case, one partner from each group needs to register the group by sending an e-mail to Kaan Bur (kaan.bur@eit.lth.se) with the subject "Internet protocol - tcp lab group", and putting the other partner to CC. Kaan Bür TCP Laboratory Project ETSF10 Internet Protocols Page 1/7

3. Timeline This year s lab is scheduled to take place during the second section of the course. Always check the course's web pages for current deadline dates. You are free to decide when to start with the lab and how much time to spend on it; but we strongly recommend you to not postpone it until the last minute. 4. Report When writing your report, always keep in mind that your answers must be clear, complete and self-contained. In other words, you must not assume that the lecturers already know the answers or what s going on your minds. You need to describe your approach, i.e. how you found what you found, as well as your findings during the tasks. Whenever necessary, include in the report the relevant information from the PCAP file, e.g. screenshots or printouts from Wireshark showing the packet header(s) or the data where you got your answer from. If possible, mark the data with e.g. a highlighter pen (using your word or graphics editors) to make it visible. A chapter with your own reflections and comments on the lab assignment concludes the report. The report must be of reasonable length, written in your own words in English. You need to decide for yourselves what the reasonable length is but, based on previous years experience, you can assume 8 pages to be the maximum limit, with 10pt minimum font size, and including everything (e.g. cover page, all figures and the appendix mentioned below). Apart from these requirements, the report is free-style, i.e. you are going to have to decide for yourselves the best way to present your results. Please include as an appendix to your report your personal comments and suggestions on the lab as well as any errors found in this document or any bugs regarding the lab in general. We would also like to know the amount of time you spent with (a) your analysis and (b) the report. Submit your report in PDF form via the course moodle (http://elearning.eit.lth.se/moodle/ ) before the deadline (see webpage). When submitting, write your group number (from the routing lab) and individual LTH ID on the cover. Do not reveal your names on the cover page or anywhere else in the report! 5. Assessment Your lab report will be reviewed and marked as passed or failed. Failed reports will be returned to their authors, who will then have the opportunity to revise them according to the received comments, and resubmit. 6. Help Help will be available throughout the project timeline. The preferred method for asking questions is e-mail to the project supervisor. Check the office hours on the course s home page. 7. Further Reading http://tools.ietf.org/html/rfc793 on TCP http://tools.ietf.org/html/rfc2581 on TCP congestion control http://en.wikipedia.org/wiki/pcap on packet capture http://en.wikipedia.org/wiki/packet_analyzer on packet analysers http://en.wikipedia.org/wiki/comparison_of_packet_analyzers on a list of available tools http://www.wireshark.org on our favorite tool Kaan Bür TCP Laboratory Project ETSF10 Internet Protocols Page 2/7

8. Tasks To complete the following tasks, download the necessary PCAP file from the TCP Lab section of the course s project page http://www.eit.lth.se/index.php?ciuid=672&coursepage=4046). Then, run the packet analyser of your choice (e.g. Wireshark) and open the PCAP file you downloaded. To answer the questions, it is sufficient to look into the listing of the captured packets (in Wireshark, the colourful lines usually in the upper half of the application window) and the details of the selected packet header (the middle part in Wireshark), unless specified otherwise. You won t need to go into the details of packet contents. When answering the questions which require you to draw figures, keep in mind that you don t need to create exact replicas of the figures below. Just make sure you have represented clearly the answer to the question in graphical form, leaving no room for possible confusion for the reviewer of your report. You are now investigating the message exchange log of a file transfer between two nodes on the Internet. The node requesting the file is the CLIENT, whereas the one sending it is the SERVER. 8.1. Connection Establishment Investigate the packets exchanged for connection establishment and find the answers to the following questions. (Refer to Stallings chapter 15, if you need to refresh your memory.) 8.1.1. [2 points] Who s the client, who s the server? Identify with IP addresses. 8.1.2. [4 points] How many packets are exchanged to establish the connection? Which ones? Give index numbers. How do you identify these packets? What do we call this connection establishment process? 8.1.3. [6 points] For each packet you identify as a connection establishment packet, identify also the TCP header fields. Prepare a table representing the TCP header and fill it in with actual data you read from each packet. In your report, use tables like the one shown in Figure 1. Use decimal numbers instead of binary except for the 1-bit flags where you only can enter 1s and 0s. You do not need to fill in the checksum, urgent pointer, and options and padding fields. Figure 1: TCP segment header format reprinted from Stallings, Figure 15.10. Kaan Bür TCP Laboratory Project ETSF10 Internet Protocols Page 3/7

8.1.4. [3 points] At the end of connection establishment, what are the values for the maximum segments size (MSS) and receiver-advertised window (RWND) agreed upon, both for the client as well as for the server? 8.2. Data Transfer Once a connection is established, the actual data transfer can begin. So, now, investigate this second phase in our TCP session and answer the following questions. 8.2.1. [2 points] By now, you should know about the essential data networking concepts such as the OSI layered network architecture and the corresponding TCP/IP suite. So, you know that TCP is activated, at least in our lab, by an application layer protocol. Which one is it? Where do you read that information from? 8.2.2. [2 points] The application layer protocol on the client side uses a method to request a video from the server. What is this method called? What is the title of the video being requested? How do you find that out? 8.2.3. [4 points] When does the actual data transfer start? (We count the time starting from the beginning of the capture. In other words, the very first packet should have a timestamp showing 0 s. You can easily set the relative time in Wireshark Menu\View\ Time Display Format\Seconds Since Beginning of Capture.) Which one is the first packet carrying actual data? Why? 8.2.4. [6 points] Starting from the first packet carrying data bytes, show visually the packets being exchanged between the client and the server for the first three rounds, i.e. until the 3. ACK is sent by the client. For visualisation, use a flow graph style similar to that of Figure 2. Give sequence and acknowledgement numbers (the real numbers as used in the packet headers) as well as the number of the first and last data bytes contained in each packet. Skip the information on the flags status. Figure 2: Data transfer example reprinted from Forouzan Data Communications and Networking Kaan Bür TCP Laboratory Project ETSF10 Internet Protocols Page 4/7

8.2.5. [4 points] Why is 192.168.0.105 acknowledging (ACK) every other data packet (DATA) and not every single one? Is that normal? If so, what is this behaviour called? How is the value of the ACK selected? What does it tell to the sender? 8.2.6. [3 points] Match the 3 acknowledgements with their corresponding data packets. Show in tabular format the times for DATA, its ACK, and the round trip time (RTT). (Look at the very bottom of the packet header details, you ll find some help under [SEQ/ACK analysis].) This is the actual RTT experienced by the network and is calculated as the difference of DATA and ACK. This is how you can validate your results. 8.2.7. [6 points] Calculate the estimated RTT for the end of this 3-segment sequence. Note that you need to do it step-by-step, i.e. after the reception of each ACK. So, assume the estimated RTT (old) to be equal to 0.035 ms for the first step (i=1). Then, use the following formula for each step (i=1,2,3): EstimatedRTT(new) = 0.875 * EstimatedRTT(old) + 0.125 * SampleRTT(i++) 8.2.8. [3 points] Starting from packet #20, node 192.168.0.105 starts decrementing its receiver-advertised window (RWND). Let s try to understand what happens to the other node s sliding window, i.e. that of 208.117.253.88, from this point on. We know that both nodes start with a congestion window (CWND) of 1 MSS. We also know from the connection establishment phase the size of MSS. Let s assume that TCP is still in slow start: exponential increase phase. As of the time of packet #20, 208.117.253.88 has received 6 ACKs, so it s CWND has become 7 MSS. Now, given the updates on RWND in the ACK packets #20, #23, and #26, all coming from 192.168.0.105, show how the sizes of RWND, CWND and of the sliding window change in bytes after each of these 3 packets. Remember that the sliding window s size is calculated as follows: WindowSize = min (RWND, CWND) 8.2.9. [10 points] Now, go to packet #238. Starting from this packet, you shall draw a flow graph similar to that of Figure 3, for the packet exchange between the client and the server. The last packet on this graph should be #253. For the packets sent from the server to the client, identify the packets by their sequence numbers in the header. For the packets from the client to the server, identify them by their acknowledgement numbers. Show the lost segment(s) from the server to the client, too. On the server side, also note the number of bytes in flight for each DATA segment sent to the client. (Look at the very bottom of the packet header details, you ll find some help under [SEQ/ACK analysis].) Ignore the receiver buffer on the right side of the figure. Kaan Bür TCP Laboratory Project ETSF10 Internet Protocols Page 5/7

Figure 3: Fast retransmission example reprinted from Forouzan Data Communications and Networking 8.2.10. [4 points] There is a sudden increase in the number of bytes in flight on the server side. Why? (Bytes in flight are those sent but not yet acknowledged. See Figure 4, but note that numbers are made up.) Figure 4: Sliding window example reprinted from Forouzan Data Communications and Networking 8.3. Connection Termination As you can guess, the last couple of packets are designated for connection termination. Look at them and find the answers to the following questions. 8.3.1. [3 points] How many packets are exchanged this time? How do you recognise them? 8.3.2. [3 points] Is the process similar to that of connection establishment? If not, what is different? There is a special name for this particular termination process. What is it? 8.4. Overall Assessment We have seen a TCP connection being established, used for data transfer, and torn down. Now it is time to analyse from a holistic perspective the TCP session we ve just closed. Answer the following questions. 8.4.1. [6 points] What is the average throughput for the whole duration of the TCP session? How do you calculate this value? Compare the result to the instantaneous throughput, which you can see by plotting the throughput graph under Wireshark Menu\Statistics\TCP Stream Graph\Throughput Graph. Remember that we re interested in the throughput of the connection from the server towards Kaan Bür TCP Laboratory Project ETSF10 Internet Protocols Page 6/7

the client. So, make sure you have clicked on a packet which is sent in the right direction before plotting the graph. 8.4.2. [2 points] Following the same menu, also plot the graph for the round trip time. What is the maximum RTT experienced during the TCP session? When did it happen according to the graph? 8.4.3. [3 points] Finally, plot the Time/Sequence (Stevens s style) graph, which shows the sequence number of the segments received by the client versus time. (You can zoom in and out by clicking on a location on the graph.) What can you tell about the data flow in this TCP session by looking at this graph? What could be happening as the line goes diagonally upwards; what as it goes more or less horizontally? 8.4.4. [4 points] Can you identify where TCP s slow start phase begins and ends, and where congestion avoidance takes over? Justify your answer. 9. Final Remarks Please don t forget to finish your report with a conclusion section summarising what you have learned, together with your own reflections and comments on the lab. Finally, try to keep track of time, for we would like to know the amount of time you spent with this lab. Congratulations! You ve completed the TCP lab. Kaan Bür TCP Laboratory Project ETSF10 Internet Protocols Page 7/7