--
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 the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, 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/CAH-KihesmWkgWurUf4VVrDyk-Qdwmc%2BJ4U9rfzZC_0iTWBkTaw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/CAHCSpuqRxKQjs_ng%2BxLwSMQYCVdy1X1e19%3DRwUY3m5VLrT3e5w%40mail.gmail.com.
device->SetAttribute("Address", Mac48AddressValue(Mac48Address("my-wireless-mac")));
After this I seemed to get successful ping over wifi. Note this is a quick hack and there are more proper ways to assign MAC address that matches your real interface.
I can only suspect that this is due to the different driver implementation in the ethernet driver and the wifi driver, despite that both of them have been set to promiscuous mode.
Again, hoping someone with more experience could confirm or clarify this.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/CAH-KihfinCW4ZmAJfoPMAPs25c60zhh67%3D2u0%3D2KWzyVq2iEfg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/CAHCSpuoY7Z96D_x-VB8n4k3yfZMhwV%3DcFZAUXOz1TUPJPNBiNg%40mail.gmail.com.
Hi Bill Tao,
Kindly provide your comment on my reply.
"The mac address that we are setting here is the mac address of the simulated ns-3 node."
is it correct?
Or do we really need to set the mac address of the simulated node to the physical address of the device? (since we are setting it to promiscuous mode)
A little confusion here.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/CAHXeiM-GPZQA15jLhR0_o9MfGZpRRgkmeLDfWWThF_Q-UJMy%2Bg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/CAHCSpuq8yHMuRwj1hG7daLq98RxohoE%2B3HMVU-x26TV27ft%3DnA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/CAHXeiM8gYwu0bUCiA3UivWAc7jd-Av61tnUdFgh2r-9RPWLCfA%40mail.gmail.com.
"The Emu net device allows a simulation node to send and receive packets over a real network. The emulated net device relies on a specified interface being in promiscuous mode. It opens a raw socket and binds to that interface. We perform MAC spoofing to separate simulation network traffic from other network traffic that may be flowing to and from the host.
One can use the Emu net device in a testbed situation where the host on
which the simulation is running has a specific interface of interest which
drives the testbed hardware. You would also need to set this specific interface
into promiscuous mode and provide an appropriate device name to the ns-3
emulated net device. An example of this environment is the ORBIT testbed as
described above. PS:(apparently with wifi card it's not the same as the ethernet one)
The Emu net device only works if the underlying interface is up and in promiscuous mode. Packets will be sent out over the device, but we use MAC spoofing. The MAC addresses will be generated (by default) using the Organizationally Unique Identifier (OUI) 00:00:00 as a base. This vendor code is not assigned to any organization and so should not conflict with any real hardware.
It is always up to the user to determine that using these MAC addresses is okay on your network and won’t conflict with anything else (including another simulation using Emu devices) on your network. If you are using the emulated net device in separate simulations you must consider global MAC address assignment issues and ensure that MAC addresses are unique across all simulations. The emulated net device respects the MAC address provided in the SetAddress method so you can do this manually. For larger simulations, you may want to set the OUI in the MAC address allocation function."
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/CAHCSpuoY7Z96D_x-VB8n4k3yfZMhwV%3DcFZAUXOz1TUPJPNBiNg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/CAH-KihdDiEzayT7CxygB0jFYe%2BJ7edDsW02g7%2BrEvNDef7Sxuw%40mail.gmail.com.