-
Notifications
You must be signed in to change notification settings - Fork 3
Home
Welcome to the NetCore wiki! Here's how to get a virtual machine up and running with NetCore and Mininet.
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.
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
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
# Patch the install script to exclude the openvswitch kernel module
cat mininet/util/install.sh | sed -e 's/configure \$opts/configure/' > mininet/util/install.sh.new
mv mininet/util/install.sh.new mininet/util/install.sh
chmod u+x mininet/util/install.sh
# 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.
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