Skip to content
cschlesi edited this page Nov 26, 2012 · 2 revisions

Step 0: Build a VM with Linux

Before getting started with NetCore, you'll need a machine capable of running the Haskell platform and Mininet. We recommend setting up a virtual machine with Ubuntu 12.04.1 using either VMWare Player or VirtualBox.

Step 1: Install NetCore (+ supporting packages)

This step installs the Haskell platform, git, cabal-dev, and NetCore.

# Get the necessary packages
sudo apt-get install haskell-platform git

# Clone and initialize the netcore repository
git clone https://github.com/frenetic-lang/netcore.git netcore
cd netcore
git submodule init
git submodule update
cd

# Install cabal-dev
cabal update
cabal install cabal-dev

# Add .cabal/bin to your PATH
echo 'export PATH=$PATH:~/.cabal/bin' >> ~/.bashrc
export PATH=$PATH:~/.cabal/bin

# Build NetCore
cd netcore
cabal-dev install --enable-tests

# Test the installation
cabal-dev test

# Exit the netcore directory
cd

Step 2: Install Mininet (+ nifty tools)

This step installs the Mininet user switch (which does not require changes to the kernel), along with a few helpful tools like Wireshark.

# Get the necessary packages
sudo apt-get install aptitude

# Clone mininet
git clone git://github.com/mininet/mininet

# Install mininet, wireshark, etc.
mininet/util/install.sh -a

The Mininet installation instructions are essentially reproduced from here. At the time of this writing, the Mininet kernel switch will not install via the install.sh file on Ubuntu 12.04.1.

Step 3: Run the Examples

By this point, both Mininet and NetCore have been installed and are ready to use. Check out the examples in =mininet/examples= for some ideas on writing NetCore programs. The =mininet/examples/MininetTests.py= file is a Python unittest driver to run some of the NetCore examples along with Mininet.

# Run the NetCore example suite
cd netcore/examples
cabal-dev install . ..
sudo ./MininetTests.py