3. Quick Start

In this QuickStart section, we see few quick steps to install and execute the sample topology with RYU Controller.

KNet is compatible with Python 2.7 only.

KNet is currently supported and Tested in Ubuntu 16.04 and 14.04 versions.

We have used Ubuntu 16.04 OS for the below demonstations. (The procedure is same for Ubuntu 14.04 OS also)

_images/ubuntuversion_s.png

3.1. Installation

  1. Install the Prerequisties. Copy and Paste the below command in the Terminal
curl https://raw.githubusercontent.com/knetsolutions/KNet/master/install.sh | sh

This command will install the Docker, openvswitch and required packages.

_images/prerequisites_s.png
  1. Once Prerequisties are installed. Execute the below commands to verify the docker and openvswitches are installed.
sudo docker images
sudo ovs-vsctl show
_images/prereq_verification_s.png
  1. Install the KNet Topology Builder with below commands,
pip install knet
_images/knet_pip_install_s.png
  1. Install the KNet WebUI & and Verify the WebUI in browser
git clone https://github.com/knetsolutions/knet-ui
cd knet-ui
python ui/webserver.py >/dev/null 2>&1 &
_images/knet_ui_install_s.png

Open FireFox/Chrome, with URL: ĥttp://ip:5000/index.html, and see the empty topology page.

_images/WebUI_emptypage_s.png
  1. Start the KNet CLI and verify the commands
knet-cli
_images/knet_cli_start_s.png

3.2. Create a sample Topology and Testing

Now Let us Create the Sample Star Topology with RYU SDN Controller.

Example topology files are available in https://github.com/knetsolutions/knet-example-topologies

Star Topology file is available in topo0.yaml

3.2.1. Setup the RYU SDN Controller

1. Install the RYU SDN Controller Open the another terminal and execute the below commands,

cd $HOME
export LC_ALL="en_US.UTF-8"
virtualenv ryu
. ryu/bin/activate
pip install ryu
_images/ryu_install_s.png
  1. Run the Ryu Simple L3 Switch application,
ryu-manager ryu/lib/python2.7/site-packages/ryu/app/simple_switch_13.py
_images/ryu_run_l3switch_s.png

3.2.2. CLI

  1. Create a Topology as below in the CLI
CreateTopology /home/suresh/knet-example-topologies/1.0/topo0.yaml
_images/knet_topology_creation_s.png
  1. Verify the topology digram in UI.

    ĥttp://ip:5000/index.html

_images/Webui_StarTopology_s.png
  1. Open the another terminal, and verify the switches and nodes. Run the below commands in the new terminal and see the created nodes and switches.
sudo docker ps -a
sudo ovs-vsctl show
_images/startopology_dockerswitch_cmds_s.png
  1. Trigger the PingAll command from the KNet CLI and check the output Each node pings each other nodes.
PingAll
_images/CLI_pingall_command_s.png
  1. Verify the OVS flows with the below command,
    sudo ovs-ofctl -O OpenFlow13 dump-flows switch1
_images/ovs_dumpflows_output_s.png

3.3. How to Run the IPERF Tests:

  1. Login to the Node and Install the iperf package
    Refer How to Install the package(application) in the Node:.
  2. Execute the iperf commands in the nodes.

3.4. Delete the Topology

  1. In the KNet CLI, Execute the below command
DeleteTopology
_images/CLI_Delete_Topology_s.png
  1. Exit from the CLI by “Exit” Command