## jeffdude87

4215/5431 Lab: Investigating the effect of wireless links on TCP

In this assignment we will investigate the effect of wireless losses on TCP.
For this purpose we will simulate a very simple network with 3 links. Let the
links be AB, CB and DB. Of these DB is a wireless link and the other two edges
represent wired connections. For simplicity, let us abstract away rates and
propagation delays and assume that each link can carry one packet per time step.

Write a simulator for this network in Java or C/C++. For the wired links implement
a simplified TCP. We will ignore the flow control aspect and only implement the
congestion control algorithm with Slow Start (Sec 9.1.2). Assume that the congestion threshold
starts at default value 100. Assume that a session with 10000 packets starts
at t = 0 at node A and one more starts at t=100 at node C. The destination for both
sessions is node D. All these packets get queued up at node B and then get transmitted

Wireless TCP: The wireless link does TCP without congestion control, so a
fixed congestion window of W=10 is used. This window remains unchanged.

Loss model: Assume that there are no packet losses in the wired links. You will
simulate two loss models. The first model simply drops each packet with probability
0.1. The second model is a Markov Chain with two states H,L (This simulates fading)
that represent the wireless channel. In state H packets are lost with probability
0.2 and in L the corresponding probability is 0.05. Try to find the transition
probabilities that will yield an average packet loss of 10%. If you have trouble, ask
in class.

Part (a)

In this part we will do normal TCP over all links. So node B is a normal router
that only forwards packets. D ACK's packets to the source (A or C). On the wireless
link packets are lost using the loss models described above.

For each model, report

(a) the total time needed for all packets to reach the destination
(b) the maximum number of packets queued at any time in node B.

Part (b)

In this case we simulate an instance of the "Indirect TCP" algorithm in Ch 9. So
the wireless and wired links are separated. ACKs are used for all links. Unlike
traditional TCP where D would generate ACK's to A and C, here B ACK's A and C and
D ACK's B. Simulate the same traffic as before and report the same quantities.

Submit your code and results. Write a few lines interpreting the results.

Notes:

1. Remember to implement Slow Start
2. If you need to, brush up the basic additive-increase-multiplicative-decrease strategy
used in TCP.
3. You can implement fast retransmit, but you do not have to.
4. You need to implement a TCP timer. You can assume for simplicity that the timer is always initialized at 10, and there is no adaptation of this value, unlike real TCP.