How to connect VirtualBox with NS3

198 views
Skip to first unread message

Sandy

unread,
Aug 13, 2018, 2:33:44 PM8/13/18
to ns-3-users
Hi folks,

I am looking to connect NS3 node in the network with Virtual Machine to do reconnaissance about other nodes in NS3 network. Can anybody explain that how to do this ?

                   VM ---> Node1-------> Node3 ------> Node4 
                                |                                                                  
                                |                                    
                             Node 2

Joshua Boley

unread,
Aug 13, 2018, 8:19:09 PM8/13/18
to ns-3-...@googlegroups.com

Take a look at the TapBridge module; it allows you to create or use existing TAP devices on the host for exactly this sort of purpose. That includes the host endpoint (i.e., vbox0) of a “host-only” connection. There might be other virtual network types you could use, all it really needs is the TAP interface on the host, but “host-only” is probably what you really want (least overhead, most direct).

 

FYI, chances are you’ll want to make sure you’re running the simulation in real-time; you can also find the documentation for that on the ns3 website.

 

Regards,

Josh

--
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 post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

 

Sandy

unread,
Aug 15, 2018, 3:26:41 PM8/15/18
to ns-3-users
Thanks Josh. I am looking at TapBridge module , do you know about this line " tapBridge.SetAttribute ("DeviceName", StringValue ("tap-left"));"
From where i got to know about Device name ?

Thanks
Sandy

Sandy

unread,
Aug 20, 2018, 1:58:08 PM8/20/18
to ns-3-users
Hi folks ,

How to check if  Tap Bridge is working or not. I am interested in connecting Virtual machine as shown in figure below


  Node1 -------CSMA----------Node3 (Router) -------P2P ------- Node 4 -------P2P ------- Node5
                                        |                                           
                                     CSMA                                                                    
                                        |                                                                       
              VM ---------------- Node 2 

 I need to ping from Node2 using Virtual Machine to Node 5.

 What i did upto now
- Created Tap Device (Tap0) on the host machine
-  Install the tapbridge on Node2 using mode "UseLocal" and DeviceName "tap0"

Can anybody help me with this.

Thanks in advance


Reply all
Reply to author
Forward
0 new messages