CS 558 - Computer Networks
Homework 2

Due: See class webpage.

## Question 1.

Consider a modem connection with 50 kbps (50,000 bits/sec, I used 50 Kbps instead of 56 Kbps to simplify the calculations) between a house in Athens, GA and Emory. Suppose the distance between the house in Athens and the Emory campus is 200 Km (about 133 miles). The speed of light is 2x108 m/sec or 2x105 Km/sec.

The frame (or packet) size (including header and data) is 1000 Bytes (= 8000 bits). The ACK frame (or packet) is negligible (assume 0 bytes).

Answer the following questions for the case where a computer in this house is using the stop-and-wait protocol to download a large file from Emory:

• How many seconds does it take to complete transmitting 1000 bytes on a 50 kbps modem link (this is the Transmission time in the figure below) ? (5 pts)

• How many seconds does it take for signal to traverse from one end to the other end (this is the propagation delay in the figure below) ? (5 pts)

• What is the effective transfer data rate (in Kbps/sec) when there are no link errors ? (5 pts)

Notice that the effective transfer data rate will be less than 50 Kbps because stop-and-wait must wait for ACK before it can transmit another frame.

Hint:

The phases in the stop-and-wait protocol is as follows:
```    ---------------------------------------------------------------> Time
Transmission time
+-------------+
|             |
Start transmit   End transmit
|             |
|		|        Can't send until ACK is received....
Emory  V  1000 Bytes V					SENDER
--------+-------------+-----------------------------------------
^		^ 				   Last bit
|		|				   of frame
First		Last		      First	   arrives
bit of		bit of		      bit of	   AND ACK
frame		frame		      frame	   is sent
sent 				      arrives      immediately
|					|	      ^
V					V	      |
--------+-------------+-----------------------+-------------+--------
Propagation delay
House               |<----------------------------------->|
Propagation delay
```

Same question, now for a Cable modem connection where the data rate from Emory to the house is 3 Mbps. (15 pts)

• How many seconds does it take to complete transmitting 1000 bytes on a 3 Mbps Cable modem link (this is the Transmission time in the figure below) ? (5 pts)

• How many seconds does it take for signal to traverse from one end to the other end (this is the propagation delay in the figure below) ? (5 pts)

• What is the effective transfer data rate (in Kbps/sec) when there are no link errors ? (5 pts)

## Question 2.

Consider the situation discribed in Question 1. Suppose we use the Go-Back-N protocol in the transfer.

• If the connection is extremely reliable (no link errors), what receiver window size is most suitable ? (5 pts)

• If the connection is extremely reliable (no link errors) and the sequence number field in the frame is 8 bits. What is the maximum sender window size that you can use ? (5 pts)

• In Go-Back-N, is it useful to use a receiver window size that is larger than the sender window size ? (10 pts)

If it is useful, describe one scenario where it is beneficial to use a receiver window size that is larger than the sender window size.

If it is not useful, explain why not.

## Question 3.

Consider the situation discribed in Question 1. Suppose we use the Go-Back-N protocol in the transfer.

• Under error-free condition (no link errors), what is the smaller sender window size that sender must use that will allow the sender to transmit continuously (without becoming idle because it has to wait for ACKs from the receiver) when it is connection through a 50 Kbps modem connection ? (10 pts)

• Same question for the Cable modem connection. Under error-free condition (no link errors), what is the smaller sender window size that sender must use that will allow the sender to transmit continuously (without becoming idle because it has to wait for ACKs from the receiver) when it is connection through a 3 Mbps Cable Modem connection ? (10 pts)

## Question 4.

• Read Section 3.1.3 of Ethernet that explains the Ethernet's "capture effect" problem. (I marked the text in blue for your convenience).

• In the example given by this whitepaper, two nodes A and B have many packets to send and their first transmissions collide. After this initial collision, A selected 0 and B selected 1, and A is able to transmit its packet while B must wait.

Immediately after A's transmission, A attempts a new transmission while B attempts its re-transmission. Due to the 1-persistent CSMA/CD protocol, they will transmit simultaneously, resulting in another collision and back-off.

In this back-off, A will pick a random integer from (0, 1) while B will pick a random integer from (0, 1, 2, 3).

The paper states that "station A has a higher probability transmitting while station B waits again". In this question, we like to investigate this statement further...

Questions:

• What is the probabilty that A will transmit before B (i.e., A picks a smaller number than B): (10 pts)

• What is the probabilty that B will transmit before A: (10 pts)

• What is the probabilty that A and B will collide (i.e., A and B pick the same number): (10 pts)