[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
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.
Normally, the use case for emulated net devices is in collections of small simulations that connect to the outside world through specific interfaces. For example, one could construct a number of virtual machines and connect them via a host-only network. To use the emulated net device, you would need to set all of the host-only interfaces in promiscuous mode and provide an appropriate device name, "eth1" for example.
One could also 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.
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.
IP addresses corresponding to the emulated net devices are the addresses generated in the simulation, which are generated in the usual way via helper functions. Since we are using MAC spoofing, there will not be a conflict between ns-3 network stacks and any native network stacks.
The emulated net device comes with a helper function as all ns-3 devices do.
One unique aspect is that there is no channel associated with the underlying
medium. We really have no idea what this external medium is, and so have not
made an effort to model it abstractly. The primary thing to be aware of is the
implication this has for static global routing. The global router module
attempts to walk the channels looking for adjacent networks. Since there
is no channel, the global router will be unable to do this and you must then
use a dynamic routing protocol such as OLSR to include routing in
Emu
-based networks.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The Tap
Net Device is scheduled for inclusion in ns-3.4 at the writing
of this section. We will include details as soon as the Tap
device is
merged.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] |
This document was generated on December, 19 2008 using texi2html 1.78.