wireless protocol in ns3

143 views
Skip to first unread message

Sajid

unread,
Sep 26, 2024, 3:25:31 AM9/26/24
to ns-3-users
hey, I am new to ns3. I want to simulate my network on ns3. my network is Rf based .  I did not find any Rf implemented network. So I decided to use any wireless network in which mac and physical layer similar to my network. so i found the uan network which is using 1 byte mac address . also have csma at mac layer. but now i am facing multiple issues . 

i want to send range of node . if one node is out of range of second node there were not able to communicate directly. . how i can implement this. please explain me in detail 
and second thing if nodes are in range , distance between them doesn't effect the transmiision time

Tommaso Pecorella

unread,
Sep 28, 2024, 6:52:38 PM9/28/24
to ns-3-users
Hi,

using the "wrong" model might lead to totally wrong results. The UAN model especially in its channel part, is tuned to be UNDERWATER... .. just saying.

Said so, and given that you've been warned, the answers are:
1) You can use the RangePropagationLossModel, which (in practice) does what you ask: a sharp cutoff between full power reception and no reception at all.
2) Forget about it - the Rx time is always dependent on the distance between the nodes and the speed of the electromagnetic wave in the given medium (usually, for RF, it's the speed of light).

If you *really* want to overcome point 2 you'll have to develop your own channel model.

As a last note, please consider that making your sister totally ideal (no delays, no errors while in range, total loss when not in range) will make your system easier to model (maybe), but you'll fail to analyze the real behavior of the system (and you'll fail to analyze if your theory is good or bad).
My rule of thumb is is: if the simulations and theory are perfectly aligned, then either the theory is fantastically complex (it happens once in a great while), or the simulations were ill-made.

So, my suggestion is: don't take shortcuts, and don't force your simulation to use non realistic assumptions. You'll regret it later. 

Sajid

unread,
Sep 29, 2024, 12:35:18 AM9/29/24
to ns-3-...@googlegroups.com

Hello tommaso
Thank you for the reply.  Is there any way i can do changes , how i can change speed of sound to speed of light?. Or could you provide me rf model if you have?


--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/SzbO-LiON7w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/dc501948-c966-4085-9a73-5423376952cfn%40googlegroups.com.

Tommaso Pecorella

unread,
Sep 29, 2024, 5:04:34 AM9/29/24
to ns-3-users
You could either change the material (according to https://en.wikipedia.org/wiki/Speed_of_sound, the speed of sound in steel is greater than the one in water), or you can slow down the light, for example using lasers or metamaterials.

If you mean in the code... well, it's code. Read it and change it as needed.

Sajid

unread,
Sep 30, 2024, 1:03:13 AM9/30/24
to ns-3-users
hey tommaso,

could you please tell how i can send payload to another node through packet socket?

Tommaso Pecorella

unread,
Sep 30, 2024, 3:29:50 AM9/30/24
to ns-3-users
Check the examples. E.g.:
  • examples/wireless/wifi-ap.cc
  • examples/wireless/wifi-adhoc.cc
  • examples/wireless/wifi-wired-bridging.cc
  • examples/wireless/wifi-spatial-reuse.cc

Sajid

unread,
Oct 2, 2024, 5:04:02 PM10/2/24
to ns-3-...@googlegroups.com

Thank you tommas. I have another problem. I am broadcasting packet from nodes. And i want to see that in animation. I am using uan model . I tried to implement netanim animation. So far i am only able to see location of nodes when i run simulation no packet flowing animation happened? How i can achieve this?


--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/SzbO-LiON7w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.

Tommaso Pecorella

unread,
Oct 2, 2024, 5:14:58 PM10/2/24
to ns-3-users
I'm deeply sorry about that, but it looks like NetAnim (the program) is kinda bugged.
Some users did succeed in using an older version (the trace format should be compatible).

A better alternative is to debug and fix NetAnim. I'd do it myself but a) I have no spare time left, and b) I'm not fluent with QT.

Sajid

unread,
Oct 3, 2024, 12:49:08 AM10/3/24
to ns-3-users
may be i am doing something wrong. could you please tell me what steps are necessary to run animation simulation . for broadcasting packet in uan model 

Sajid

unread,
Oct 9, 2024, 8:10:50 AM10/9/24
to ns-3-...@googlegroups.com

Hey  tommaso.

I need your guidance.  I am using csma model in ns3 . I want to get rssi at receiving end . How i can get that? How i can integrate loss propagation model with it


Tommaso Pecorella

unread,
Oct 9, 2024, 5:04:18 PM10/9/24
to ns-3-users
csma is a WIRED protocol, it doesn't even have the concept of RSSI, or propagation loss.

Sajid

unread,
Oct 9, 2024, 6:06:04 PM10/9/24
to ns-3-...@googlegroups.com

My network is wireless but it has csma feature also. So i changed the ns3 csma model's packet header. That was for ethernet i changed it to 1 byte mac address. Now i just want to get rssi. On the basis of it i will define of region of node


Tommaso Pecorella

unread,
Oct 9, 2024, 6:55:55 PM10/9/24
to ns-3-users
Sorry if this might sound disrespectful, but...

do you think that anybody could guess what is your problem or question from the description you gave?
Moreover, consider that here nobody is paid to provide suggestions or guidance, so if you upset the people that are, in their spare time, keen enough to help, you'll end up in a blacklist. Or worse.

As a last point, consider that I had to rewrite this message 5 times to avoid to be either witty, sarcastic, or plainly rude. Please appreciate that.
Reply all
Reply to author
Forward
0 new messages