Using the Information from the Recorders

 

At the end of this document  is an example of a successful UDP echo client communicating with the UDP echo server.  In this example, the client sent 100 messages (packets) to the server. The table below has two columns.  The left column contains output from the UDPserver recorder log and the right column contains output from the client recorder log.

 

When you print a client or server log file, you will get output identical to the output on the left (server) or right (client).  Let's look at the output and explain what each section of the logs mean.

 

The first line in either log identifies the type of log (server or client) and identifies the "user".  For a server log, the name will be UDPserver-1.0.  For a client log, the name will be a composite of your name and student Id.

 

The next section of the log contains the cumulative statistics for the session under the heading "******** Packet Statistics ********".  These are the numbers that you have to "get right".  I'll describe each of the numbers here and define what I mean by "get right".

 

minimum packet time

For the server, this is the smallest interval between packets that you sent.  Since you are supposed to send a packet every 500 msec, this value should be close to 500 msec (> 400 msec).

For the client, this value represents the minimum round trip time (rtt) reported by you when you executed the clientRecorder.close() method.

 

maximum packet time

For the server, this is the largest interval between packets that you sent.  Since you are supposed to send a packet every 500 msec, this value should be close to 500 msec (< 600 msec).

For the client, this value represents the maximum round trip time (rtt) reported by you when you executed the clientRecorder.close() method.

 

average packet time

For the server, this is the average interval between packets that you sent.  Since you are supposed to send a packet every 500 msec, this value should be close to 500 msec (± 50).

For the client, this value represents the average round trip time (rtt) reported by you when you executed the clientRecorder.close() method.  In this example, the client reported what is probably a correct value (184 msec).  Note that this is the average of the rtt for OK and REORDER packets (all other packets are excluded from the average).

 

Packets Received

For the server, this is the total number of packets received from you.  In this session, my client sent 100 packets.  For the client recorder statistic, this number is a total of ALL of the packets that you actually received from the server.  This value is calculated as the sum of OK + REORDER + CORRUPT + DUPLICATE packets.  In this example, the client statistics show that 93 packets were received (80 + 5 + 4 + 4).  We can corroborate this number (93) because we know that the client sent 100 and that the server says that 11 were dropped and that 4 were duplicated.  So, 100 – 11 + 4 = 93.  So client and server agree!

 

 

Packets Echoed OK

For the server, this value represents the number of packets that the server sent in order, without corruption.  For a client, it represents the same value.  These numbers should be equal for your program to be correct.

 

 

Packets Dropped

For the server, this number represents the number of packets that it dropped. When the server drops a packet, nothing else happens with that packet.  It will not be corrupted or duplicated.

For the client, this value will most likely be equal to the sum of the server dropped value and the server corrupted value.  In this example, the server actually dropped 11 packets.  The client timed out waiting for these 11 packets and recorded them as dropped packets.  The server also sent 4 corrupt packets.  Since the client cannot match these 4 packets up with the 4 packets it sent, the client will time out waiting for a correct copy of these 4 packets, and record those 4 packets as dropped.  So in this example, the client indicates that 15 packets were dropped.

 

When we grade your project, we will accept one of two values here:

 

(1)     the sum of the server dropped and server corrupt counts

      or

(2)     the exact same value as the server dropped count

 

No other value will be considered correct.

 

 

Packets Reordered

For the server, this value represents the number of packets it sent to the client out of order.

For the client, this value represents the number of packets that the client detected as out of order.  These two values must be equal for your program to be correct.

 

 

Packets Corrupted

For the server, this value represents the number of corrupted packets it sent to the client.

For the client, this value represents the number of packets that the client detected as corrupted.  These two values must be equal for your program to be correct.

 

 

Packets Duplicated

For the server, this value represents the number of duplicate packets it sent to the client.

For the client, this value represents the number of packets that the client detected as duplicated.  These two values must be equal for your program to be correct.

 

 

The next section (************ Packet History **********) in the server and the client recorder logs is a packet trace.

 

The server trace shows what the server did with each packet, and the server’s “guess” as to what the rtt should be for this packet.  The “guess” is not so much of a guess, because the server creates a bounded random delay for each packet before it returns the packet to the client.  We will use the server’s guesses to check whether your rtt calculations are correct.

 

In this example, notice that the first packet that the server received was echoed OK, then the second packet that the server received it dropped.  Then the server echoed the next 5 packets (3 – 7) correctly.  Notice the gap between packet(7) and packet(9).  This means that the missing packet(8) will be sent later (as an out of order packet).  If you look just after packet(13), you see packet(8) was sent.

 

You can use the server trace to see what the server did, and how your program  handled it.

 

Let’s look at the client trace now.

 

The client says that packets 1, 3, 4, 5, 6, 7, 9, 10, 11 were received OK (in order). Notice that eventually, the client recorded that packet(2) was dropped (it timed out somewhere after receiving packet(11) but before packet(13).  This agrees with the server (server does indeed show that it dropped packet(2)).

 

Now look at the client log and notice that the client receives packet(8) after packet(13). So the client records that packet(8) is out of order, and this too agrees with the server trace.

 

Notice also that the times printed for the client are the client’s calculation of rtt for the packet.  Notice that these values are very close (within a few milliseconds) of the server’s “guess”.  You should use this information to help you debug your program.

 

 

Table of Server and Client Recorder Logs

 

SERVER Record from: UDPserver 1.0

CLIENT Record from: Conron 123456789

******** Packet Statistics ********

******** Packet Statistics ********

minimum packet time = 491

minimum packet time = 10

maximum packet time = 501

maximum packet time = 2784

average packet time = 500

average packet time = 184

Packets Recieved:   100

Packets Recieved:   93

Packets Echoed OK:  80

Packets Echoed OK:  80

Packets Dropped:    11

Packets Dropped:    15

Packets Re-Ordered: 5

Packets Re-Ordered: 5

Packets Corrupted:  4

Packets Corrupted:  4

Packets Duplicated: 4

Packets Duplicated: 4

 

 

************ Packet History **********

************ Packet History **********

Pkt(1) OK        time: 62

Pkt(1) OK        time: 70

Pkt(2) DROPPED

Pkt(3) OK        time: 20

Pkt(3) OK        time: 26

Pkt(4) OK        time: 20

Pkt(4) OK        time: 26

Pkt(5) OK        time: 20

Pkt(5) OK        time: 26

Pkt(6) OK        time: 40

Pkt(6) OK        time: 45

Pkt(7) OK        time: 91

Pkt(7) OK        time: 89

Pkt(9) OK        time: 10

Pkt(9) OK        time: 14

Pkt(10) OK        time: 50

Pkt(10) OK        time: 56

Pkt(11) OK        time: 90

Pkt(11) OK        time: 88

Pkt(2) DROPPED

Pkt(12) DROPPED

Pkt(13) OK        time: 70

Pkt(13) OK        time: 74

Pkt(8) REORDER   time: 2784

Pkt(8) REORDER   time: 2783

Pkt(14) OK        time: 40

Pkt(14) OK        time: 38

Pkt(15) OK        time: 80

Pkt(15) OK        time: 86

Pkt(0) CORRUPT

Pkt(16) CORRUPT

Pkt(17) OK        time: 40

Pkt(17) OK        time: 42

Pkt(14) DUPLICATE time: 1622

Pkt(14) DUPLICATE time: 1587

Pkt(18) OK        time: 81

Pkt(18) OK        time: 81

Pkt(20) OK        time: 80

Pkt(19) DROPPED

Pkt(21) OK        time: 40

Pkt(20) OK        time: 84

Pkt(12) DROPPED

Pkt(21) OK        time: 40

Pkt(23) OK        time: 60

Pkt(22) DROPPED

Pkt(24) OK        time: 20

Pkt(23) OK        time: 60

Pkt(25) OK        time: 71

Pkt(24) OK        time: 23

Pkt(26) OK        time: 0

Pkt(25) OK        time: 74

Pkt(16) DROPPED

Pkt(26) OK        time: 5

Pkt(27) OK        time: 20

Pkt(27) OK        time: 25

Pkt(28) OK        time: 70

Pkt(28) OK        time: 71

Pkt(29) OK        time: 50

Pkt(29) OK        time: 51

Pkt(24) DUPLICATE time: 2714

Pkt(24) DUPLICATE time: 2690

Pkt(19) DROPPED

Pkt(31) OK        time: 48

Pkt(31) OK        time: 50

Pkt(32) OK        time: 73

Pkt(32) OK        time: 71

Pkt(33) OK        time: 71

Pkt(22) DROPPED

Pkt(30) REORDER   time: 2108

Pkt(33) OK        time: 70

Pkt(35) OK        time: 37

Pkt(30) REORDER   time: 2103

Pkt(36) OK        time: 11

Pkt(35) OK        time: 30

Pkt(37) DROPPED

Pkt(36) OK        time: 10

Pkt(38) CORRUPT

Pkt(0) CORRUPT

Pkt(34) REORDER   time: 2375

Pkt(34) REORDER   time: 2373

Pkt(39) CORRUPT

Pkt(0) CORRUPT

Pkt(40) OK        time: 38

Pkt(40) OK        time: 30

Pkt(41) OK        time: 78

Pkt(41) OK        time: 70

Pkt(42) OK        time: 33

Pkt(42) OK        time: 30

Pkt(43) OK        time: 71

Pkt(43) OK        time: 71

Pkt(44) DROPPED

Pkt(45) OK        time: 40

Pkt(45) OK        time: 46

Pkt(46) OK        time: 50

Pkt(46) OK        time: 59

Pkt(47) OK        time: 90

Pkt(47) OK        time: 95

Pkt(37) DROPPED

Pkt(48) OK        time: 50

Pkt(48) OK        time: 50

Pkt(49) DROPPED

Pkt(38) DROPPED

Pkt(50) OK        time: 13

Pkt(39) DROPPED

Pkt(51) OK        time: 94

Pkt(50) OK        time: 10

Pkt(52) OK        time: 97

Pkt(51) OK        time: 90

Pkt(53) OK        time: 90

Pkt(52) OK        time: 100

Pkt(54) OK        time: 16

Pkt(53) OK        time: 100

Pkt(55) OK        time: 60

Pkt(54) OK        time: 20

Pkt(56) OK        time: 17

Pkt(44) DROPPED

Pkt(57) DROPPED

Pkt(55) OK        time: 60

Pkt(52) DUPLICATE time: 2422

Pkt(56) OK        time: 20

Pkt(58) OK        time: 74

Pkt(52) DUPLICATE time: 2524

Pkt(60) OK        time: 88

Pkt(58) OK        time: 80

Pkt(61) OK        time: 5

Pkt(49) DROPPED

Pkt(62) OK        time: 75

Pkt(60) OK        time: 90

Pkt(63) OK        time: 83

Pkt(61) OK        time: 10

Pkt(59) REORDER   time: 2308

Pkt(62) OK        time: 80

Pkt(64) OK        time: 62

Pkt(63) OK        time: 90

Pkt(65) OK        time: 87

Pkt(59) REORDER   time: 2313

Pkt(66) OK        time: 74

Pkt(64) OK        time: 70

Pkt(67) DROPPED

Pkt(65) OK        time: 90

Pkt(68) OK        time: 36

Pkt(66) OK        time: 80

Pkt(69) DROPPED

Pkt(57) DROPPED

Pkt(70) OK        time: 7

Pkt(68) OK        time: 40

Pkt(71) OK        time: 81

Pkt(70) OK        time: 10

Pkt(72) OK        time: 83

Pkt(71) OK        time: 80

Pkt(73) OK        time: 89

Pkt(72) OK        time: 90

Pkt(74) OK        time: 43

Pkt(73) OK        time: 90

Pkt(75) OK        time: 22

Pkt(74) OK        time: 50

Pkt(76) OK        time: 40

Pkt(75) OK        time: 20

Pkt(77) OK        time: 86

Pkt(76) OK        time: 40

Pkt(78) OK        time: 19

Pkt(77) OK        time: 90

Pkt(79) CORRUPT

Pkt(67) DROPPED

Pkt(80) OK        time: 76

Pkt(78) OK        time: 20

Pkt(76) DUPLICATE time: 2214

Pkt(0) CORRUPT

Pkt(81) OK        time: 92

Pkt(69) DROPPED

Pkt(82) OK        time: 97

Pkt(80) OK        time: 80

Pkt(83) OK        time: 53

Pkt(76) DUPLICATE time: 2253

Pkt(85) OK        time: 7

Pkt(81) OK        time: 90

Pkt(86) OK        time: 14

Pkt(82) OK        time: 101

Pkt(87) OK        time: 69

Pkt(83) OK        time: 50

Pkt(84) REORDER   time: 1858

Pkt(85) OK        time: 10

Pkt(88) OK        time: 27

Pkt(86) OK        time: 10

Pkt(89) OK        time: 94

Pkt(87) OK        time: 70

Pkt(90) OK        time: 52

Pkt(84) REORDER   time: 1863

Pkt(91) OK        time: 33

Pkt(88) OK        time: 30

Pkt(92) OK        time: 33

Pkt(89) OK        time: 90

Pkt(93) OK        time: 51

Pkt(79) DROPPED

Pkt(94) OK        time: 30

Pkt(90) OK        time: 50

Pkt(95) OK        time: 84

Pkt(91) OK        time: 30

Pkt(96) OK        time: 67

Pkt(92) OK        time: 30

Pkt(97) DROPPED

Pkt(93) OK        time: 50

Pkt(98) OK        time: 45

Pkt(94) OK        time: 30

Pkt(99) OK        time: 8

Pkt(95) OK        time: 80

Pkt(100) OK        time: 28

Pkt(96) OK        time: 70