...
We configured the VM to automatically bring up 3 ONOS instances using LXC containers. They are already configured to form an ONOS cluster. To access its CLI type:
Code Block |
---|
$ onos -w $OC1
Logging in as karaf
Welcome to Open Network Operating System (ONOS)!
____ _ ______ ____
/ __ \/ |/ / __ \/ __/
/ /_/ / / /_/ /\ \
\____/_/|_/\____/___/
Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown ONOS.
onos> |
This command may take a while to return. After you see the ONOS CLI, make sure the correct apps are running and the ONOS cluster is formed correctly:
...
Code Block |
---|
{ "comment": " Multilayer topology description and configuration", "restrictSwitches": true, "restrictLinks": true, "switchConfig": [ { "nodeDpid" : "of:0000000000000001", "name": "Leaf-R1", "type": "Router_SR", "allowed": true, "latitude": 80.80, "longitude": 90.10, "params": { "routerIp": "10.0.1.101/32", "routerMac": "00:00:00:00:01:80", "nodeSid": 101, "isEdgeRouter" : true, "subnets": [ { "portNo": 1, "subnetIp": "10.0.1.254/24" } ] } }, { "nodeDpid": "of:0000000000000002", "name": "Leaf-R2", "type": "Router_SR", "allowed": true, "latitude": 80.80, "longitude": 90.10, "params": { "routerIp": "10.0.2.101/32", "routerMac": "00:00:00:00:02:80", "nodeSid": 102, "isEdgeRouter" : true, "subnets": [ { "portNo": 1, "subnetIp": "10.0.2.254/24" } ] } }, { "nodeDpid": "of:0000000000000191", "name": "Spine-R1", "type": "Router_SR", "allowed": true, "latitude": 80.80, "longitude": 90.10, "params": { "routerIp": "192.168.0.11/32", "routerMac": "00:00:01:00:11:80", "nodeSid": 105, "isEdgeRouter" : false 105, } "isEdgeRouter" : false }, { "nodeDpid": "of:0000000000000192", "name": "Spine-R2", "type": "Router_SR", "allowed": true, } "latitude": 80.80, "longitude": 90.10, }, { "paramsnodeDpid": {"of:0000000000000192", "routerIpname": "192.168.0.22/32Spine-R2", "type": "Router_SR", "allowed": true, "latitude": 80.80, "routerMaclongitude": "00:00:01:00:22:80"90.10, "params": { "nodeSid": 106"routerIp": "192.168.0.22/32", "isEdgeRouterrouterMac": "00:00:01:00:22:80", false } "nodeSid": 106, } ] |
Let's start the mininet topology:
Code Block |
---|
$ sudo -s #./cord_fabric.py mininet> h1 ifconfig h1-eth0 Link encap:Ethernet HWaddr 3a:b6:fe:90:0d:4f "isEdgeRouter" : false inet addr:10.0.1.1 Bcast:10.0.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 } RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 } ] |
Let's start the mininet topology:
Code Block |
---|
$ sudo -s
# ./cord_fabric.py |
Notice h1 has IP 10.0.1.1 and its gateway to the outside world is 10.0.1.254, a interface of the Leaf Router 1.
Code Block |
---|
mininet> h1 ifconfig h1-eth0 Link encap:Ethernet HWaddr 3a:b6:fe:90:0d:4f RXinet bytes:0 (0.0 B) TX bytes:0 (0.0 B) |
...
addr:10.0.1.1 |
...
Bcast:10.0 |
...
.1. |
...
Code Block |
---|
mininet>255 h1 ifconfig h1-eth0 Link encap:Ethernet HWaddr 3a:b6:fe:90:0d:4f Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 inetTX addrpackets:10.0.1.1 Bcast:10.0.1.255 Mask:255.255.255.0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 UP BROADCAST RUNNING MULTICAST MTU:1500 RX Metricbytes:1 0 (0.0 B) TX bytes:0 (0.0 B) mininet> h1 ip route default RXvia packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) mininet> h1 ip route default via10.0.1.254 dev h1-eth0 10.0.1.0/24 dev h1-eth0 proto kernel scope link src 10.0.1.1 |
Let's try to ping that interface.
Code Block |
---|
mininet> h1 ping 10.0.1.254 PING 10.0.1.254 (10.0.1.254) 56(84) bytes of data. 64 bytes from 10.0.1.254: icmp_seq=1 ttl=64 time=26.7 ms 64 bytes from 10.0.1.254: icmp_seq=2 ttl=64 time=5.18 ms 64 bytes from 10.0.1.254: icmp_seq=3 ttl=64 time=6.69 ms 64 bytes from 10.0.1.254 dev h1-eth0 : icmp_seq=4 ttl=64 time=6.94 ms |
Verify, h4 has IP 10.0.
...
2.2 and its network gateway is 10.0
...
.2.254, on the Leaf Router 2.
Now let's verify connectivity between the two hosts:Let's try to ping that interface.
Code Block |
---|
mininet> h1 ping 10.0.1.254h4 PING 10.0.12.2542 (10.0.12.2542) 56(84) bytes of data. 64 bytes from 10.0.1.254: icmp_seq=1 ttl=64 time=26.7 ms of data. 64 bytes from 10.0.12.2542: icmp_seq=21 ttl=6463 time=5.18115 ms 64 bytes from 10.0.12.2542: icmp_seq=32 ttl=6463 time=63.6914 ms 64 bytes from 10.0.12.2542: icmp_seq=43 ttl=6463 time=63.9407 ms |
...
64 bytes from 10.0.2.2 |
...
: icmp_seq=4 ttl=63 time=2.13 ms |
4 - Understand Segment Routing
The following figure describes the Segment Routing topology.
- Add figure here
...
Notice that each Each Router is identified by a Label. The edge routers will encapsulate IP traffic with the MPLS label associated to the destination of the packet.
...
A tunnel is defined as a set of LABELS, defining the path taken by a flow.a flow. The following command instantiate a tunnel called FASTPATH through the routers 101, 105, and 102 in that order.
Code Block |
---|
onos> srtunnel-add FASTPATH 101,105,102 |
Then, a policy can be applied to a subset of traffic, for example, policy1 = tcp_port=80 >> fwd( TUNNEL_1)
The following figure describes the Segment Routing topology.
- Add figure here
...
Code Block |
---|
onos> srpolicy-add p1 1000 10.0.1.1/24 80 10.0.2.2/24 80 TCP TUNNEL_FLOW FASTPATH |
5 - GUI
6 - Topology
Now let's try a bigger topology.
...