Answer of the HW

10
Answer of the HW Chapter 3

description

Answer of the HW. Chapter 3. Answer of the HW. P 287 3 checksum check sum 11101101 - PowerPoint PPT Presentation

Transcript of Answer of the HW

Page 1: Answer of the HW

Answer of the HW

Chapter 3

Page 2: Answer of the HW

Answer of the HW• P 287 3 checksum

• check sum 11101101• To detect errors, the receiver adds the four words (the three original words

and the checksum). If the sum contains a zero, the receiver knows there has been an error. All one-bit errors will be detected, but two-bit errors can be undetected (e.g., if the last digit of the first word is converted to a 0 and the last digit of the second word is converted to a 1). can detect 1-bit error

10100011

00001110

10101010

01001000

00110010

10100011

Page 3: Answer of the HW

Answer of the HW

• P289 16– GBN

• 每个分组携带 SN ; 采用累积确认机制;收方丢弃乱序到达分组

– a. [k-3,k-2,k-1,k,k+1,k+2]• 当 Sender 发送的三个分组均到达 Receiver, Receiver 发送了

ACK ,但 3 个 ACK 没有到达 Sender 。此时, Sender 窗口中等待确认的分组序号 k-1,k-2,k-3 ;

• 当 Sender 收到了 Receiver 对前面所发送分组 (<=k-1) 的确认,则 Sender 窗口中等待确热的分组序号可为 k,k+1,k+2

– b. [k-3,k-2,k-1]

Page 4: Answer of the HW

Answer of the HW• P290 20

– There are232 =4,294,967,296 possible sequence numbers.

– a. The sequence number does not increment by 1 with each segment. Rather, is increments by the number of bytes of data sent.

• The size of the MSS that can be sent from A to B is simply the number of bytes representable by 232bytes.

– b. The number of segments is . 66 bytes of header get added to each segment giving a total of 194,156,094 bytes of header. The total number of bits transmitted is : (232+194,156,094)*8=3591X107

• Thus it would take 3,591 seconds = 59 minutes to transmit the file over a 10~Mbps link.

759,941,21460

232

Page 5: Answer of the HW

Answer of the HW

• P290 21• a)

1)1( SampleRTTTTEstimatedR

21)2( )1( SampleRTTSampleRTTTTEstimatedR

1)3( SampleRTTTTEstimatedR

])1()[1( 32 SampleRTTSampleRTT

21 )1( SampleRTTSampleRTT

32)1( SampleRTT

)3(1

)4( )1( TTEstimatedRSampleRTTTTEstimatedR

21 )1( SampleRTTSampleRTT

43

32 )1()1( SampleRTTSampleRTT

Page 6: Answer of the HW

Answer of the HW

• P290 21– b)

– c)

• The weight given to past samples decays exponentially.

j

n

j

jn SampleRTTTTEstimatedR

1

1

)( )1( nn SampleRTTx)1(

1

)( )1(1 j

jj SampleRTTTTEstimatedR

1

9.09

1

jj

j SampleRTT

Page 7: Answer of the HW

Answer of the HW

P291 27a) TCP slow-start is operating in the intervals [1,6] and [23,26].

b) TCP congestion avoidance is operating in the intervals [6,16] and [17,22].

c) Packet loss is recognized by a triple duplicate ACK. If there was a timeout, the congestion window size would have dropped to 1.

d) After the 22nd transmission round, segment loss is detected due to timeout, and hence the congestion window size is set to 1.

e) The threshold is initially 32, since it is at this window size that slow-start stops and congestion avoidance begins.

f) The threshold is set to half the value of the congestion window when packet loss is detected. When loss is detected during transmission round 16, the congestion windows size is 42. Hence the threshold is 21 during the 18th transmission round.

Page 8: Answer of the HW

Answer of the HW

P291 27g) The threshold is set to half the value of the congestion window when

packet loss is detected. When loss is detected during transmission round 22, the congestion windows size is 26. Hence the threshold is 13 during the 24th transmission round.

h) During the 1st transmission round, packet 1 is sent; packet 2-3 are sent in the 2nd transmission round; packets 4-7 are sent in the 3rd transmission round; packets 8-15 are sent in the 4th transmission round; packets15-31 are sent in the 5th transmission round; packets 32-63 are sent in the 6th transmission round; packets 64 – 96 are sent in the 7th transmission round. Thus packet 70 is sent in the 7th transmission round.

i) The congestion window and threshold will be set to half the current value of the congestion window (8) when the loss occurred. Thus the new values of the threshold and window will be 4.

Page 9: Answer of the HW

Answer of the HW

• P293 34

• The minimum latency is

2RTT+O/R when:

RS

RSRTTW

RSRTTR

SW

/

/

/*

RS

RSRTTwwW

/

/:min

1/

RS

RTT

R min latency W

28 Kbps 28.77 sec 2

100 Kbps 8.2 sec 4

1 Mbps 1 sec 25

10 Mbps 0.28 sec 235

Page 10: Answer of the HW

Answer of the HW

P293 37a) T

b) T

c) F

d) F