Davide Ganna
Davide Ganna

Reputation: 31

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:

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

Upvotes: 0

Views: 8393

Answers (2)

Davide Ganna
Davide Ganna

Reputation: 31

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

Upvotes: 1

jamo
jamo

Reputation: 752

do you have the openflowplugin features running on ODL? you can check from the karaf console with "feature:list -i | grep openflow"

you can also see if port 6633 is running on the ODL VM. something like "netstat -na | grep 6633"

see if you can open a connection from your mininet VM to the ODL IP and openflow port. I think it would be "nc 192.168.56.3 6633"

just a few ideas to troubleshoot, but since you can ping the ODL ip from your mininet VM, I'm guessing there is something wrong with connecting to the openflow port. so maybe it's not even open (feature not loaded, or blocked, etc)

Upvotes: 0

Related Questions