Basic Trellis Installation Guide

Steven_zhangCreated at:Dec 10, 2019 11:15:47Updated at:Dec 10, 2019 13:18:59

 Scenario

mceclip0.png

-AS6712-32X

ONL-master-ONL-OS-DEB9-2018-06-19.2333-16f97c4-AMD64-INSTALLED-INSTALLER

ofdpa_3.0.5.5 accton2.3-1_amd64.deb 

-AS5712-54X

ONL-2.0.0-ONL-OS-DEB8-2017-07-18.1642-40fc82b-AMD64-INSTALLED-INSTALLER

ofdpa_3.0.5.5+accton1.7-1_amd64.deb

Basic Configuration on the switch

root@localhost:~# vi /etc/network/interfaces
auto ma1
iface ma1 inet static
address 188.188.254.150
netmask 255.255.255.0

root@localhost:~# ifdown ma1
root@localhost:~# ifup ma1

Install the OFDPA to the switch AS5712-54X as example

root@localhost:~# wget http://188.188.254.100/ofdpa_3.0.5.5+accton1.7-1_amd64.deb
root@localhost:~# dpkg -i --force-overwrite ofdpa_3.0.5.5+accton1.7-1_amd64.deb

Specify the controller IP on "/etc/ofagent/ofagent.conf"

root@localhost:~# nano /etc/ofagent/ofagent.conf
# Controller
#-----------------------
CTRL1_IP="188.188.254.122"
CTRL1_PORT="6653"
#CTRL2_IP="127.0.0.1"
#CTRL2_PORT="6653"
#CTRL3_IP="127.0.0.1"
#CTRL3_PORT="6653"
root@localhost:~# service ofagentd restart

 

ONOS Controller Prepare Work

Hardware (minimum requirements)
2 core CPU
2 GB RAM
10 GB HDD
1 NIC (any speed)

Software
Ubuntu 16.04.5 LTS
mceclip2.png
Install Oracle Java 8

root@ONOS:~# sudo apt-get install software-properties-common -y && \
sudo add-apt-repository ppa:webupd8team/java -y && \
sudo apt-get update && \
echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | sudo debconf-set-selections && \
sudo apt-get install oracle-java8-installer oracle-java8-set-default -y

Install curl

root@ONOS:~# sudo apt-get install curl

Some dependencies need to be installed for a fresh Ubuntu.

root@ONOS:~# sudo apt-get update
root@ONOS:~# sudo apt-get install -y gawk texinfo python-pip build-essential iptables automake autoconf libtool
root@ONOS:~# sudo pip install -U pip
root@ONOS:~# sudo pip install ipaddress

Move to /opt

root@ONOS:~# sudo mkdir /opt
root@ONOS:~# cd /opt

Download ONOS (1.12.0)

root@ONOS:/opt# sudo wget -c http://downloads.onosproject.org/release/onos-1.12.0.tar.gz

Untar the ONOS archive into /opt

root@ONOS:/opt# sudo tar xzf onos-1.12.0.tar.gz

Rename the extracted directory to "onos"

root@ONOS:/opt# sudo mv onos-1.12.0.tar.gz onos

Add “ONOS_APPS” environment variable

root@ONOS:~# cat ~/.profile
# ~/.profile: executed by Bourne-compatible login shells.
if [ "$BASH" ]; then
 if [ -f ~/.bashrc ]; then
 . ~/.bashrc
 fi
fi
mesg n || true
export ONOS_APPS=drivers,openflow,segmentrouting,fpm,dhcprelay,netcfghostprovider,routeradvertisement

Running ONOS with its start-stop script

root@ONOS:~# /opt/onos/bin/onos-service start

mceclip4.png

#Now the ONOS controller is running and you will see the CLI of ONOS controller.

Check the running APPs of ONOS

onos> apps -a -s

mceclip0.png

#ONOS needs time to bring up all the applications, therefore, it will not show the all apps immediately.

Download Trellis source code
#Open a new SSH session to connect to the server.

root@ONOS:~# apt-get install git
root@ONOS:~# git clone https://gerrit.onosproject.org/routing

Create trellis json file

root@ONOS:~# vi routing/trellis/trellis_demo.json

root@ONOS:~# cat routing/trellis/trellis_demo.json

#You can refer to the slides to understand how to configure json file via below link.
https://opencord.org/wp-content/uploads/2018/01/Trellis-Tutorial-CORD-Build-2017.pdf

Push trellis configuration to ONOS (onos-netcfg shell script)

root@ONOS:~# /opt/onos/bin/onos-netcfg 188.188.254.122 routing/trellis/trellis_demo.json

#188.188.254.122 is ONOS controller's IP.
#If everything is correct, then there will have no any message printed to the terminal.

Check the current network configuration on ONOS

onos> netcfg

 To access the ONOS
#The default username and password is onos / rocks.

CLI: ssh -p 8101 onos@[controller_IP]
WEB GUI: http://[controller_IP]:8181/onos/ui/index.html
mceclip8.png

Some basic commands on ONOS for checking status.

onos> devices
onos> links
onos> interfaces
onos> flows -s
onos> hosts –s

 

References:
[1] https://opencord.org/wp-content/uploads/2018/01/Trellis-Tutorial-CORD-Build-2017.pdf
[2] https://wiki.onosproject.org/display/ONOS/Installing+on+a+single+machine
[3] https://github.com/opennetworkinglab/routing/tree/master/trellis
[4] https://blog.pichuang.com.tw/ofdpa-with-onl-cheat-sheet/



Attachment:ofdpa_3.0.5.5 accton1.7-1_amd64.deb.zip • 9.58MB • Download

Attachment:ofdpa_3.0.5.5 accton2.3-1_amd64.deb.zip • 9.59MB • Download

Attachment:trellis_demo.zip • 590B • Download