UDP applications on nodes

76 views
Skip to first unread message

Volker Beutner

unread,
May 14, 2020, 11:17:12 AM5/14/20
to ns-3-users
Hi all,

(First post hurray).

I am trying to define some UDP applications on nodes in my simulation. I am struggling a bit to understand the difference between OnOffApplication and the UdpClient/Server applications. 

As I am quite new to this whole network modeling in general, unfortunately, I lack the experience (and probably also the technical in depth knowledge) to understand which applications to use. I have tried digging through the documentation and also coded through some scenarios myself, but the answer is still not obvious to me.

Any help appreciated!

Br,
Volker

Sagar Patel

unread,
May 16, 2020, 9:33:29 PM5/16/20
to ns-3-users
As far as I can tell, OnOffApplication is used to simulate traffic represented by a Poisson distribution whereas the UdpClient/Server is a simpler model. To make that a bit more concrete, let's look at examples.

UdpClient/Server
You can set MaxPackets, Interval, and more Attributes of a UdpClient. Essentially, you can simulate sending some number of packets in some amount of time with some interval between the sending of these packets. For example, you can transmit a total of 10 packets with 1 second between each packet transmission. Then, after transmitting the 10 packets, the UdpClientApplication transmits no more packets.

OnOffApplication
You can set a DataRate, OnTime, OffTime, and more Attributes of an OnOffApplication. With this type of Application, packets are transmitted for OnTime time units, and then nothing is transmitted for OffTime time units. Then, packets are again transmitted for OnTime time units, and the cycle continues. During OnTime, packets are transmitted at DataRate rate. For example, you can transmit at 1 Mbps for 10 seconds, and then not transmit at all for 5 seconds, then transmit at 1 Mbps for 10 seconds, and the cycle continues.
Reply all
Reply to author
Forward
0 new messages