Versions Compared

Key

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

...

Email us if you’re stuck, think you’ve found a bug, or just want to send some feedback. Please have a look at the guidelines to learn how to efficiently submit a bug report.

Setup your environment

Install required

...

software

You will need to acquire two files: a VirtualBox installer and the Tutorial VM. 

...

or more information about an individual command adding --help to any command.

...

Devices command

 The links command is used to list the links detected by ONOS. At the ONOS prompt run

Code Block
links

An SDN Controller would be nothing without devices to control. Luckily, ONOS has a convenient command to list the device currently known in the system. Running

Code Block
devices

will return the following information,and you should get the following output:

Code Block
onos> linksdevices
srcid=of:000000000000000e/10000000000000001, available=true, dst=of:0000000000000001/5role=MASTER, type=DIRECT
src=of:000000000000000d/1, dst=of:0000000000000001/4, type=DIRECT
src=of:000000000000000e/2, dst=of:0000000000000002/5, type=DIRECT
src=of:000000000000000c/1, dst=of:0000000000000001/3, type=DIRECT
src=of:000000000000000d/2, dst=of:0000000000000002/4, type=DIRECT
src=of:000000000000000b/1, dst=of:0000000000000001/2, type=DIRECT
src=of:000000000000000c/2, dst=of:0000000000000002/3, type=DIRECT
src=of:000000000000000b/2, dst=of:0000000000000002/2, type=DIRECT
src=of:0000000000000002/2, dst=of:000000000000000b/2, type=DIRECT
src=of:0000000000000002/3, dst=of:000000000000000c/2, type=DIRECT
src=of:0000000000000001/2, dst=of:000000000000000b/1, type=DIRECT
src=of:0000000000000002/4, dst=of:000000000000000d/2, type=DIRECT
src=of:0000000000000001/3, dst=of:000000000000000c/1, type=DIRECT
src=of:0000000000000002/5, dst=of:000000000000000e/2, type=DIRECT
src=of:0000000000000001/4, dst=of:000000000000000d/1, type=DIRECT
src=of:0000000000000001/5, dst=of:000000000000000e/1, type=DIRECT
src=of:0000000000000002/1, dst=of:0000000000000001/1, type=DIRECT
src=of:0000000000000002/2, dst=of:0000000000000001/2, type=DIRECT
src=of:0000000000000001/1, dst=of:0000000000000002/1, type=DIRECT
src=of:0000000000000001/2, dst=of:0000000000000002/2, type=DIRECT=SWITCH, mfr=Nicira Networks, Inc., hw=Open vSwitch, sw=1.4.6, serial=None
id=of:0000000000000002, available=true, role=MASTER, type=SWITCH, mfr=Nicira Networks, Inc., hw=Open vSwitch, sw=1.4.6, serial=None
id=of:000000000000000b, available=true, role=MASTER, type=SWITCH, mfr=Nicira Networks, Inc., hw=Open vSwitch, sw=1.4.6, serial=None
id=of:000000000000000c, available=true, role=MASTER, type=SWITCH, mfr=Nicira Networks, Inc., hw=Open vSwitch, sw=1.4.6, serial=None
id=of:000000000000000d, available=true, role=MASTER, type=SWITCH, mfr=Nicira Networks, Inc., hw=Open vSwitch, sw=1.4.6, serial=None
id=of:000000000000000e, available=true, role=MASTER, type=SWITCH, mfr=Nicira Networks, Inc., hw=Open vSwitch, sw=1.4.6, serial=None

which consists of a device id, and a boolean value which indicates whether this devices is currently up. You also get the type of device and well as it's role relationship with this ONOS instance.

Links command

 The links command is used to list the links detected by ONOS. At the ONOS prompt run

Code Block
links

and you should get the following output:

Code Block
onos> links
src=of:000000000000000e/1, dst=of:0000000000000001/5, type=DIRECT
src=of:000000000000000d/1, dst=of:0000000000000001/4, type=DIRECT
src=of:000000000000000e/2, dst=of:0000000000000002/5, type=DIRECT
src=of:000000000000000c/1, dst=of:0000000000000001/3, type=DIRECT
src=of:000000000000000d/2, dst=of:0000000000000002/4, type=DIRECT
src=of:000000000000000b/1, dst=of:0000000000000001/2, type=DIRECT
src=of:000000000000000c/2, dst=of:0000000000000002/3, type=DIRECT
src=of:000000000000000b/2, dst=of:0000000000000002/2, type=DIRECT
src=of:0000000000000002/2, dst=of:000000000000000b/2, type=DIRECT
src=of:0000000000000002/3, dst=of:000000000000000c/2, type=DIRECT
src=of:0000000000000001/2, dst=of:000000000000000b/1, type=DIRECT
src=of:0000000000000002/4, dst=of:000000000000000d/2, type=DIRECT
src=of:0000000000000001/3, dst=of:000000000000000c/1, type=DIRECT
src=of:0000000000000002/5, dst=of:000000000000000e/2, type=DIRECT
src=of:0000000000000001/4, dst=of:000000000000000d/1, type=DIRECT
src=of:0000000000000001/5, dst=of:000000000000000e/1, type=DIRECT
src=of:0000000000000002/1, dst=of:0000000000000001/1, type=DIRECT
src=of:0000000000000002/2, dst=of:0000000000000001/2, type=DIRECT
src=of:0000000000000001/1, dst=of:0000000000000002/1, type=DIRECT
src=of:0000000000000001/2, dst=of:0000000000000002/2, type=DIRECT

The output show you the list of discovered links. Reported links are formatted by source device-port pair to destination device-port pair. The 'type' field indicates whether the link is a direct connection between two devices or not. 

 Hosts command

A network without hosts is a little like a city without bars, it would be a ridiculously boring place. Fortunately, ONOS has the ability to list the hosts (as opposed to bars, although that would be a great feature) currently in the system.

Code Block
hosts

with this output:

Code Block
onos> hosts
id=00:00:00:00:00:01/-1, mac=00:00:00:00:00:01, location=of:000000000000000b/3, vlan=-1, ip(s)=[10.0.0.1]
id=00:00:00:00:00:02/-1, mac=00:00:00:00:00:02, location=of:000000000000000b/4, vlan=-1, ip(s)=[10.0.0.2]
id=00:00:00:00:00:03/-1, mac=00:00:00:00:00:03, location=of:000000000000000b/5, vlan=-1, ip(s)=[10.0.0.3]
id=00:00:00:00:00:04/-1, mac=00:00:00:00:00:04, location=of:000000000000000b/6, vlan=-1, ip(s)=[10.0.0.4]
id=00:00:00:00:00:05/-1, mac=00:00:00:00:00:05, location=of:000000000000000b/7, vlan=-1, ip(s)=[10.0.0.5]
id=00:00:00:00:00:06/-1, mac=00:00:00:00:00:06, location=of:000000000000000b/8, vlan=-1, ip(s)=[10.0.0.6]
id=00:00:00:00:00:07/-1, mac=00:00:00:00:00:07, location=of:000000000000000c/3, vlan=-1, ip(s)=[10.0.0.7]
id=00:00:00:00:00:08/-1, mac=00:00:00:00:00:08, location=of:000000000000000c/4, vlan=-1, ip(s)=[10.0.0.8]
id=00:00:00:00:00:09/-1, mac=00:00:00:00:00:09, location=of:000000000000000c/5, vlan=-1, ip(s)=[10.0.0.9]
id=00:00:00:00:00:0A/-1, mac=00:00:00:00:00:0A, location=of:000000000000000c/6, vlan=-1, ip(s)=[10.0.0.10]
id=00:00:00:00:00:0B/-1, mac=00:00:00:00:00:0B, location=of:000000000000000c/7, vlan=-1, ip(s)=[10.0.0.11]
id=00:00:00:00:00:0C/-1, mac=00:00:00:00:00:0C, location=of:000000000000000c/8, vlan=-1, ip(s)=[10.0.0.12]
id=00:00:00:00:00:0D/-1, mac=00:00:00:00:00:0D, location=of:000000000000000d/3, vlan=-1, ip(s)=[10.0.0.13]
id=00:00:00:00:00:0E/-1, mac=00:00:00:00:00:0E, location=of:000000000000000d/4, vlan=-1, ip(s)=[10.0.0.14]
id=00:00:00:00:00:0F/-1, mac=00:00:00:00:00:0F, location=of:000000000000000d/5, vlan=-1, ip(s)=[10.0.0.15]
id=00:00:00:00:00:10/-1, mac=00:00:00:00:00:10, location=of:000000000000000d/6, vlan=-1, ip(s)=[10.0.0.16]
id=00:00:00:00:00:11/-1, mac=00:00:00:00:00:11, location=of:000000000000000d/7, vlan=-1, ip(s)=[10.0.0.17]
id=00:00:00:00:00:12/-1, mac=00:00:00:00:00:12, location=of:000000000000000d/8, vlan=-1, ip(s)=[10.0.0.18]
id=00:00:00:00:00:13/-1, mac=00:00:00:00:00:13, location=of:000000000000000e/3, vlan=-1, ip(s)=[10.0.0.19]
id=00:00:00:00:00:14/-1, mac=00:00:00:00:00:14, location=of:000000000000000e/4, vlan=-1, ip(s)=[10.0.0.20]
id=00:00:00:00:00:15/-1, mac=00:00:00:00:00:15, location=of:000000000000000e/5, vlan=-1, ip(s)=[10.0.0.21]
id=00:00:00:00:00:16/-1, mac=00:00:00:00:00:16, location=of:000000000000000e/6, vlan=-1, ip(s)=[10.0.0.22]
id=00:00:00:00:00:17/-1, mac=00:00:00:00:00:17, location=of:000000000000000e/7, vlan=-1, ip(s)=[10.0.0.23]
id=00:00:00:00:00:18/-1, mac=00:00:00:00:00:18, location=of:000000000000000e/8, vlan=-1, ip(s)=[10.0.0.24]

Which displays the hosts' id as well as its mac address and where in the network it is connected. 

Flows command

 The output show you the list of