====== Lab Notes for RIV MOOC ====== ===== - SDN with ONOS ===== ONOS and mininet are the most stable solution for testing SDN in the Lab VM. * Installing ONOS via docker is straighforward sudo apt-get update sudo apt-get install apt-transport-https ca-certificates gnupg-agent software-properties-common wget https://download.docker.com/linux/ubuntu/gpg apt-key add gpg sudo apt-key fingerprint 0EBFCD88 sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable" apt update sudo apt-get install docker-ce docker-ce-cli containerd.io docker pull onosproject/onos * Start mininet (only OpenFlow10 seems to work) sudo mn --topo tree,2 --mac --switch ovsk,protocols=OpenFlow10 --controller remote,ip=172.17.0.2 * Start ONOS as specified in https://wiki.onosproject.org/display/ONOS/Single+Instance+Docker+deployment and make sure to activate the following apps: * 8 org.onosproject.drivers 2.4.0.SNAPSHOT Default Drivers * 26 org.onosproject.optical-model 2.4.0.SNAPSHOT Optical Network Model * 27 org.onosproject.openflow-base 2.4.0.SNAPSHOT OpenFlow Base Provider * 57 org.onosproject.netcfghostprovider 2.4.0.SNAPSHOT Network Config Host Provider * 60 org.onosproject.lldpprovider 2.4.0.SNAPSHOT LLDP Link Provider * 61 org.onosproject.hostprovider 2.4.0.SNAPSHOT Host Location Provider * 75 org.onosproject.openflow 2.4.0.SNAPSHOT OpenFlow Provider Suite * 107 org.onosproject.gui2 2.4.0.SNAPSHOT ONOS GUI2 * 136 org.onosproject.proxyarp 2.4.0.SNAPSHOT Proxy ARP/NDP * 158 org.onosproject.fwd 2.4.0.SNAPSHOT Reactive Forwarding * For example use: (password karaf) docker run -t -d -p 8181:8181 -p 8101:8101 -p 5005:5005 -p 830:830 --name onos onosproject/onos docker exec -it onos /bin/bash apt update apt install openssh-server ssh -p 8101 -o StrictHostKeyChecking=no karaf@localhost * Check the GUI (login: onos, password: rocks) at http://172.17.0.2:8181/onos/ui/#/topo2 * Activate reactive forwarding: app activate org.onosproject.fwd * Or play with intents https://wiki.onosproject.org/display/ONOS/Basic+ONOS+Tutorial: add-host-intent 00:00:00:00:00:01/None 00:00:00:00:00:04/None * Play with ONOS and mininet * Explore openflow or openvswitch * Study intents and reactive routing * Interconnect with iBGP speaker (sdn-ip) * Explore VPLS or VxLAN ===== - Routing with FRR ===== The lab environment is based on http://docs.frrouting.org/projects/dev-guide/en/latest/topotests.html. Topotests is a suite of topology tests for FRR built on top of Mininet. cd /home/user/frr/tests/topotests sudo pytest -s --topology-only mooc-lab1/mooc-lab1.py * Examples of adding MPLS encapsulation: on r1 ip route add 3.3.3.3/32 encap mpls 50000/8300 via 10.0.5.5 dev r1-eth1 on r3 ip route add 1.1.1.1/32 encap mpls 50000/8100 via 10.0.3.4 dev r3-eth1 {{::mooc-riv-frr-lab.png?600|}} * `mooc-lab2` implements Segment Routing http://docs.frrouting.org/projects/dev-guide/en/latest/ospf-sr.html. What works in the current platform: * IPv4 and IPv6 [tested] * OSPF and BGP [tested] * MPLS and LDP [tested] (with linux kernel, all features are accessible) * Segment Routing! [tested with node-sid et OSPF opaque LSA] * Think about updating FRR to get latest Segment routing features http://docs.frrouting.org/en/latest/pathd.html. PATH is a daemon that handles the installation and deletion of Segment Routing (SR) Policies. ===== - Docker Containers ===== Update the apt package index and install packages to allow apt to use a repository over HTTPS: $ sudo apt-get update $ sudo apt-get install \ apt-transport-https \ ca-certificates \ gnupg \ lsb-release Add Docker’s official GPG key: $ wget https://download.docker.com/linux/ubuntu/gpg -O key.txt $ sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg key.txt Use the following command to set up the stable repository echo \ "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null In order to solve the ''containered.io'' dependency problem, add the following line to the source file ''/etc/apt/sources.list'': deb http://security.ubuntu.com/ubuntu xenial-security main Update and install. $ sudo apt-get update $ sudo apt-get install containerd.io $ sudo apt-get install docker-ce docker-ce-cli