Barista CLI Commands

Connect the CLI of a Barista NOS $ telnet localhost 8000 (default CLI port) Log in the CLI Username: [user ID] Password: [1st-level password] Change modes Barista> turn on (change the current mode to a privileged mode) password: [2nd-level password] Barista# turn off (change the current mode to an unprivileged mode) Unprivileged options Barista> history […]

Barista Running Options

General way to execute a Barista NOS $ ./barista Options -c [Component configuration file] (specify a component configuration file) $ ./barista -c config/components.conf -a [Application configuration file] (specify an application configuration file) $ ./barista -a config/applications.conf -b (use base applications and components) $ ./barista -b (the same result with the following command line) $ ./barista […]

Installing and Running Barista

Requirement Ubuntu 14.04 / 16.04 Installation Download the source code of a Barista NOS $ git clone https://github.com/sdxdata/barista Install the dependencies on the Barista NOS $ cd barista $ ./deps.sh Configure the base parameters for the Barista NOS $ vi config.mk (set the number of threads) $ vi Makefile (set whether to use a cluster) […]

Introduction to Barista

As the network operating system (NOS) is the strategic control center of a software-defined network (SDN), its design is critical to the welfare of the network. Contemporary research has largely focused on specialized NOSs that seek to optimize controller design across one (or few) dimensions (e.g., scalability, performance, or security) due to fundamental differences in architectural […]

Step 6: Remove all Docker containers and OVS bridges

$ vi clear_all.sh #!/bin/bash # remove all Docker containers docker rm -f $(docker ps -aq) # remove OVS bridges sudo ovs-vsctl del-br br0 sudo ovs-vsctl del-br br1 sudo ovs-vsctl del-br br2 # remove veth sudo rm -rf /var/run/netns $ chmod +x clear_all.sh $ ./clear_all.sh

Step 5: Add a Physical NIC into an OVS bridge

$ vi 05_nic_to_ovs.sh #!/bin/bash CTRL=eth0 # interface connected to the control plane DP=eth1 # interface connected to the data plane # set the control plane sudo ifconfig $CTRL [base bridge IP] up sudo ifconfig port0 [br0 IP] up sudo ifconfig port1 [br1 IP] up sudo ifconfig port2 [br2 IP] up sudo ovs-vsctl add-port br0 port0 sudo ovs-vsctl add-port […]

Step 4: Connect OVS bridges with each other

$ mkdir components $ vi components/connect_ovs.sh #!/bin/bash var1=$1 var2=$2 var3=$3 var4=$4 if [ $# -ne 4 ]; then echo “./connect_ovs.sh [bridge1] [bridge2] [patch1-2] [patch2-1]” else sudo ip tuntap del dev $var3 sudo ip tuntap del dev $var4 sudo ip tuntap add dev $var3 mode tap sudo ip tuntap add dev $var4 mode tap sudo ovs-vsctl […]

Step 3: Connect Docker containers to OVS bridges

$ mkdir components $ vi components/create_mac.py #!/usr/bin/python import sys docker_ip = sys.argv[1] ip_bytes = docker_ip.split(‘.’) mac = [ 0x00, 0x00, int(ip_bytes[0]), int(ip_bytes[1]), int(ip_bytes[2]), int(ip_bytes[3]) ] print ‘:’.join(map(lambda x: “%02x” % x, mac)) $ chmod +x components/create_mac.py $ vi components/docker_to_ovs.sh #!/bin/bash DOCKER_ID=$1 BRIDGE_NAME=$2 VETH_NAME=$3 DOCKER_IP=$4 CIDR=$5 GATEWAY=$6 mac=$(python create_mac.py $DOCKER_IP) # connect apps(container form) to ovs-[bridge] […]

Step 2: Create OVS bridges

$ vi 02_create_ovs.sh #!/bin/bash CONTROLLERS=”tcp:192.168.0.11:6633″ PROTOCOL=OpenFlow10 # OpenFlow13 CTRL_INF=eth0 BR0_IP=192.168.0.101 BR1_IP=192.168.0.102 BR2_IP=192.168.0.103 NIC1=eth1 NIC2=eth2 NIC3=eth3 NIC4=eth4 # delete bridge sudo ovs-vsctl del-br br0 2> /dev/null sudo ovs-vsctl del-br br1 2> /dev/null sudo ovs-vsctl del-br br2 2> /dev/null # create bridge sudo ovs-vsctl add-br br0 sudo ovs-vsctl add-br br1 sudo ovs-vsctl add-br br2 # set operation […]

Step 1: Run Docker containers

$ vi 01_run_docker.sh #!/bin/bash docker ps -a | grep host- | awk ‘{print $1}’ | xargs -I {} docker rm {} NUM_OF_DOCKERS=20 for i in $(seq 1 $NUM_OF_DOCKERS) do docker run -i -t -d –net=none –name host-$i ubuntu /bin/bash done echo $(ip route get 8.8.8.8 | awk ‘NR==1 {print $NF}’)”: Created “$(docker ps -q | […]