- Install docker on each VM
- Install OVS on each VM
sudo apt install openvswitch-switch
sudo apt install ovn-common
- Install ONOS on each VM
sudo docker pull onosproject/onos
based on Open Virtual Networking With Docker.
- Create bridge interface
sudo ovs-vsctl add-br ovs-br1
- Provide ip address to host ovs-br1 bridge
sudo ifconfig ovs-br1 173.16.1.1 netmask 255.255.255.0 up
- Create docker instances
sudo docker run -t -i --name container1 1995parham/ubuntu-network /bin/bash
sudo docker run -t -i --name container2 1995parham/ubuntu-network /bin/bash
- Connect them together and VSwitch
sudo ovs-docker add-port ovs-br1 eth1 container1 --ipaddress=173.16.1.2/24
sudo ovs-docker add-port ovs-br1 eth1 container2 --ipaddress=173.16.1.3/24
- Turn the OpenFlow on
sudo ovs-vsctl set-controller br0 tcp:`docker-ip onos-1`:6653
based on Configuring VXLAN and GRE Tunnels on OpenvSwitch
- Create bridge interface
sudo ovs-vsctl add-br ovs-br1
- Create tunnels 😂
sudo ovs-vsctl add-port ovs-br1 vx1 -- set interface vx1 type=vxlan options:remote_ip=?
based on Running the published Docker ONOS images.
- Run your docker image
$ sudo docker run -t -d --name onos1 onosproject/onos
<cid>
$ sudo docker run -t -d --name onos2 onosproject/onos
<cid>
$ sudo docker run -t -d --name onos3 onosproject/onos
<cid>
- Cluster-ize your instances
# Forms ONOS cluster using REST API of each separate instance.
wget https://raw.githubusercontent.com/opennetworkinglab/onos/master/tools/package/bin/onos-form-cluster
chmod u+x onos-form-cluster
./onos-form-cluster -u karaf -p karaf `docker-ip onos1` `docker-ip onos2` `docker-ip onos3`
- Connect to your ONOS !
ssh -p 8101 karaf@`docekr-ip onso3`
Protocol | Port |
---|---|
SSH | 8101 |
HTTP | 8181 |
We want to create 3 containers that thier network chains together.
- Create docker network if necessary
sudo docker netowrk create --driver=bridge bridge-name
- Create a normal container in each subnet
sudo docker run -ti --rm --name=c1 ubuntu
sudo docker run -ti --rm --name=c3 --network=bridge ubuntu
- Create middlebox container
sudo docker build --no-cache -t middlebox containers/middlebox
sudo docker run -ti --rm --name=c2 middlebox eth0