onoff application with DHCP

22 views
Skip to first unread message

Maxxx 均

unread,
Dec 12, 2017, 3:06:50 AM12/12/17
to ns-3-users
Hello everyone,

I am using onoff application with DHCP IPv4 address.
DHCP application can work, but when I using the onoff application, the throughput is always 0.
I believe there is something wrong with the address value I used.

OnOffHelper onoff ("ns3::TcpSocketFactory", Ipv4Address::GetAny ());

What code should I replace " Ipv4Address::GetAny () " ?

My topology is only with two nodes, 1 AP device and 1 station device.
I install the DHCP server on AP and client on station.

Please help me.
Many thanks.

Tommaso Pecorella

unread,
Dec 13, 2017, 7:00:35 PM12/13/17
to ns-3-users
How can you send packets to a node if you don't know the IP address of a node ?
Do you think that servers on Internet are using DHCP ?
Use DHCP for the client (the one where OnOffApplication is) and static addresses for the sink.
Moreover, read the examples to discover the right way to use OnOffApplication.

T.
Reply all
Reply to author
Forward
0 new messages