Page 1 of 1

Connecting to remote machine with autoconfiguration address

Posted: 16. Apr 2015, 09:22
by mwatts
Hi all,

I am having some trouble getting a Ubuntu 12 guest OS to connect to a remote machine. The host is Windows 7 64bit. I am running the latest version of VirtualBox. The machine I want to be able to reach from the guest is directly connected to the host on the ethernet adapter with an autoconfiguration address.

Connectivity between host and remote machine is fine.

The windows 7 ipconfig returns the following:

Code: Select all

Ethernet adapter Local Area Connection:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::471:2423:4b12:6cbe%13
   Autoconfiguration IPv4 Address. . : 169.254.108.190
   Subnet Mask . . . . . . . . . . . : 255.255.0.0
   Default Gateway . . . . . . . . . :

Ethernet adapter VirtualBox Host-Only Network:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::6f:81c6:ebf2:6598%17
   Autoconfiguration IPv4 Address. . : 169.254.101.152
   Subnet Mask . . . . . . . . . . . : 255.255.0.0
   Default Gateway . . . . . . . . . :

Wireless LAN adapter Wireless Network Connection:

   Connection-specific DNS Suffix  . : mynet.local
   Link-local IPv6 Address . . . . . : fe80::355b:2c1:3d23:3782%14
   IPv4 Address. . . . . . . . . . . : 10.10.2.95
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 10.10.2.254
The remote machine is on 169.254.103.68.

It seems that VirtualBox does not see the local area connection as a valid route. Even when the wireless adapter is turned of.

I am probably approaching this problem from completely the wrong angle, but I have run out of idea's and Google isn't helping much either... :(

FYI: I can't reconfigure the remote machine to run on a different ip address or to connect to our LAN.

Any help greatly appreciated.

Re: Connecting to remote machine with autoconfiguration addr

Posted: 16. Apr 2015, 13:46
by scottgus1
What for of network connection is in your guest network settings? NAT? Bridged? I'd try Bridged myself.

Edit - must have been tired - should have been "What kind of network"

Re: Connecting to remote machine with autoconfiguration addr

Posted: 20. Apr 2015, 10:16
by mwatts
I've tried bridged connection too. The client is running ubuntu 12, and I configured a static ip by setting the connection from DHCP to Link-Local-Only. This is what ifconfig returns:

Code: Select all

eth2      Link encap:Ethernet  HWaddr 08:00:27:2c:aa:c3  
          inet addr:169.254.8.74  Bcast:169.254.255.255  Mask:255.255.0.0
          inet6 addr: fe80::a00:27ff:fe2c:aac3/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:43 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:8070 (8.0 KB)
And this is the output from netstat:

Code: Select all

peter@ubuntu32:~$ netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth2
224.0.0.0       0.0.0.0         240.0.0.0       U         0 0          0 eth2
However, pinging the remote machine from the guest still does not work:

Code: Select all

peter@ubuntu32:~$ ping 169.254.103.68
PING 169.254.103.68 (169.254.103.68) 56(84) bytes of data.
From 169.254.8.74 icmp_seq=1 Destination Host Unreachable
From 169.254.8.74 icmp_seq=2 Destination Host Unreachable
From 169.254.8.74 icmp_seq=3 Destination Host Unreachable

Re: Connecting to remote machine with autoconfiguration addr

Posted: 20. Apr 2015, 16:07
by scottgus1
Not being much of a Linux guy yet, I'm not sure what to look for in the IP data you posted, unfortunately.

You'll have two things to consider in your desired network arrangements. Getting Virtualbox to connect things correctly, and getting the OS's to communicate. Getting Virtualbox set up right is what we can do in the forum here. After that, you'll need to use the OS help system and forums to get things further set up.

One thing to remember is that more modern OS's may default to not accepting pings. You'll have to open the firewall within the OS to respond to pings (Windows calls them ICMP requests, I think).

To the best of my knowledge, Bridged networking in Virtualbox makes the guests appear to the network as if the guests are just another computer on the network. Bridged just wires up the guests to the host network. It doesn't give any IP addresses out - your have to have a DHCP server running or assign static IP addresses in the various OS's in the network PC's and the guests. So once you set to Bridged, all the computers should be able to see each other.

If your network doesn't have a DHCP server running, you need to set a static IP in each computer's OS, make sure ping is allowed through the OS firewall, and you should be able to ping. How to set these things up is specific to the flavor of OS, and should be done using the OS's documentation and forums.

Re: Connecting to remote machine with autoconfiguration addr

Posted: 21. Apr 2015, 02:11
by BillG
APIPA addresses (169.254.etc) are not routable, so you can only connect to them on a directly-connected network, and then only from another machine with an APIPA address. (Nothing to do with VirtualBox).

Re: Connecting to remote machine with autoconfiguration addr

Posted: 21. Apr 2015, 13:29
by scottgus1
Curious, here, Bill. OP's host, guest, and other PC all seem to have APIPA addresses. You mention APIPA addresses aren't routable. In a Bridged network configuration, theoretically connecting host, guest, and other PC together, is there something that "routes" the packets from the guest, therefore causing the APIPA packets from the guest to be lost?

If so, the solution is to stop using APIPA, I guess...

Re: Connecting to remote machine with autoconfiguration addr

Posted: 22. Apr 2015, 01:37
by BillG
With a bridged connection, the filter driver (Virtualbox Bridged Network Driver in this case) separates the traffic for the vm from the host traffic before it reaches the host's IP stack. It is done at the network level by the filter driver working with the NIC driver.

It could not be a routing process anyway because the IPs are both in the same IP subnet. IP routing only works between different IP subnets. If two network segments are using the same IP subnet you bridge them, not route between them.

I don't really know why the OP has this problem, but it is certainly not a routing problem (since no routing can be involved). I never use APIPA addresses myself, and I don't have any network experience with bridged networks.

The tell-tale sign that APIPA addresses are not routable is that the default gateway is blank.

Re: Connecting to remote machine with autoconfiguration addr

Posted: 22. Apr 2015, 14:06
by scottgus1
Very interesting, Bill, thanks! OK, if no routing is happening, Mwatts, I'd still try not using APIPA addresses, as a test. Use regular 192.168 static IP addresses in each OS, and see if you can get communication to start.