YET ANOTHER NETWORK CONTROLLER (PART 2) – RUNNING YANC

Once you have set up yanc using this link, we now need to run yanc filesystem, yanc-of-adapter and mininet.

Go to yanc folder and run the following command:

$ ./yanc -f /net

This will mount the yanc filesystem under /net directory.

Open new terminal. Go to <path-to-yanc>/apps/of-adapter and run following command:

$ ./yanc-of-adapter /net unix:path=/var/run/dbus/system_bus_socket -vvv

This will start yanc-of-adapter at port 6633 on the localhost. It will use unix:path=/var/run/dbus/system_bus_socket as the D-Bus for IPC (read about D-Bus here).

Now we will create a simple topology using mininet. Open a new terminal and go to <path-to-mininet>/bin to find mininet executable called mn. Run following command:

# mn –controller=remote,ip=127.0.0.1,port=6633

Note: You must have root privileges to run above command.

Mininet is now running with the topology depicted in the below figure:

mininet_simple_top

 

Great! You just completed the 2nd tutorial of the series. Will be back with more awesome stuff shortly. Stay tuned.

 

Cheers!

Advertisements

Yet Another Network Controller (Part 1) – Getting started

So this is a blog post (after a very long time) explaining how to start Yet Another Network Controller (yanc – https://github.com/ngn-colorado/yanc) on your Linux system. Clone yanc repository in your local machine if you haven’t already.

$ git clone https://github.com/ngn-colorado/yanc.git

$ cd yanc/

$ make

# mkdir /net

# chown <user> : <group> /net

$ ./yanc -f /net

This has started the yanc filesystem with /net as its mountpoint.

Now we’ll start yanc-of-adapter, which is an utility to allow yanc filesystem to connect to OpenFlow switches created using emulators like mininet (we’ll see how it is done in a while).

Open a new terminal instance and navigate to /<path-to-yanc>/apps/of-adapter/. To run yanc-of-adapter, run following commands in your terminal.

$ git submodule init

$ git submodule update

The above commands would allow you to have om-lib submodule (https://bitbucket.org/omichel/om-lib).

Now let’s make:

$ make

This will create an executable named yanc-of-adapter. Now type following command to check if the necessary files have been created successfully.

$ yanc-of-adapter -h 

The output of the above command should be:

Usage: yanc-of-adapter [-v[v[v]]] [-h] [-p listening-port] <yanc-fs-path> <dbus-addr>
Try `yanc-of-adapter -h’ for more information.

If the above output does not appear, then you would have to follow the above steps again.

Now, yanc is all ready to rock n’ roll. We just need OpenFlow switches to let yanc-of-adapter connect them with the yanc filesystem. We will use mininet to create virtual OpenFlow switches and make them connect to yanc-of-adapter which would ack like an SDN controller for them. Follow the steps given on http://mininet.org/download/ to get mininet up and running. Run following command to check if you installed mininet properly.

# mn –test pingall

Congratulations! You just completed the first step to awesomeness. We will look into how to use yanc filesystem with the help of yanc-of-adapter and mininet.

Feel free to ask any questions.

Peace.