-
Notifications
You must be signed in to change notification settings - Fork 6
Installing NetASM
Instructions for creating a NetASM VM using VirtualBox
-
Download Ubuntu Server 14.04.2 LTS image from http://www.ubuntu.com/download/server
-
To boot and log in to the VM, follow the "Boot VM" and "Log in to VM" instructions at http://mininet.org/vm-setup-notes/
-
Update the VirtualBox
$ sudo apt-get update
-
Install Git
$ sudo apt-get install git
Perform the following steps to install Haskell platform on your machine:
-
Change to root directory
$ cd ~
-
Install the haskell-platform package from the ubuntu install-base. This process may take some time (several minutes to tens of minutes) depending on the speed of your connection.
$ sudo apt-get install haskell-platform
Important: It’s been reported that the above command is failing on most of the VMs. If this is happening with you, install haskell using the following command instead.
$ sudo apt-get install ghc6
-
To test if the haskell platform is installed correctly, run ghci (a haskell interpreter)
$ ghci
-
If installation is successful, you should see the following output:
GHCi, version 7.6.3: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Prelude>
-
On the gchi terminal, type :quit to exit the ghci interpreter
Prelude> :quit
Once the Haskell platform is setup, you are now ready to install NetASM.
Perform the following steps to install NetASM on your machine:
-
Change to root directory
$ cd ~/
-
Clone the NetASM-haskell repository
$ git clone https://github.com/NetASM/NetASM-haskell.git
To test if NetASM is working on your VM, run the Hub example.
-
Change to NetASM-haskell root directory
cd ~/NetASM-haskell
-
Run the Hub example
$ runhaskell Apps/Hub/Run.hs
-
If this test run is successful, you should see the following output:
[[("PID",(1,True)),("DRP",(0,True)),("inport",(1,True)),("outport",(2147483646,True))] [("PID",(1,True)),("DRP",(0,True)),("inport",(1,True)),("outport",(2147483645,True))]] "Instructions executed: 2"