wikiroute

networking recipes

User Tools

Site Tools


mooc-riv-labs

This is an old revision of the document!


Lab Notes for RIV MOOC

1. 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 (use OpenFlow10 for compatibility with ovsctl commands)
sudo mn --topo tree,2 --mac --switch ovsk,protocols=OpenFlow13 --controller remote,ip=172.17.0.2
*   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
app activate org.onosproject.fwd
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

2. 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

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]

3. 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
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

$ sudo apt-get install docker-ce docker-ce-cli containerd.io

mooc-riv-labs.1631020523.txt.gz · Last modified: 2021/09/07 15:15 by samer