$30
CECS 474 - Homework 3
1. Problem Set (Chapter 3)
Problem 1: UDP and TCP use 1s complement for their checksums. Suppose you have two 8-bit bytes: 10110100, 01101110.
What is the 1s complement of the sum of these two 8-bit bytes?
Problem 2:
Note: Stop-and-go protocol = Alternate bit protocol = Stop-and-wait protocol
a) Suppose the Stop-and-go protocol is used with 840 byte data frames and 40 byte ack frames on a link with a 8 ms
propagation delay in each direction. In the absence of transmission errors, what are the throughput (in packets per second)
and efficiency if the link data rate is 1 kbps? 100 kbps? 10 Mbps? 1 Gbps?
b) You must have found the above protocol to be very inefficient over links with very high data rates. Let’s try replacing it
by a sliding window protocol. At 1 Gbps, what would the throughput and efficiency be if the window size is 10 packets?
100? 1000? 10,000? What is the ideal window size?
Problem 3:
Suppose that the UDP receiver computes the Internet checksum for the received UDP segment and finds that it matches the
value carried in the checksum field. Can the receiver be absolutely certain that no bit errors have occurred? Explain.
Problem 4: Assume that the propagation speed in a coaxial cable is
a) Packets are transmitted using the ABP (alternate bit protocol) over a full-duplex 5-km coaxial cable with a 10-Mbps
transmission rate. The packets and ACKs are 1500 bits long. The transmitter and receiver use a CRC chip and their
processing time is negligible. How many packets are transmitted every second when there is no transmission error?
b) Five transmission lines identical to the one discussed in a) are connected in series. A buffer is used at each connection
between the links to store packets as required. How many packets will go through the five lines every second when there
are no transmission errors? Now assume that a packet or its acknowledgement is corrupted on any given link with
probability p. What is the new packet transmission rate through the five links? Compare the rate when there are no errors
with the transmission rate when a single 25-km link is used and when there is no transmission error. Comment.
2
California State University Long Beach CECS 474 - Homework 3 Spring 2022
Problem 5:
Answer true or false to the following questions and briefly justify your answer:
a. With the SR protocol, it is possible for the sender to receive an ACK for a packet that falls outside of its current
window.
b. With GBN, it is possible for the sender to receive an ACK for a packet that falls outside of its current window.
c. The alternating-bit protocol is the same as the SR protocol with a sender and receiver window size of 1.
d. The alternating-bit protocol is the same as the GBN protocol with a sender and receiver window size of 1.
Problem 6:
We have said that an application may choose UDP for a transport protocol because UDP offers finer application
control (than TCP) of what data is sent in a segment and when.
a. Why does an application have more control of what data is sent in a segment?
b. Why does an application have more control on when the segment is sent?
Problem 7:
Consider transferring an enormous file of L bytes from Host A to Host B. Assume an MSS of 536 bytes.
a. What is the maximum value of L such that TCP sequence numbers are not exhausted? Recall that the TCP sequence
number field has 4 bytes.
b. For the L you obtain in (a), find how long it takes to transmit the file. Assume that a total of 66 bytes of transport, network,
and data-link header are added to each segment before the resulting packet is sent out over a 155 Mbps link. Ignore flow
control and congestion control so A can pump out the segments back to back and continuously.
Problem 8:
Consider sending a large file from a host to another over a TCP connection that has no loss.
a) Suppose TCP uses AIMD for its congestion control without slow start. Assuming CongWin (congestion window)
increases by 1 MSS every time a batch of ACKs is received and assuming approximately constant round-trip times, how
long does it take for CongWin to increase from 6 MSS to 12 MSS (assuming no loss events)?
b) What is the average throughout (in terms of MSS and RTT) for this connection up through time = 6 RTT?
California State University Long Beach CECS 474 - Homework 3 Spring 2022
3
2. Solution Submission and Deadline
You only need to submit the solutions to problems 2, 5, and 8 (which are marked through red text color) to BeachBoard.
Submission Deadline: April 24, 2022, 11:59 PM