EEC-484/584 EEC-484/584 Computer Computer Networks Networks Lecture 8 Lecture 8 Wenbing Zhao Wenbing Zhao [email protected][email protected](Part of the slides are based on Drs. Kurose & (Part of the slides are based on Drs. Kurose & Ross Ross ’ ’ s slides for their s slides for their Computer Networking Computer Networking book) book)
35
Embed
EEC-484/584 Computer Networks Lecture 8 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
2/17/2016 EEC-484/584: Computer Networks Wenbing Zhao TCP Segment Structure source port # dest port # 32 bits application data (variable length) sequence number acknowledgement number Receive window Urg data pnter checksum F SR PAU head len not used Options (variable length) URG: urgent data (generally not used) ACK: ACK # valid PSH: push data now (generally not used) RST, SYN, FIN: connection estab (setup, teardown commands) # bytes rcvr willing to accept counting by bytes of data (not segments!) Internet checksum (as in UDP) A TCP segment must fit into an IP datagram!
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
[email protected][email protected] (Part of the slides are based on Drs. Kurose & Ross(Part of the slides are based on Drs. Kurose & Ross’’s slides s slides for their for their Computer Networking Computer Networking book)book)
The TCP Segment HeaderThe TCP Segment Header Source port and destination port: identify local end points of the
connection Source and destination end points together identify the connection
Sequence number: identify the byte in the stream of data that the first byte of data in this segment represents
Acknowledgement number: the next sequence number that the sender of the ack expects to receive Ack # = Last received seq num + 1 Ack is cumulative: an ack of 5 means 0-4 bytes have been
received TCP header length – number of 32-bit words in header
• Approach: increase transmission rate (window size), probing for usable bandwidth, until loss occurs– Additive increase: increase cwnd every RTT until
loss detected– Multiplicative decrease: cut cwnd after loss
Exercise#1Exercise#1 A process at host A wants to establish a TCP connection with
another process at host B. Assuming that host A chooses to use 1628 as the initial sequence number, and host B chooses to use 3217 as the initial sequence number for this connection, show the segments involved with the connection establishment process. You must include the following information for each such segment: (1) sequence number, (2) acknowledgement number (if applicable), (3) the SYN flag bit status, and (4) the ACK flag bit status.
Exercise#2Exercise#2 Host A and B are communicating over a TCP connection, and host B has already
received from A all bytes up through byte 126. Suppose Host A then sends two segments to Host B back-to-back. The first and second segments contain 70 and 50 bytes of data, respectively. In the first segment, the sequence number is 127, the source port number is 302, and the destination port number is 80. Host B sends an ack whenever it receives a segment from Host A.a) In the second segment sent from A to B, what are the sequence number, source port
number, and destination port number?b) If the first segment arrives before the second segment, in the ack of the first arriving
segment, what is the ack number, the source port number, and the destination port number?
c) If the second segment arrives before the first segment, in the ack of the first arriving segment, what is the ack number?
d) Suppose the two segments sent by A arrive in order at B. The 1st ack is lost and the 2nd ack arrives after the 1st timeout interval. Draw a timing diagram showing these segments and all other segments and acks sent. (Assume there is no additional packet loss.) For each segment in your figure, provide the sequence number and the number of bytes of data; for each ack that you add, provide the ack number
Exercise#3Exercise#3Consider the figure here and answer the followingquestions.
a) Identify the intervals of time when TCP slow start is operating
b) Identify the intervals of time when TCP congestion avoidance is operatingc) After the 16th transmission round, is segment loss detected by a triple
duplicate ACK or by a timeout?d) After the 22nd transmission round, is segment loss detected by a triple
duplicate ACK or by a timeout?e) What is the initial value of ssthresh at the 1st transmission round?f) What is the value of ssthresh at the 18th transmission round?g) What is the value of ssthresh at the 24th transmission round?h) During what transmission round is the 70th segment sent?i) Assuming a packet loss is detected after the 26th round by the receipt of a
triple duplicate ACK, what will be the values of the congestion window size and of ssthresh?