Date: Fri, 29 Mar 2024 00:28:59 +0000 (UTC) Message-ID: <1855360343.937.1711672139035@ip-10-30-146-46.us-west-2.compute.internal> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_936_10118265.1711672139033" ------=_Part_936_10118265.1711672139033 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
mn
command line options do?--custom onos.py
: uses =
onos.py
to extend Mininet with new controller and switch =
types as well as a customized CLI
--controller onos,3
: tells M=
ininet to start up an ONOS controller cluster with 3 ONOS nodes
--topo torus,4,4
: tells Mini=
net to use a 4x4 torus topology for the data network
By default, it uses Open vSwitch. onos.py
&nb=
sp;replaces Mininet's default
switch with a new swit=
ch class called ONOSOVSSwitch
or --switch=
onosovs
. This switch class knows how to connect to an ONOS cluster =
with multiple IP addresses.
In order to select the user switch (either Stanford reference switch or = CPqD switch, depending on which one you have installed), you can use <= code>--switch onosuser.
mn
command, writing Mininet scripts, etc.?There are lots of things you can do with Mininet, including customizing = your data network topology, setting link parameters, etc..
For more information on Mininet, please check out http://docs.min= inet.org
For now, try using ONOS_APPS
or connecting to the=
karaf
console and using ONOS CLI commands.
# As ro= ot: ONOS_APPS=3Ddrivers,openflow,fwd,proxyarp,mobility mn --custom onos.py --co= ntroller onos,3 --topo tree,3,3 # or (using sudo): sudo env ONOS_APPS=3Ddrivers,openflow,fwd,proxyarp,mobility mn --custom ono= s.py --controller onos,3 --topo tree,3,3 # or ONOS_APPS=3Ddrivers,openflow,fwd,proxyarp,mobility sudo -E mn --custom onos= .py --controller onos,3 --topo tree,3,3
Note that sudo
clears environment variables by de=
fault, but the ONOS_APPS
environment variable must b=
e set in order for mn
to read it.
In the future, there should be an option to --controller onos=
and/or ONOSCluster()
.
--controller onos
and ONOSCluster()
&=
nbsp;take an ipBase
option; the default is
You can change it by passing in a new option to mn
&nbs=
p;or to ONOSCluster()
:
sudo mn= --custom onos.py --controller onos,3,ipBase=3D172.1.2.0/24 --topo tree,3,3=
There are several ways of doing it - you can use the one which works bes=
t for you. Here are four equivalent ways of invoking the onos:ap=
ps
command:
mininet= -onos> onos:apps mininet-onos> onos :apps mininet-onos> onos onos:apps mininet-onos> onos1 client onos:apps
The first two methods can be used for executing any commands that begin =
with "onos:
".
The last two methods can be used to execute any karaf command.
The final method can be used to run client on a specific ONOS instance (= and connect to that instance.)
mininet-o=
nos>
prompt?mininet= -onos> onos
press control-D
to return to the minin=
et-onos>
prompt.
ssh
?From a bash/shell prompt inside the Mininet VM&nbs= p;itself:
ssh -p = 8101 karaf@192.168.123.1 # replace with the IP address of onos1 if it is d= ifferent
In this example, 8101
is the k=
araf port, and 192.168.123.1
is the IP =
address of onos1
.
From outside of the Mininet VM (e.g. from= the VM server):
ssh -p = 8101 karaf@<VM's IP address> # replace with the IP address of your V= M (the one you can ssh into)
Warning! Connecting to ONOS using kara= f's client is deprecated.
This method is deprecated and may only work with older ONOS versions. Fo=
r newer ONOS versions, you should connect using ssh
.
Make sure karaf's bin/
directory is in your path,=
then:
client = -h 192.168.123.1 # or the address of the ONOS node you wish to connect to=
Since ONOS is running on Mininet hosts inside the VM, connecting to the = GUI is usually done in one of two ways:
One relatively foolproof way is to run a browser inside the=
VM. Install a GUI in your VM if you haven't already (sudo a=
pt-get install lxde
and reboot), and then run a web browser poi=
nted to the IP address of the ONOS node you want to talk to (for onos1, the=
default will be http://192.168.123.1:8181/onos/ui=
a>
). For the GUI to work well, you will want to make sure you'=
ve installed the appropriate VM support tools (such as virtualbox tools or =
VMware tools) for your virtualization platform.
A second (and probably more enjoyable) way is to use a brow=
ser on your client machine or server where the VM is running,=
as long as you have connectivity to the VM (make sure you can ping its IP =
address and/or connect to it using ssh
, and make sure tha=
t it the ports on your VM aren't being blocked by a firewall.)
By default, onos.py
automatically forward=
s connections to the Mininet VM/server to the appropriate ONO=
S instance.
Service | VM port to connect to |
---|---|
GUI/REST | 8181 (onos1 ), 8182 (onos2) ... |
Karaf via ssh |
8101 (onos1 ), 8102 (onos2) ... |
OpenFlow | 6653 (onos1 ), 6654 (onos2) ... |
So if you are using a VM whose IP address is 192.168.x.y, to connect to the GUI on ONOS1, you would use the URL
http://192.168.x.y:8181/onos/ui/
Use the correct IP address!
You need to use the real, correct IP address for your VM - the address <= code>192.168.x.y is obviously not a real IP address!
If you are using VirtualBox, you will probably need to add a host-only i=
nterface to your VM and you may even need to run dhclient
=
to make sure that that interface has an IP address. You can also set =
up port forwarding on a single interface - in this case you will want to ma=
ke sure that it is set up for every port you wish to connect to (e.g. =
8181
for the GUI on onos1
.)
Usually karaf/karaf
(or sometimes onos=
/rocks
)
onos.py
should also respect the values of O=
NOS_WEB_USER
and ONOS_WEB_PASS
.
onos.py
to control an external =
hardware (or virtual) network?Yes you can! Simply use --topo none
. For example=
:
mn --cu= stom onos.py --controller onos,3 --topo none
onos.py
will forward the ports (e.g. 6653=
code>,
6654
, 6655
) appropriately as des=
cribed above. Your Mininet VM or server will have to be reachable from the =
switches' management network, and you will need to configure your switches =
to connect to you ONOS nodes: the address of each node will be the VM's IP =
address, and the port will be the appropriate forwarded OpenFlow port.