12
Communication Networks Communication Networks Yet another rehearsal Yet another rehearsal TCP and friends TCP and friends

Communication Networks

Embed Size (px)

DESCRIPTION

Communication Networks. Yet another rehearsal TCP and friends. 42. 32. 26. 21. 8. 1. 1. 16. 17. 22. 23. 26. 6. Observe the diagram. 42. 32. 26. 21. 8. 1. 1. 16. 17. 22. 23. 26. 6. Answer the following. Identify Slow Start rounds. - PowerPoint PPT Presentation

Citation preview

Page 1: Communication Networks

Communication NetworksCommunication Networks

Yet another rehearsalYet another rehearsal

TCP and friendsTCP and friends

Page 2: Communication Networks

Netcomm 2005 2

Observe the diagramObserve the diagram

1 6 16 17 22 23 26

1

21

26

32

42

8

Page 3: Communication Networks

Netcomm 2005 3

Answer the followingAnswer the following

• Identify Slow Start rounds.Identify Slow Start rounds. • Identify Congestion Avoidance rounds.Identify Congestion Avoidance rounds. • At 16At 16thth round, is it timeout or triple duplicate ACK? round, is it timeout or triple duplicate ACK? • At 22At 22nd nd round, is it timeout or triple duplicate?round, is it timeout or triple duplicate? • What is the Slow Start Threshold at round 1?What is the Slow Start Threshold at round 1? • What is the Slow Start Threshold at round 24?What is the Slow Start Threshold at round 24? • If a packet loss is detected after the 26If a packet loss is detected after the 26thth round by the receipt of a triple round by the receipt of a triple

duplicate ACK, what will be the value of the congestion-window size?duplicate ACK, what will be the value of the congestion-window size?

1 6 16 17 22 23 261

21

2632

42

8

Page 4: Communication Networks

TCP VegasTCP Vegas

The following parameters are given for a The following parameters are given for a TCP Vegas connectionTCP Vegas connection

=50 KB/sec =50 KB/sec =75 KB/sec=75 KB/sec• RTT-Base=40 msecRTT-Base=40 msec• RTT is alwaysRTT is always 50 msec50 msec• Assuming packets are never lost:Assuming packets are never lost:• What is the minimal and maximal equilibrium What is the minimal and maximal equilibrium

windows?windows?• What will happen if RTT will increase to What will happen if RTT will increase to

100ms?100ms?4

Page 5: Communication Networks

Netcomm 2005 5

TCP Vegas - ReminderTCP Vegas - Reminder

• BaseRTT is the minimum of all measured RTTs (commonly the BaseRTT is the minimum of all measured RTTs (commonly the RTT of the first packet)RTT of the first packet)

• If not overflowing the connection, thenIf not overflowing the connection, then• ExpectRate = CongestionWindow/BaseRTTExpectRate = CongestionWindow/BaseRTT• Source calculates ActualRate once per RTTSource calculates ActualRate once per RTT• Source compares ActualRate with ExpectRateSource compares ActualRate with ExpectRate

– Diff = ExpectedRate - ActualRateDiff = ExpectedRate - ActualRate– if Diff < a if Diff < a – increase CongestionWindow linearlyincrease CongestionWindow linearly– else if Diff > belse if Diff > b– decrease CongestionWindow linearlydecrease CongestionWindow linearly– elseelse– leave CongestionWindow unchangedleave CongestionWindow unchanged

Page 6: Communication Networks

Netcomm 2005 6

Fall 2002/3Fall 2002/3

Give an example to a case where the Give an example to a case where the receiver of a TCP connection sends a receiver of a TCP connection sends a packet where the receiver window size packet where the receiver window size is zerois zero

Page 7: Communication Networks

Netcomm 2005 7

Zero WindowsZero Windows

• suppose the window size is reduced to zero: receiver suppose the window size is reduced to zero: receiver ACKs, and says it has a window size of zero, since all ACKs, and says it has a window size of zero, since all buffers are full buffers are full

• later the receiver reopens the window by sending a later the receiver reopens the window by sending a new ACK with a new window new ACK with a new window

• that ACK is lost! that ACK is lost! • deadlock: sender is waiting for window update, deadlock: sender is waiting for window update,

receiver is waiting for new data receiver is waiting for new data • a sender with data to send, and a zero send window, a sender with data to send, and a zero send window,

must periodically send one byte past the window, to must periodically send one byte past the window, to elicit an ack in response elicit an ack in response

Page 8: Communication Networks

Netcomm 2005 8

Fall 2002/3 cont.Fall 2002/3 cont.

During slow start, TCP sender increases During slow start, TCP sender increases window by 1 for every received ACK. window by 1 for every received ACK. Explain how the linear increment results Explain how the linear increment results in an exponential growth in transmission in an exponential growth in transmission raterate

Page 9: Communication Networks

Netcomm 2005 9

Fall 2002/3, cont.Fall 2002/3, cont.

When routers run distance vector protocol When routers run distance vector protocol for network routing, is it possible that a for network routing, is it possible that a packet will go through the same router packet will go through the same router more than once?more than once?

Page 10: Communication Networks

Netcomm 2005 10

Spring 2000-2001 BSpring 2000-2001 B

TCP connection uses flow control to pass a TCP connection uses flow control to pass a file with the following parametersfile with the following parameters

• file size is 51KBfile size is 51KB• receiver window is always 12KBreceiver window is always 12KB• congestion window is initially 1.5KB congestion window is initially 1.5KB • maximal segment size is 1.5KBmaximal segment size is 1.5KB• timout is 50mstimout is 50ms• ssthresh is 10KBssthresh is 10KB• RTT is always 30msRTT is always 30ms

Page 11: Communication Networks

Netcomm 2005 11

Spring 2001 B – cont.Spring 2001 B – cont.

• In every round, an entire window is sent, and In every round, an entire window is sent, and after RTT all ACKs arriveafter RTT all ACKs arrive

• fast retransmit is inactivefast retransmit is inactive• Packet 4 is lostPacket 4 is lostAssumptionsAssumptions• receiver does not accumulate packets not in receiver does not accumulate packets not in

orderorder • After timeout window is cut to half (with no After timeout window is cut to half (with no

slow start)slow start)

Page 12: Communication Networks

Netcomm 2005 12

Spring 2001 B - SolutionSpring 2001 B - Solution##roundround cwndcwnd sent bytessent bytes

11

22

33

44

55

66

77

88

99

1010

1.5KB 1.5KB (tot. 1.5)

3KB 3KB (tot. 4.5)

6KB 6KB (no ACKs!)

3KB (timeout) 3KB (tot. 7.5)

4.5KB 4.5KB (tot. 12)

6KB 6KB (tot. 18)

7.5KB 7.5KB (tot. 25.5)

9KB 9KB (tot. 34.5)

10.5KB 10.5KB (tot. 45)

12KB 6KB (tot. 51)