Chapter 24 Problems

Ace your homework & exams now with Quizwiz!

TCP is sending data at 1 megabyte per second. If the sequence number starts with 7000, how long does it take before the sequence number goes back to zero?

(2^(32)-1) - 7000 = 4294960295 4294960295 / 10^(6) = 4295 seconds

In a connection, the value of cwnd is 3000 and the value of rwnd is 5000. The host has sent 2000 bytes, which have not been acknowledged. How many more bytes can be sent?

swnd = min(3000, 5000) = 3000, can send 1000 more bytes

The control field in a TCP segment is 6 bits. We can have 64 different combinations of bits. List some combinations that you think are normally used.

010010, 010001

In TCP, if the value of HLEN is 0111, how many bytes of options are included in the segment?

0111 = 7, 7 x 4 = 28 => 8 bytes of options

To make the initial sequence number a random number, most systems start the counter at 1 during bootstrap and increment the counter by 64,000 every half second. How long does it take for the counter to wrap around?

2^(32) - 1 = 4294960295 4294960295 / (64000 x 2) = 33554 seconds

A client uses UDP to send data to a server. The data length is 16 bytes. Calculate the efficiency of this transmission at the UDP level (ratio of useful bytes to total bytes).

8 byte header + 16 bytes data = 24 bytes 16/24 = 66.667% efficiency

An HTTP client opens a TCP connection using an initial sequence number (ISN) of 14,534 and the ephemeral port number of 59,100. The server opens the connection with an ISN of 21,732. Show the three TCP segments during the connection establishment if the client defines the rwnd of 4000 and the server defines the rwnd of 5000. Ignore the calculation of the checksum field.

In notebook

An SCTP association is in the COOKIE-WAIT state. It receives an INIT chunk; what does it need to do?

In notebook

An SCTP client opens an association using an initial tag of 806, an initial TSN of 14534, and a window size of 20,000. The server responds with an initial tag of 2000, an initial TSN of 670, and a window size of 14,000. Show the contents of all four packets exchanged during association establishment. Ignore the value of the cookie.

In notebook

Assume the HTTP client in the previous problem closes the connection and, at the same time, acknowledges the bytes received in the response from the server. After receiving the FIN segment from the client, the server also closes the connection in the other direction. Show the connection termination phase.

In notebook

Assume the HTTP client in the previous problem sends a request of 100 bytes. The server responds with a segment of 1200 bytes. Show the contents of the two segments exchanged between the client and the sender. Assume the acknowledgment of the response will be done later by the client (ignore calculation of checksum field).

In notebook

Figure 24.15 shows the client and server in the transition diagram for the common scenario using a four-handshake closing. Change the diagram to show the three-handshake closing.

In notebook

For a clearer view of Nagle's algorithm, let us repeat the previous problem, but let the server transport layer acknowledge a segment when there is a previous segment that has not been acknowledged (every other segment) or a timer times out after 60 ms. Show the time line for this scenario.

In notebook

If the client in the previous exercise sends 7600 data chunks and the server sends 570 data chunks, show the contents of the three packets exchanged during association termination.

In notebook

In SCTP, the state of a sender is as follows: a. The sending queue has chunks 18 to 23. b. The value of curTSN is 20. c. The value of the window size is 2000 bytes. d. The value of inTransit is 200. If each data chunk contains 100 bytes of data, how many DATA chunks can be sent now? What is the next data chunk to be sent?

In notebook

The ssthresh value for a Reno TCP station is set to 8 MSS. The station is now in the slow-start state with cwnd = 5 MSS and ssthresh = 8 MSS. Show the values of cwnd, ssthresh, and the current and the next state of the station after the following events: three consecutive nonduplicate ACKs arrived, followed by five duplicate ACKs, followed by two nonduplicate ACKs, and followed by a time-out.

In notebook

The ssthresh value for a Taho TCP station is set to 6 MSS. The station now is in the slow-start state with cwnd = 4 MSS. Show the values of cwnd, sstresh, and the state of the station before and after each of following events: four consecutive nonduplicate ACKs arrived followed by a time-out, and followed by three nonduplicate ACKs.

In notebook

We discuss the new option of SACKs for TCP on the book website, but for the moment assume that we add an 8-byte NAK option to the end of the TCP segment, which can hold two 32-bit sequence numbers. Show how we can use this 8-byte NAK to define an out-of-order or duplicate range of bytes received.

In notebook

In TCP, assume a client has 100 bytes to send. The client creates 10 bytes at a time in each 10 ms and delivers them to the transport layer. The server acknowledges each segment immediately or if a timer times out at 50 ms. Show the segments and the bytes each segment carries if the implementation uses Nagle's algorithm with maximum segment size (MSS) of 30 bytes. The round-trip time is 20 ms, but the sender timer is set to 100 ms. Does any segment carry the maximum segment size? Is Nagler's algorithm really effective here? Why?

In notebook. Yes, segments are sent with max segment size. Number of ACKs are not reduced effectively

In SCTP, the state of a receiver is as follows: a. The receiving queue has chunks 1 to 8, 11 to 14, and 16 to 20. b. There are 1800 bytes of space in the queue. c. The value of lastAck is 4. d. No duplicate chunk has been received. e. The value of cumTSN is 5. Show the contents of the receiving queue and the variables. Show the contents of the SACK message sent by the receiver.

In notebook. cumTSN = 5, winSize = 1800, lastACK = 4

In a TCP connection, assume that maximum segment size (MSS) is 1000 bytes. The client process has 5400 bytes to send to the server process, which has no bytes to respond (unidirectional communication). The TCP server generates ACKs according to the rules we discussed in the text. Show the time line for the transactions during the slow start phase, indicating the value of cwnd at the beginning, at the end, and after each change. Assume that each segment header is only 20 bytes

MSS = 1000 bytes, 980 data bytes, 20 header bytes. 5 1000 byte segments, one 520 byte segment. Timeline in notebook

Answer the following questions: a. What is the minimum size of a UDP user datagram? b. What is the maximum size of a UDP user datagram? c. What is the minimum size of the application-layer payload data that can be encapsulated in a UDP user datagram? d. What is the maximum size of the application-layer payload that can be encapsulated in a UDP user datagram?

a.) 8 bytes b.) 65535 bytes c.) 8 bytes d.) 65535 bytes

The following is part of a TCP header dump (contents) in hexadecimal format. E293 0017 00000001 00000000 5002 07FF... a. What is the source port number? b. What is the destination port number? c. What is the sequence number? d. What is the acknowledgment number? e. What is the length of the header? f. What is the type of the segment? g. What is the window size?

a.) E293 = 58003 b.) 0017 = 23 c.) 00000001 = 1 d.) 00000000 = 0 e.) 0x05 = 5, 5 x 4 = 20 bytes f.) 0x02 = 000010, SYN g.) 07FF = 2047

Using Figure 24.19, explain how flow control can be achieved at the sender site in TCP (from the sending TCP to the sending application). Draw a representation.

Sender achieves flow control by not overflowing the receiver with packets. This is done by resizing swnd based on receiver advertisement

To better understand the need for the three-handshake connection establishment, let us go through a scenario. Alice and Bob have no access to telephones or the Internet (think about the old days) to establish their next meeting at a place far from their homes. a. Suppose that Alice sends a letter to Bob and defines the day and the time of their meeting. Can Alice go to the meeting place and be sure that Bob is there? b. Suppose that Bob responds to Alice's request with a letter and confirms the date and time. Can Bob go to the meeting place and be sure that Alice is there? c. Suppose that Alice responds to Bob's letter and confirms the same date and time. Can either one go to the meeting and be sure that the other person is there?

a.) No b.) No c.) Yes

What can you say about each of the following TCP segments, in which the value of the control field is: a. 000000 b. 000001 c. 010001 d. 000100 e. 000010 f. 010010

a.) No ACK b.) Terminates connection c.) ACK + terminate connection d.) Reset e.) Synch. f.) ACK + Synch.

Using Figure 24.19, explain how flow control can be achieved at the receiver site in TCP (from the receiving TCP to the receiving application).

Advertises buffer size

As we have explained in the text, the TCP sliding window, when used without new SACK options, is a combination of the Go-Back-N and the SelectiveRepeat protocols. Explain which aspects of the TCP sliding window are close to the Go-Back-N and which aspects are close to the Selective-Repeat protocol.

Go-Back-N: Can send multiple frames to receiver before receiving ACK Selective Repeat: Receiver can send ACKs for a set of received segments. When a damaged or lost segment is identified the sender only retransmits that segment

Eve, the intruder, sends a SYN segment to Bob, the server, using Alice's IP address. Can Eve create a TCP connection with Bob by pretending that she is Alice? Assume that Bob uses a different ISN for each connection.

No, the SYN+ACK would be sent to Alice and dropped, so only a half connection would exist.

Eve, the intruder, sends a user datagram to Bob, the server, using Alice's IP address. Can Eve, pretending to be Alice, receive a response from Bob?

Only if Eve can interpret the message sent by Bob to Alice

If originally RTTS = 14 ms and α is set to 0.2, calculate the new RTTS after the following events (times are relative to event 1): Event 1: 00 ms Segment 1 was sent. Event 2: 06 ms Segment 2 was sent. Event 3: 16 ms Segment 1 was timed-out and resent. Event 4: 21 ms Segment 1 was acknowledged. Event 5: 23 ms Segment 2 was acknowledged.

RTTs = 14 ms, alpha = .2 RTTm = 23 - 6 = 17ms RTTs = (1-.2)(14)+.2(17) = 14.6ms

Compare the TCP header and the UDP header. List the fields in the TCP header that are not part of the UDP header. Give the reason for each missing field.

Sequence number, ACK number, control fields, window size, urgent flag

An SCTP association is in the ESTABLISHED state. It receives a SHUTDOWN chunk. If the host does not have any outstanding or pending data, what does it need to do?

Shutdown-sent to Shutdown-ACK to Shutdown-ACK-sent

Distinguish between a time-out event and the three-duplicate-ACKs event. Which one is a stronger sign of congestion in the network? Why?

Three ACK is used for fast retransmission and is the stronger sign of congestion

In a TCP connection, the window size fluctuates between 60,000 bytes and 30,000 bytes. If the average RTT is 30 ms, what is the throughput of the connection?

Throughput = (.75 x wmax) / RTT = (.75 x 45000) / 30x10^-3 = 1.125 Mbps wmax = (60000 + 30000) / 2 = 45000

A client uses TCP to send data to a server. The data consist of 16 bytes. Calculate the efficiency of this transmission at the TCP level (ratio of useful bytes to total bytes).

Total = 16 data bytes + 20 byte header = 36 bytes Efficiency = 16 / 36 = 44.44%

Assume Alice, the client, creates a TCP connection with Bob, the server. They exchange data and close the connection. Now Alice starts a new connection with Bob by sending a new SYN segment. The server responds with the SYN + ACK segment. However, before Bob receives the ACK for this connection from Alice, a duplicate old ACK segment from Alice arrives at Bob's site. Can this old ACK be confused with the ACK segment Bob is expecting from Alice?

Unlikely due to sequence numbers. Would only happen if the sequence numbers rolled over and matched exactly

Assume Alice, the client, creates a connection with Bob, the server. They exchange data and close the connection. Now Alice starts a new connection with Bob by sending a new SYN segment. Before Bob responds to this SYN segment, a duplicate copy of the old SYN segment from Alice, which is wandering in the network, arrives at Bob's computer, initiating a SYN + ACK segment from Bob. Can this segment be mistaken by Alice's computer as the response to the new SYN segment? Explain.

Unlikely due to the sequence number of the SYN+ACK sent by Bob

Although new TCP implementations use the SACK option to report the out of order and duplicate range of bytes, explain how old implementations can indicate that the bytes in a received segment are out of order or duplicate.

Uses duplicate ACKs and sequence numbers to determine order

In SCTP, the following is a dump of a DATA chunk in hexadecimal format. 00000015 00000005 0003000A 00000000 48656C6C 6F000000 a. Is this an ordered or unordered chunk? b. Is this the first, the last, the middle, or the only fragment? c. How many bytes of padding are carried by the chunk? d. What is the TSN? e. What is the SI? f. What is the SSN? g. What is the message?

a.) 00000005 => 13th bit is 0 => ordered b.) 00000005 => 14th (B) and 15th (E) bits are 0 => middle c.) 00000015 = 21, not a multiple of 4, therefore needs 3 padding bytes d.) 00000005 = 5 => TSN = 5 e.) 0003 = 3 f.) 000A = 10 g.) 48656C6C

The following is a dump (contents) of a UDP header in hexadecimal format. 0045DF0000580000 a. What is the source port number? b. What is the destination port number? c. What is the total length of the user datagram? d. What is the length of the data? e. Is the packet directed from a client to a server or vice versa? f. What is the application-layer protocol? g. Has the sender calculated a checksum for this packet?

a.) 0045 = 69 b.) DF00 = 57088 c.) 0058 = 88 bytes d.) 88 bytes - 8 byte header = 80 bytes e.) Sending port is well known, therefore server to client f.) Port belongs to TFTP application program g.) Last 16 bits are 0 therefore no calculated checksum

The following is a dump of an SCTP general header in hexadecimal format. 04320017 00000001 00000000 a. What is the source port number? b. What is the destination port number? c. What is the value of the verification tag? d. What is the value of the checksum?

a.) 0432 = 1074 b.) 0017 = 23 c.) 00000001 = 1 d.) 00000000 = 0

In a TCP connection, the initial sequence number at the client site is 2171. The client opens the connection, sends three segments, the second of which carries 1000 bytes of data, and closes the connection. What is the value of the sequence number in each of the following segments sent by the client? a. The SYN segment b. The data segment c. The FIN segment

a.) 2171 b.) 2172 c.) 3172


Related study sets

EMT Ch. 30: Chest Injuries STUDY SET

View Set

FP.14: Function, Purpose, and Regulation of Financial Institutions

View Set

1.10.T - Lesson: Topic 7: Virginia and Slavery Review & Test

View Set

Identifying the 5 Branches in Chemistry

View Set

FIN 3403 Exam 4 (Extra Problems)

View Set