Week 5 Calculations
Week 5 Calculations
two numbers. Give answer in 8-bit binary, zero-padded to 8 bits if necessary, with no spaces (e.g. 00101000).
Please note this is different than the checksum calculation.
Compute the sum with carry-wraparound (sometimes called the one’s complement sum) of the following
two numbers. Give answer in 8-bit binary, zero-padded to 8 bits if necessary, with no spaces (e.g. 00101000).
Please note this is different than the checksum calculation.
1
10010110
10010000
100100110
1
00100111 Final answer
10010110
HostA has established a TCP connection with HostB in a remote network. HostA is sending packets to
HostB. Assume we have configured TCP, somehow, to ACK every segment (no ACKing every other
segment). Assume that the timeout is the same for all packets. HostB’s “window size” is 20000 bytes.
HostB has already received and acknowledged everything sent by HostA’s application up to and including
byte #3,692. HostA now sends segments of the same application data stream in order:
P: 488 bytes
Q: 312 bytes
R: 414 bytes
Suppose that segments P, Q, and R are received, but the acknowledgements for segments P and Q are
lost. If there are more segments waiting to be transmitted, what is the sequence number of the next
segment transmitted after the ACK for segment R is received?
Even though the acknowledgements of P and Q were lost, HostB still received those segments, so it will
be expecting the next segment after R.
P: 285 bytes
Q: 104 bytes
R: 262 bytes
Suppose segments P, Q, and R arrive at Host B in order. What is the acknowledgment number on the
segment sent in response to segment R?
Pay close attention to whether the question is asking for the sequence or the acknowledgment number!!!
The sequence number will be the first byte of the segment.
The acknowledgment number will be the byte number that is expected next, which means it is 1 byte above
the total bytes sent so far.
To get the acknowledgment number sent in response to segment R (since the segments arrived IN ORDER):
= (all bytes already received/ACKed) + (bytes of segment P) + (bytes of segment Q) + (bytes of segment R) + 1
= 4227 + 285 + 104 + 262 + 1
Extra info:
= 4,879
P sequence number:
4227 + 1 = 4,228
P acknowledgement number:
4227 + 285 + 1 = 4,513
Q sequence number:
4227 + 285 + 1 = 4,513
Q acknowledgement number:
4227 + 285 + 104 + 1 = 4,617
R sequence number:
4227 + 285 + 104 + 1 = 4,4617
HostA has established a TCP connection with HostB in a remote network. HostA is sending packets to
HostB. Assume we have configured TCP, somehow, to ACK every segment (no ACKing every other segment).
Assume that the timeout is the same for all packets. HostB’s “window size” is 20000 bytes. HostB has
already received and acknowledged everything sent by HostA’s application up to and including byte #1,769.
HostA now sends segments of the same application data stream in order:
P: 408 bytes
Q: 337 bytes
R: 481 bytes
Suppose the segments arrive at Host B in the order Q, P, and R. What is the acknowledgment number on
the segment sent in response to segment Q?
The segments arrived out of order, so Host B is still expecting to receive segment P. The acknowledgment
number will be the sequence number of P, which is 1 byte above everything that has been acknowledged
and received so far:
1,769 + 1 = 1,770
HostA has established a TCP connection with HostB in a remote network. HostA is sending packets to HostB.
Assume we have configured TCP, somehow, to ACK every segment (no ACKing every other segment).
Assume that the timeout is the same for all packets. HostB’s “window size” is 20000 bytes. HostB has
already received and acknowledged everything sent by HostA’s application up to and including byte #1,065.
HostA now sends segments of the same application data stream in order:
P: 318 bytes
Q: 340 bytes
R: 102 bytes
Suppose that packet P is lost, but packets Q and R are received. What is the acknowledgement number in
the ACK for packet R.
1,065 + 1 = 1,066
Assume a TCP sender is continuously sending 1,301-byte segments. If a TCP receiver advertises a window
size of 5,460 bytes, and with a link transmission rate 24 Mbps an end-to-end propagation delay of 15.2
ms, what is the utilization? Assume no errors, no processing or queueing delay, and ACKs transmit
instantly. Also assume the sender will not transmit a non-full segment. Give answer in percentages,
rounded to one decimal place, without units (e.g. for an answer of 10.43% you would enter "10.4"
without the quotes).
• Notes:
- multiplying by 1000 above converts seconds to milliseconds
- multiplying by 100 above converts from a decimal to percentage form
- PAY ATTENTION TO THE UNITS GIVEN – your conversion may need to be slightly different
10,408
4 * * 1000
24,000,000
* 100 = 5.6
10,408
* 1000 + 15.2 * 2
24,000,000
Server X is running Diablo II services on port #4000. Client A is running an application that uses port #450
to request an Diablo II TCP connection to Server X. Client B is running an application that uses port #455 to
request an Diablo II TCP connection to Server X.
IP addresses:
•Server X: 152.111.20.36
•Client A: 113.13.131.10
•Client B: 114.192.111.23
Client B starts a second application (running at the same time as the first application) that uses the next
incremental port number to request an Diablo II TCP connection to Server X. The connection created for
Client B is identified by the sockets at the endpoints as follows: