title: Unable to contact the remote controller at 192.168.56.3
body: <p>Good morning,</p>
  
  <p>I want to set up OpenDayLight SDN Controller and Mininet in VirtualBox. So far I installed both and got them running.
  My interfaces are:</p>
  
  <ul>
  <li>1 NAT  </li>
  <li>1 Host Only Adapter</li>
  </ul>
  
  <p>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.</p>
  
  <p>I am able to ping the two VMs. What I can't do is creating a simple test topology with the command: </p>
  
  <pre><code>sudo mn --topo linear,3 --mac --controller=remote,ip=192.168.56.3,port=6633 --switch ovs,protocols=OpenFlow13
  </code></pre>
  
  <p>In fact, running it causes this error:</p>
  
  <pre><code>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&gt;
  </code></pre>
  
  <p>From the main site:</p>
  
  <blockquote>
    <p>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:</p>
    
    <p>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</p>
    
    <p>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)</p>
    
    <p>On your host where controller and VirtualBox run, do "ifconfig"
    command to display all network interfaces on the machine.</p>
    
    <p>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) .</p>
    
    <p>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)</p>
    
    <p>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:</p>
    
    <p>sudo mn --topo=tree,3 --mac --switch=ovsk --controller=remote,
    ip=192.168.16.10</p>
    
    <p>Here is the correct example:</p>
    
    <p>sudo mn --topo=tree,3 --mac --switch=ovsk
    --controller=remote,ip=192.168.16.10</p>
    
    <p>The difference is the "SPACE" between "remote," and "ip".</p>
  </blockquote>
  
  <p>I don't see what I miss.</p>
  
  <p>Thank you in advance,</p>
  
  <p>Davide</p>