Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The OVA can be downloaded as described here: https://wiki.onosproject.org/display/ONOS/Basic+ONOS+Tutorial

1. Checkout SDN-IP tutorial codes under home directory:

$ svn export https://github.com/opennetworkinglab/onos/trunk/tools/tutorials/sdnip

2. Install bridge utilities:

$ sudo apt install bridge-utils

2. Install Quagga package:

$ sudo apt-get install quagga

3. Check the followings following requirements and adjust as required before running tutorial.py :
   a. run directory /var/run/quagga exists
   b. binary of zebra and bgpd installed under /usr/lib/quagga

4. As VM host has To peer Mininet host root 10.10.010.2 .0 assigned, IP subnets 10.0.x.x need to be changed to say 10.1.x.x. All relevant files in ~/sdnip should be changed accordingly.

$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.0.2.2 0.0.0.0 UG 0 0 0 enp0s3
10.0.2.0 0.0.0.0 255.255.255.0 U 0 0 0 enp0s3

with docker onos-1, the following network setup needs to be configured:


           bgp eth1 10.10.10.1        10.10.10.2 eth0 root

            +------------------------------------------+

                                                       |

                                                     sdnip

                                                    (bridge)

                                                       |

                                       10.10.10.3 eth1 +

                                                     onos-1

                                 ------------------+(docker)

                                  10.100.198.201 eth0


5. Therefore, onos-1 5. To peer Mininet host root 10.10.10.2 with onos-1, the latter should be assigned another IP say 10.10.10.3 . File and ~/sdnip/configs/quagga-sdn.conf should be changed accordingly:

neighbor 10.10.10.3 remote-as 65000
neighbor 10.10.10.3 port 2000
neighbor 10.10.10.3 timers connect 5

6. Create docker bridge:

$ docker network create --subnet 10.10.10.0/24 --ip-range 10.10.10.0/24 --gateway 10.10.10.2 sdnip

7. Note name of bridge created:

$ sudo brctl show
bridge name bridge id STP enabled interfaces
br-fb2a5d5b6f8e 8000.02428d00da0a no veth71fb89a
docker0 8000.024231751c7f no veth1289400
veth46bdbff
veth8b25d1d
veth8c5706a
vethad2fb3e
vethbb09655


8. Attach onos-1 to docker bridge:

$ docker network connect --ip 10.10.10.3 sdnip onos-1

9. Verify additional network interface is created for onos-1:

$ docker exec onos-1 ifconfig -a

10. Run tutorial.py as follows:

$ sudo mn --custom /home/sdn/sdnip/tutorial.py --topo sdnip --controller remote,172.17.0.5 --nolistenport

11. Add mininet network interface of Mininet host root to docker bridge:

$ sudo brctl addif br-fb2a5d5b6f8e root-eth0

12. Upload network configuration to onos-1:

$ curl --user onos:rocks -X POST -H "Content-Type: application/json" http://172.17.0.5:8181/onos/v1/network/configuration/ -d @/home/sdn/sdnip/configs/network-cfg.json

13. Activate ONOS application applications required:

onos> app activate org.onosproject.config

onos> app activate org.onosproject.proxyarp

onos> app activate org.onosproject.sdnip

14. Check BGP detailsresults:

onos> bgp-speakers
speaker1: port=of:00000000000000a3/1, vlan=None, peers=[10.10.1.1, 10.10.2.1, 10.10.3.1, 10.10.4.1]
onos> bgp-neighbors
BGP neighbor is 10.10.10.1, remote AS 65000, local AS 65000
Remote router ID 10.10.10.1, IP /10.10.10.1:47348, BGP version 4, Hold time 9
Remote AFI/SAFI IPv4 Unicast YES Multicast NO, IPv6 Unicast NO Multicast NO
Local router ID 10.10.10.3, IP /10.10.10.3:2000, BGP version 4, Hold time 9
Local AFI/SAFI IPv4 Unicast YES Multicast NO, IPv6 Unicast NO Multicast NO
4 Octet AS Capability: Advertised Received
onos> bgp-routes
Network Next Hop Origin LocalPref MED BGP-ID
192.168.3.0/24 10.10.3.1 IGP 100 0 10.10.10.1
AsPath 65003
192.168.2.0/24 10.10.2.1 IGP 100 0 10.10.10.1
AsPath 65002
192.168.1.0/24 10.10.1.1 IGP 100 0 10.10.10.1
AsPath 65001
Total BGP IPv4 routes = 3

Network Next Hop Origin LocalPref MED BGP-ID
Total BGP IPv6 routes = 0

15.  Test Mininet topology reachability:

mininet> pingall

*** Ping: testing ping reachability

bgp -> X X X X X X X X root

h1 -> X h2 h3 X X X X X X

h2 -> X h1 h3 X X X X X X

h3 -> X h1 h2 X X X X X X

h4 -> X X X X X X X X X

r1 -> bgp h1 X X X X X X X

r2 -> X X h2 X X X X X X

r3 -> X X X h3 X X X X X

r4 -> X X X X h4 X X X X

root -> X X X X X X X X X

*** Results: 86% dropped (12/90 received)