Skip to content
Branch: master
Find file History
hwchiu and charlesmcchan Support custom netcfg
Abort the process if
1. The return code of command onos-netcfg isn't 1,
2. netcfg doesn't exist

Change-Id: Ia69ac155c69a44e379c10b17905b9571d6063d19
Latest commit fce80ad Oct 24, 2019
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
docker Support custom netcfg Nov 2, 2019
README.md Update README Sep 8, 2018
Vagrantfile Upgrade to Ubuntu 18.04 Nov 1, 2019
bgpdbgp1.conf Attempt to fix indirect DHCP client Dec 20, 2018
bgpdbgp2.conf Attempt to fix indirect DHCP client Dec 20, 2018
bgpdr1.conf Add dual upstream routers Sep 6, 2017
bgpdr2.conf Add dual upstream routers Sep 6, 2017
cleanup Separate double tagged test case from basic Trellis topology Mar 5, 2019
dhcpd.conf Improve trellis hag for mcast use cases Apr 24, 2018
dhcpd6.conf Improve trellis hag for mcast use cases Apr 24, 2018
dhcpd_hybrid_v4.conf Modifying hybrid_v4 topology to mirror ONS-EU 2018 demo topology Nov 26, 2018
trellis.json Separate double tagged test case from basic Trellis topology Mar 5, 2019
trellis.py Use OVS in userspace Oct 23, 2019
trellis_double_tagged.json Separate double tagged test case from basic Trellis topology Mar 5, 2019
trellis_double_tagged.py Use OVS in userspace Oct 23, 2019
trellis_dualhome.json Fix subnet config for DHCPv6 server Oct 27, 2017
trellis_dualhome.py Use OVS in userspace Oct 23, 2019
trellis_duallink.json [CORD-2479] Adding trellis dual links Jan 12, 2018
trellis_duallink.py Use OVS in userspace Oct 23, 2019
trellis_hag.json Improve trellis hag for mcast use cases Apr 24, 2018
trellis_hag.py Use OVS in userspace Oct 23, 2019
trellis_hybrid.json Address wrong pairDeviceId Aug 17, 2018
trellis_hybrid.py Use OVS in userspace Oct 23, 2019
trellis_hybrid_v4.json Modifying hybrid_v4 topology to mirror ONS-EU 2018 demo topology Nov 26, 2018
trellis_hybrid_v4.py Use OVS in userspace Oct 23, 2019
trellis_remote_dhcp.json Attempt to fix indirect DHCP client Dec 20, 2018
trellis_remote_dhcp.py Use OVS in userspace Oct 23, 2019
trellis_vlan.json New network config for DHCP relay app Aug 24, 2017
trellis_vlan.py Use OVS in userspace Oct 23, 2019
trellislib.py Modifying hybrid_v4 topology to mirror ONS-EU 2018 demo topology Nov 26, 2018
trellisp4.json Update trellisp4.py to use Stratum-enabled bmv2 switch class from ONOS Mar 1, 2019
trellisp4.py Update trellisp4.py to use Stratum-enabled bmv2 switch class from ONOS Mar 1, 2019

README.md

Trellis Leaf-Spine Fabric

Introduction

This folder contains Mininet scripts and corresponding config files that can be used to emulate Trellis leaf-spine fabric, vRouter and DHCP relay. Current Mininet setup only works with ONOS 1.12 and above. We recommend you use the tip of 1.12 branch.

Download

git clone https://gerrit.onosproject.org/routing

Manual Installation

Ubuntu 16.04 LTS

Some dependencies need to be installed for a fresh Ubuntu.

sudo apt-get update
sudo apt-get install -y gawk texinfo python-pip build-essential iptables automake autoconf libtool
sudo pip install -U pip
sudo pip install ipaddress

Mininet

sudo apt-get install mininet

OpenvSwitch

Mininet should install OVS for you. Please run sudo ovs-vsctl --version and make sure the OVS version is above 2.5.0+.

DHCP server

sudo apt-get install isc-dhcp-server

Quagga

Trellis needs a special FPM patch for Quagga.

In order to start the quagga related daemons, you should create a user quagga and set the correct read/write permission to local state directory(--localstatedir) and configuration directory(--sysconfdir).

git clone -b onos-1.11 https://gerrit.opencord.org/quagga
cd quagga
./bootstrap.sh
./configure --enable-fpm --sbindir=/usr/lib/quagga enable_user=root enable_group=root
make
sudo make install
cd ..
sudo ldconfig

ONOS - Installation

Learn about how to setup ONOS at: https://wiki.onosproject.org/. After installation, the following ONOS apps need to be activated.

export ONOS_APPS=drivers,openflow,segmentrouting,fpm,dhcprelay,netcfghostprovider,routeradvertisement,mcast

ONOS - Network Config

onos-netcfg <onos-ip> routing/trellis/trellis.json

Disable/Modify AppArmor

The apparmor will set dhcpd in enforce mode. We will need to disable the profile.

sudo ln -s /etc/apparmor.d/usr.sbin.dhcpd /etc/apparmor.d/disable/
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.dhcpd

The apparmor rules of dhclient will restrict the dhclient to write files to directory /var/lib/. We need to modify the rules of dhclient profile and restart the apparmor.

sudo /etc/init.d/apparmor stop
sudo sed -i '30i  /var/lib/dhcp{,3}/dhcpclient* lrw,' /etc/apparmor.d/sbin.dhclient
sudo /etc/init.d/apparmor start

Start Mininet Emulation

cd routing/trellis
sudo ./trellis.py --controllers ONOS_CONTROLLER_IP1,ONOS_CONTROLLER_IP2,...,ONOS_CONTROLLER_IPN

Verify Network Connectivity

In Mininet, run

  • h1 ping 10.0.99.2 to check IPv4 connectivity
  • h1v6 ping6 2000::9902 to check IPv6 connectivity

Vagrant

We also provide a mininet VM image supported by Vagrant file. In that VM environment, you only need to modify the IP address of ONOS controller for trellis.py and zebradbgp*.conf.

In order to use the Vagrant, make sure you have already installed the Vagrant in your environment.

Start the VM

vagrant up

Start the ONOS

Start the ONOS controller and set the config via onos-netcfg on the other host.

Operate the VM

Type the following command to ssh into the VM environment.

vagrant ssh

Now start mininet to test

cd routing/trellis
sudo ./trellis.py --controllers ONOS_CONTROLLER_IP1,ONOS_CONTROLLER_IP2,...,ONOS_CONTROLLER_IPN

Troubleshooting

  • Services in the emulated hosts may still be alive if Mininet is not terminated properly. In that case, simply run the following command to clean up.
sudo killall -9 dhclient dhcpd zebra bgpd
sudo mn -c
You can’t perform that action at this time.