Sunteți pe pagina 1din 4

TCP

Sl.No

Example of TCP segment lost, SACK and retransmission.


Station A
------>

<-----

Seq No. Ack No. Len

Seq No. Ack No. Length

1 (SYN)0

TSVal

SACK sent

Tsecr

3891750

Station B
TSVal

Tsecr

(SYN)0

3892717

1200091864

19

3892717

1200091864

1200091864

3891750

Connection
setup
st A sends 19Bytes

20

1200092830

3892717

20

1448

1200092831

3892717 st B sends 1448 Bytes

1449

20

1448

1200092831

3892717 st B sends 1448 Bytes

20

1449

3893940

20

2897

3893946

ACK rcvd
ACK rcvd

1200092831

10
11

20

4345

3894990

20

5793

3895007

20

20

7241

3895032

1200094058

20

8689

3895044

1200094058

20

3896109

4345

20

1448

1200094051

3893940 st B sends 1448 Bytes

5793

20

1448

1200094058

3893946 st B sends 1448 Bytes

ACK rcvd
7241

20

1448

1200094058

3893946 st B sends 1448 Bytes

8689

20

1448

1200095103

3894990 st B sends 1448 Bytes

10137

20

1448

1200095103

3894990 st B sends 1448 Bytes

ACK rcvd
ACK rcvd

1200095103

SKIPED entries

|
33

10137

1200094051

ACK rcvd

18
19

1448

1200094051

16
17

20

ACK rcvd

14
15

2897

Tsechr-also indicates
the use of wndows, as
it uses last received
3893940 st B sends 1448 Bytes packetTSval

1200094051

12
13

20

20373

|
0

3896273

ACK send

1200092831

8
9

SYN+ACK send
ACK received

5
7

SYN received

1200096161

34

20373

20

1448

21721

20

1448

23169

20

1448

1200096223

ACK rcvd

3896109 st B sends 1448 Bytes


st B sends 1448 Bytes

35

20

21721

3897316

1200096223

X---<<

36
37

20

21721

3897332

1200096223

ACK rcvd with


sack data
26617

20

21721

3897333

1200096223

ACK rcvd

3896133 st B sends 1448 Bytes

23169-24617

38
39

packet lost
1200096246

20 456(Push)

23169-25073

1200096246

3896133 st B sends 456 Bytes

ACK rcvd

rb 1/4

TCP
40
41

20

21721

3897343

1200096223

25073

20

1448

1200096264

3896151 st B sends 1448 Bytes

26521

20

1448

1200096264

3896151 st B sends 1448 Bytes

27969

20

1448

29417

20

1448

1200096276

3896163 st B sends 1448 Bytes

30865

20

1448

1200096328

3896215 st B sends 1448 Bytes

32313

20

1448

1200096328

3896215 st B sends 1448 Bytes

33761

20

1448

23169-26521

ACK rcvd

42

st B sends 1448 Bytes

43

20

21721

3897359

1200096223

23169-27969

X---<<

44
45

20

21721

3897372

1200096223

29417-30865;
23169-27969

20

21721

3897478

1200096223

29417-32313;
23169-27969

ACK rcvd

48
49

20

21721

3897490

1200096223

29417-33761;
23169-27969

ACK rcvd

50
51

20

21721

3897530

29417-35209;
1200096223 23169-27969

3897539

29417-36657;
1200096223 23169-27969

20

21721

1200096342

3896229 st B sends 1448 Bytes

ACK rcvd

52
53

ACK rcvd

ACK rcvd

46
47

packet lost

35209

20

1448

36657

20

1448

1200096342

3896229 st B sends 1448 Bytes


st B sends 1448 Bytes

X---<<

packet lost

ACK rcvd

st B sends 1448 Bytes

54

X---<<

55
56

20

21721

3897610

39553-41001;
29417-36657;
1200096223 23169-27969

58

20

21721

3898384

20

1448

39553

20

1448

41001

20

1448

packet lost
1200096386

3896273 st B sends 1448 Bytes


st B sends 1448 Bytes

X---<<

57
41898-43346;
39553-41001;
1200096223 29417-36657

38105

packet lost

ACK rcvd

41898
20
1448 1200097429 3897316 st B sends 1448 Bytes
At most three sack entries possible. when fourth segment lost, recent three entries are reported
*

ACK rcvd

59

43346

20

1448

47690

20 764(Push,FIN)

1200097429

3897316 st B sends 1448 Bytes

1200097451

3897333

|
60

61

62
63
64

20

21721

3898438

41898-47690;
39553-41001;
1200096223 29417-36657

ACK rcvd

rb 2/4

close request by B

TCP

65

20

21721

3898440

41898-48455;
39553-41001;
1200096223 29417-36657

ACK rcvd

66
67

21721
20

27969

3898472

36657

3898495

38105

3898627

retransmission

20

1448

Timeout for 279691200097491

3897372

retransmission
ACK rcvd

36657
20

3897343

41898-48455;
1200097491 39553-41001

70
71

1200097457

ACK rcvd
27969

20

20 1448(push)

41898-48455;
39553-41001;
1200097457 29417-36657

68
69

Timeout for 21721-

20

1448

Timeout for 366571200097723

3897610

retransmission

41898-48455;
1200097723 39553-41001

ACK rcvd
Timeout for 38105-

72
73

38105
20

41001

3899568

1200098502

20 1448(push)

1200098502

3898384

retransmission

41898-48455

ACK rcvd
Timeout for 41001-

74

41001

75

20

48455

76

20

48455 (FIN)0

3899605

1200098521

3899605

1200098521

20 897(push)

1200098521

3898406

retransmission
half close at B

77

48455

21

1200099731

ACK rcvd(of FIN)

close request by A
FIN Acked
3899605 Close at A

wait for 2MSL at B

station A will not send

Time stamp option (10B) limits the SACK to 3 data sets.


All above transitions except 1st, carries ACK flag, other flags are marked
Time stamp in segment gives idea about order of arrival at /transmitted by local TCP process
TSecr is time stamp of last in order received segment's Tsval
Directions are indicative. It doesn't necessarily mean packets reached and processed at other end. It is also not in order of sent
and received packet.
Note carefully TSval and Tserc (marked with different colours)
Another example of retransmission without SACK. The order of processing the segments are as per respective time stamp
Station A
Seq No. Ack No. Len

TSVal

Tsecr

20

44889

3978884

1200178064

20

44889

3979887

1200178064

20

44889

3985675

1200184844

------>

<-----

SACK

Seq No. Ack No. Length


X---<<

Station B
TSVal

44889

20

1448

46337

20

1448

rb 3/4

Tsecr

packet lost

1200179025

3978877

TCP
44889
20

47785

3992675

20

1200184844

rb 4/4

1448

1200184844

3978877 Timeout Retransmit