Search code examples
opendaylightmininet

Unable to contact the remote controller at 192.168.56.3


Good morning,

I want to set up OpenDayLight SDN Controller and Mininet in VirtualBox. So far I installed both and got them running. My interfaces are:

  • 1 NAT
  • 1 Host Only Adapter

for both the VMs. The Host only adapter has an IP address of 192.168.56.1. OpenDayLight VM receives 192.168.56.3, Mininet VM receives 192.168.56.4.

I am able to ping the two VMs. What I can't do is creating a simple test topology with the command:

sudo mn --topo linear,3 --mac --controller=remote,ip=192.168.56.3,port=6633 --switch ovs,protocols=OpenFlow13

In fact, running it causes this error:

mininet@mininet-vm:~$ sudo mn --topo linear,3 --mac --controller=remote,ip=192.168.56.3,port=6633 --switch ovs,protocols=OpenFlow13
*** Creating network
*** Adding controller
Unable to contact the remote controller at 192.168.56.3:6633
*** Adding hosts:
h1 h2 h3
*** Adding switches:
s1 s2 s3
*** Adding links:
(h1, s1) (h2, s2) (h3, s3) (s2, s1) (s3, s2)
*** Configuring hosts
h1 h2 h3
*** Starting controller
c0
*** Starting 3 switches
s1 s2 s3 ...
*** Starting CLI:
mininet>

From the main site:

Important troubleshooting - if you are running VirtualBox on the same host/desktop where the controller is running, and trying to start the virtual network on Mininet VM produces this error: "Unable to contact the remote controller at ...", then the following resolves the problem:

In VirtualBox, go to File-Preferences-Network and make sure you have at least one interface defined as Host-Only. Lets say its name is vboxnet0

In VirtualBox - Mininet Vm - Settings - Network, check that the adapter is of type Host only , and is connected to the interface from item 1 (vboxnet0)

On your host where controller and VirtualBox run, do "ifconfig" command to display all network interfaces on the machine.

Search for the interface as in item 1 (vboxnet0 in our example) Take the ip address specified there (most probably 192.168.56.1 - default), and that is the correct remote controller ip address to use when starting a virtual network in mininet vm as stated in the example above (--controller=remote,ip=192.168.56.1) .

If you are still not able to connect, you might want to consider temporarily disabling firewall on the host running the controller (on Linux, for example, iptables -F will do the job)

Sometimes, the way you start the mininet is a problem, it does not give error, but does not connect to the remote server. Here is a wrong example:

sudo mn --topo=tree,3 --mac --switch=ovsk --controller=remote, ip=192.168.16.10

Here is the correct example:

sudo mn --topo=tree,3 --mac --switch=ovsk --controller=remote,ip=192.168.16.10

The difference is the "SPACE" between "remote," and "ip".

I don't see what I miss.

Thank you in advance,

Davide


Solution

  • I finally managed to fix that. sudo ufw disable both on mininet and ODL solved the issue. Thanks again jamo for the hint.