Week 4: Reliable Transfer, TCP, and UDP
#Reliable Transfer
#Reliable Transfer 1
Assume the Selective Repeat protocol uses a window size of 10 packets at the sender side. What is the minimum number of unique sequence numbers necessary to prevent sequence number collisions?
#Reliable Transfer 2
Assume the Go-Back-N protocol uses a window size of 10 packets at the sender side. What is the minimum number of unique sequence numbers necessary to prevent sequence number collisions?
#Reliable Transfer 3
Assume we are using the Stop-and-Wait protocol. The link speed is 1000 bps, the packet size is 10 bits, and the one-way propagation delay is 45 ms. If there is no pipelining, calculate the sender’s utilization as a decimal between 0 and 1. Assume that the transmission delay for the ACK is negligible.
#UDP
#UDP 1
Which of the following are true about UDP?
- UDP can detect if packets are corrupted.
- UDP can detect if packets are dropped.
- UDP can detect if packets are out of order.
- UDP can detect if packets are duplicated.
Answer with a list, like 1,2,3.
#UDP 2
In UDP, which of the following are used by the destination host to determine which socket a segment should be directed to?
- Source IP address
- Source port number
- Destination IP address
- Destination port number
Answer with a list, like 1,2,3.
#TCP
#TCP 1
Which of the following are true about TCP?
- TCP can detect if packets are corrupted.
- TCP can detect if packets are dropped.
- TCP can detect if packets are out of order.
- TCP can detect if packets are duplicated.
Answer with a list, like 1,2,3.
#TCP 2
In TCP, which of the following are used by the destination host to determine which socket a segment should be directed to?
- Source IP address
- Source port number
- Destination IP address
- Destination port number
Answer with a list, like 1,2,3.
#TCP 3
When can the first TCP data segment start its transmission during the TCP 3-way handshake?
- Before the first message is sent
- Together with the first message
- Before the second message is received
- Together with the second message
- Together with the third message
- After the third message is sent
Answer with a number, like 1.
#TCP 4
The ACK number in TCP is:
- Next packet number expected
- Last packet number received
- Next byte expected
- Last byte received
Answer with a number, like 1.
#TCP 5
Fast retransmit occurs when:
- There are unusually large RTTs
- The segment’s timer expires
- 3 duplicate ACKs are received
- The window of the receiver is full
- None of the above
Answer with a number, like 1.
#TCP 6
Suppose host A has 8 data segments to send to host B over TCP, but on the initial transmission, the 5th segment (sent from A) is lost. No other packets (including ACKs) are lost. How many total data segments are sent to host B by host A? Assume the retransmission timer does not go off. We are using fast retransmit.
#TCP SEQ and ACK
Host A establishes a TCP connection with host B. Then, the following sequence of events happens:
- Host A sends B a segment with 500 bytes
- Host B sends host A a segment with 1000 bytes
- Host A sends host B a segment with 1000 bytes
- Host B sends host A a segment with 750 bytes
- Host A closes the connection with host B
- Host B closes the connection with host A
Host A randomly picks 521 for its initial sequence number. Host B randomly picks 672 for its initial sequence number.
#TCP SEQ and ACK 1
What are the SEQ and ACK numbers of the three TCP segments sent between A and B to setup the connection? Assume that there is no data sent in any of the three segments sent in the handshake.
Answer with a comma-separated list: seq1,ack1,seq2,ack2,seq3,ack3. If a segment does not have a SEQ or ACK number, use - for that field.
#TCP SEQ and ACK 2
For the first 4 steps listed above, write the SEQ and ACK numbers of each segment sent. Assume that after the handshake, ACKs are piggybacked with data and not sent in separate segments. Also assume that the first segment A sends to B still contains an ACK number and sets the ACK flag.
Answer with a comma-separated list: seq1,ack1,seq2,ack2,seq3,ack3,seq4,ack4. If a segment does not have a SEQ or ACK number, use - for that field.
#TCP SEQ and ACK 3
What are the SEQ and ACK numbers of each of the 4 segments sent when the hosts close connections on both ends? Note that now, we are not piggybacking host B’s ACK onto host B’s FIN to A—these two segments are sent separately. Assume that the ACK flag is not set for FIN segments (so there is no ACK number).
Answer with a comma-separated list: seq1,ack1,seq2,ack2,seq3,ack3,seq4,ack4. If a segment does not have a SEQ or ACK number, use - for that field.
#Checksum
#Checksum 1
Why does UDP include a pseudo header from the IP layer in its checksum calculation?
- To compress the UDP header size
- To verify that the packet was delivered to the correct IP address and protocol
- To allow UDP to perform its own routing
- To increase the speed of the calculation
Answer with a number, like 1.
#Checksum 2
Which of the following elements are included in the pseudo header when computing a UDP or TCP checksum?
- Source IP address
- Source port number
- Destination IP address
- Destination port number
- Protocol
- Length of pseudo header
- Length of segment
- Length of pseudo header and segment combined
- Checksum
Answer with a list, like 1,2,3.