[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] udp agent bug ? and patch



I would like to catch this occasion to raise another problem related to UDP
protocol and packet size.

In http://www.isi.edu/nsnam/ns/doc/node299.html is written:

Agent/UDP set packetSize_   1000              # max segment size;

1. about UDP protocol there is no concept of MSS (Maximum Segment Size).
   MSS is related to a TCP segment that is byte-oriented. A data flow is
sent through segments and reliability mechanisms are provided.

2. UDP packet is called Datagram. UDP provide a not reliable service.
   Reassembly of fragmented application data can not be managed at the
receiver because no sequence number are provided in the UDP level.

3. packetSize_ is directly mapped to the size_ variable in the common
header. This means packetSize_ represents the IP packet size (header+body).

The implemented application data fragmentation can drive to conceptual
simulation mistakes.

For instance let us consider a CBR traffic generator with a set packet size
of 1001 bytes. This traffic generator is attached to a UDP agent with a
default packet size of 1000 bytes.
For each CBR packet in the trace file you'll notice two ip packets: the
first with a 1000 bytes IP packet size and the second with 1 byte (!) IP
packet size.


My question is: which is the need of application data fragmentation in the
UDP agent?

If, for some reason, it is needed I would suggest to decouple packetSize_ in
headersSize_ (20 IP + 8 UDP) and datagramSize_.
The application packet size should be mapped in datagramSize_.
The headerSize_ + datagramSize_ should be mapped to size_ in common header.

Aonther solution could be to take away fragmentation from the UDP agent and
to remember the traffic agent packet size is related to the IP packet.


Please, give your comments.


Regards,

	Sergio