ns-3 on Windows

View: New views
3 Messages — Rating Filter:   Alert me  

ns-3 on Windows

by craigdo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

There has been considerable discussion recently about the "official" ns-3
answer to running under Windows.  I have personally been running Cygwin for
years and it does allow me to run a subset of ns-3 fairly well.  Although it
allows me to do some things, other important features like Python bindings,
NSC, emulation devices, tap devices and real-time simulations will not work
under Cygwin.  To use these, I generally ssh from Windows (via Cywgin) into
a grown-up system; but this has its annoyances as well.

We have talked for some time about using virtual machines as an answer to
full-blown ns-3 on Windows; and I have had a HOWTO up on the nsnam wiki for
some time spelling out how to use VMware to get virtual machines running and
configured.  There hasn't been anything available for VirtualBox which seems
to be a more popular choice.

I put together a HOWTO that describes in detail how to use Sun VirtualBox to
get Fedora 11 running and then how to get ns-3 running on that virtual
machine.

For your reading pleasure:

 
http://www.nsnam.org/wiki/index.php/HOWTO_use_VirtualBox_to_run_simulations_
on_Windows_machines

It compares surprisingly well, performance-wise, to Cygwin; and it is real
Linux so you get all of the expected bells and whistles (like NSC).

Regards,

-- Craig




Re: ns-3 on Windows

by Andrey Mazo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

> For your reading pleasure:
>
> http://www.nsnam.org/wiki/index.php/HOWTO_use_VirtualBox_to_run_simulations_
> on_Windows_machines
Excellent guide, Craig!
Traditional spell-check from me is attached both as a patch and as an  
updated wiki page. (since I don't have write permissions to ns-3 wiki)


--
Andrey Mazo.


--- HOWTO_use_VirtualBox_to_run_simulations_on_Windows_machines.wiki.orig 2009-11-07 10:58:53.000000000 +0300
+++ HOWTO_use_VirtualBox_to_run_simulations_on_Windows_machines.wiki 2009-11-07 11:30:31.000000000 +0300
@@ -1,12 +1,12 @@
 {{TOC}}
 
-ns-3 is primarily a Linux platform and advanced ns-3 features will use Linux specific functions to accomplish their goals.  Since Windows is such as widely used platorm, ns-3 does provide a supported solution for running in that environment using a Linux-emulation environment called [http://cygwin.com Cygwin].  However, Cygwin is not a perfect emulation of any Linux.  This means there will be features available on Linux systems that are simply not usable on Windows systems.
+ns-3 is primarily a Linux platform and advanced ns-3 features will use Linux specific functions to accomplish their goals.  Since Windows is such as widely used platform, ns-3 does provide a supported solution for running in that environment using a Linux-emulation environment called [http://cygwin.com Cygwin].  However, Cygwin is not a perfect emulation of any Linux.  This means there will be features available on Linux systems that are simply not usable on Windows systems.
 
-Fortnately, a technology called virtualization exists to allow one to share computer hardware between operating systems and allow you use Linux systems essentially as if they were running natively on your hardware.  This happens as your Windows is running, so it appears as if Windows and Linux were sharing your hardware.
+Fortunately, a technology called virtualization exists to allow one to share computer hardware between operating systems and allow you use Linux systems essentially as if they were running natively on your hardware.  This happens as your Windows is running, so it appears as if Windows and Linux were sharing your hardware.
 
 There are several virtualization schemes currently available.  Two of the most popular are VMware (see [[HOWTO use VMware to set up virtual networks (Windows)]]) and VirtualBox.  We will cover VirtualBox in this HOWTO.
 
-There is extensive documemtation available online for VirtualBox.  Look [http://www.virtualbox.org/ here] for a starting point. Note that by downloading the VirtualBox code you are implicitly agreeing to  [http://www.virtualbox.org/wiki/VirtualBox_PUEL this license].
+There is extensive documentation available online for VirtualBox.  Look [http://www.virtualbox.org/ here] for a starting point. Note that by downloading the VirtualBox code you are implicitly agreeing to  [http://www.virtualbox.org/wiki/VirtualBox_PUEL this license].
 
 == HOWTO use VirtualBox to run simulations on Windows machines ==
 
@@ -22,7 +22,7 @@
 
 2.  Step through the '''Sun VirtualBox Setup Wizard'''.
     a.  Press the '''Next >''' button.
-    b.  Accept the terms of the license agrreement (if you desire) by clicking
+    b.  Accept the terms of the license agreement (if you desire) by clicking
         the corresponding radio button.
     c.  Press the '''Next >''' button.
     d.  Review the features that will be installed if you desire.  I just accept
@@ -43,13 +43,13 @@
         selected.
     d.  Press the ''Finish''' button.
 
-3.  Register with Sun Online.  VirtualBox will ask you to register with Sun
+4.  Register with Sun Online.  VirtualBox will ask you to register with Sun
 Online.   If you already have a Sun Online account, enter it or just fill
 out the account creation part of the page and press '''Register'''.  If the
-restration process complains about a bad IP address, just create a new
+registration process complains about a bad IP address, just create a new
 account.
 
-4.  Download a Linux CD image.
+5.  Download a Linux CD image.
     a.  Decide which version of Linux you are going to use.  If you have no
         strong preference, I would use the same version that ns-3 does most
         of its testing on.  Look [http://www.nsnam.org/wiki/index.php/Main_Page here]
@@ -59,15 +59,15 @@
         Core 10.  Fedora it is; and they are at Fedora 11 as of this writing.
     b.  Go to [http://fedoraproject.org/ The Fedora Project] and then to
         [http://fedoraproject.org/en/get-fedora Get Fedora] and download a
-        CD image.  You will get the usual '''File Download - Do you want to open
-        or save this file?''' dialog.  Just click '''Save''' and tell the system
+        CD image.  You will get the usual '''File Download - Do you want to open'''
+        '''or save this file?''' dialog.  Just click '''Save''' and tell the system
         where to put the almost 700 megabyte file.
 
-5.  Start a new virtual machine
+6.  Start a new virtual machine
     a.  Go to the Sun VirtualBox window you started in step 3.
     b.  Press the "New" button.  This will start a '''New Virtual Machine Wizard'''.
     c.  Press '''Next >''' in the wizard.
-    d.  Give your new virtual machine a name, say "ns-3-fedora-11.
+    d.  Give your new virtual machine a name, say "ns-3-fedora-11".
     e.  In the '''OS Type''' box, select '''Linux''' as the Operating System and
         '''Fedora''' as the Version.
     f.  Press '''Next >''' in the wizard.
@@ -76,7 +76,7 @@
         your host machine.  I choose 512 MB on my 2 GB Windows machine.
     h.  Press '''Next >''' in the wizard.
     i.  Keeping in mind how much hard disk space you have in your host machine
-        give teh new virtual machine some memory.  You will need disk for the
+        give the new virtual machine some memory.  You will need disk for the
         base OS, the toolchain and at least one ns-3 distribution, which will
         require about 1.2 gig at the time of this writing.
     j.  Press '''Next >''' in the '''New Virtual Machine Wizard''' to start the
@@ -93,19 +93,19 @@
         '''Finish''' in the '''Create New Virtual Disk Wizard''' to create
         your new virtual machine.
 
-6.  "Insert" your boot CD.  In the Sun VirtualBox window, you should now see a
+7.  "Insert" your boot CD.  In the Sun VirtualBox window, you should now see a
 virtual machine named "ns-3-fedora-11" in the powered off state on the left
 side.  On the right side, you should see the "Details" tab selected, with the
 details for "ns-3-fedora-11" displayed.
     a.  Click on the CD/DVD-ROM item.
     b.  Select the '''Mount CD/DVD Drive''' check box.
-    c.  Select the '''ISO Image FIle''' radio button.
+    c.  Select the '''ISO Image File''' radio button.
     d.  Browse for the ISO Image File.
     e.  Select the "Add" Icon and browse to the ISO image file for Fedora 11
-        you saved in step 4.
+        you saved in step 5.
     f.  Press '''Select''' and then '''OK'''.
 
-7.  Power up the virtual machine and install Fedora 11.
+8.  Power up the virtual machine and install Fedora 11.
     a.  Select the "Start" icon in the Sun VirtualBox window.  It is shaped like
         a green arrow.
     b.  Read the information dialog about how to get in and out of the virual
@@ -115,16 +115,16 @@
         watch Fedora 11 start to install (this will take a while).
     e.  When the login box appears, press "Log In" and then double click the
         '''Install to Hard Disk icon'''.
-    f.  Press '''Next'' to bein the Fedora 11 installation process and copy the
-        image to the virtual machine hard drive.  This is going to take somex
+    f.  Press '''Next'' to begin the Fedora 11 installation process and copy the
+        image to the virtual machine hard drive.  This is going to take some
         considerable time since you are installing a whole operating system.
         We won't cover how to proceed here in detail since this is not a Fedora
         11 installation guide.  Google is your friend if you have problems.
     g.  Eventually you'll see "Congratulations, your Fedora installation is
-        comlete.  Press '''Close'''.
+        complete.  Press '''Close'''.
     h.  Shut down the Fedora system.
 
-8.  "Remove" your boot CD.  In the Sun VirtualBox window, you should now see a
+9.  "Remove" your boot CD.  In the Sun VirtualBox window, you should now see a
 virtual machine named "ns-3-fedora-11" in the powered off state on the left
 side.  On the right side, you should see the "Details" tab selected, with the
 details for "ns-3-fedora-11" displayed.
@@ -132,22 +132,22 @@
     b.  Deselect the '''Mount CD/DVD Drive''' check box.
     c.  Press '''OK'''.
 
-9.  Bring up your shiny new Fedora 11 system.
+10.  Bring up your shiny new Fedora 11 system.
     a.  Select the "Start" icon in the Sun VirtualBox window.  It is shaped like
         a green arrow.
     b.  You'll have to do a few more setup steps (create a user) in the Fedora
         '''Setup Agent'''.  This will reboot one more time and then you can log
         in with your new user name.
 
-10. Install the GNU toolchain and some tools.  If you have configured sudo, you can run the following commands (or others according to your taste) using sudo, otherwise log on as root.
+11. Install the GNU toolchain and some tools.  If you have configured sudo, you can run the following commands (or others according to your taste) using sudo, otherwise log on as root.
     a.  yum install libxml2 libxml2-dev
-    d.  yum install gcc gcc-c++ make automake autoconf binutils
-    e.  yum install openssh-server openssh-client openssl libssl-dev
-    f.  yum install python-dev mercurial scons flex bison
-    g.  yum install tcpdump gdb emacs
+    b.  yum install gcc gcc-c++ make automake autoconf binutils
+    c.  yum install openssh-server openssh-client openssl libssl-dev
+    d.  yum install python-dev mercurial scons flex bison
+    e.  yum install tcpdump gdb emacs
 
-11.  Get and Test ns-3-dev
-    a.  Make sure you have exited from su root, if you did that in step 10.
+12.  Get and Test ns-3-dev
+    a.  Make sure you have exited from su root, if you did that in step 11.
     b.  cd ~
     c.  mkdir repos
     d.  cd repos


attachment0 (13K) Download Attachment

Re: ns-3 on Windows

by craigdo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


> Traditional spell-check from me is attached both as a patch and as an
> updated wiki page. (since I don't have write permissions to ns-3 wiki)

Thanks, Andrey.  Applied.

-- C