[Ns-developers] emulation use cases

Gustavo Carneiro gjcarneiro at gmail.com
Thu Jan 15 04:56:06 PST 2009

2009/1/15 Tom Henderson <tomh at tomh.org>

> Craig is working on Tap device support for emulation, and some questions
> have arisen about use cases and requirements to support, so I thought I'd
> raise the issue on the list for any input people might have.
> Presently, we have an emulation mode documented here:
> http://www.nsnam.org/docs/manual.html#SEC59
> it runs the simulator in real-time and allows nodes in a simulation to emit
> packets that are bridged onto a physical device on the host machine.  ns-3
> packets are therefore emitted onto real links.  The ns-3 device must be
> hand-configured with mac address and does not presently support DHCP
> configuration of the address.
> I've suggested that the next priority would be to invert the picture, to
> allow real hosts to emit packets onto ns-3 links.  The main use case I have
> in mind is to allow users to interconnect virtual machines such as OpenVZ
> containers over ns-3 links (mainly, WiFi is of immediate interest).  It
> would also be possible to use the simulator as a "black box" such as a
> "simulator in the loop" testbed between real nodes or test equipment.
> To accomplish this, what is needed is to create tap devices on the ns-3
> host machine, and bridge these tap devices to some new kind of ns-3
> NetDevice that reads and writes from the tap device.  Essentially, this new
> ns-3 NetDevice would be receiving fully formed layer-2 frames and bridging
> them onto our existing ns-3 NetDevice types.
> In this model, the ns-3 node that does this bridging would be kind of like
> a ghost node, possibly with an Internet stack (maybe not).  It may be the
> case that a simulation/emulation would involve a mix of ns-3 nodes and these
> special ghost nodes that exist for the purpose only of hosting the virtual
> machine; in such a case, I would envision that IP-level and above
> configuration of the mixed environment would have to be done separately.
> I think that a framework to try to configure all of this from a bird's eye
> view of both simulation and emulation portions is possible, but would be a
> later phase of the effort (possibly a GSOC project).
> Are there other suggestions for the above type of use case, or other use
> cases for emulation that people would like to see prioritized?

One use case I had in mind would be running routing protocols implemented in
NS-3 over a real host with real interfaces.  I would expect the "packet
socket" that powers EmuNetDevice to be used not only for "emitting" packets
but also for receiving packets.  Why is receiving packets on EmuNetDevice
not supported?


Gustavo J. A. M. Carneiro
INESC Porto, Telecommunications and Multimedia Unit
"The universe is always one step beyond logic." -- Frank Herbert

More information about the Ns-developers mailing list