Page 1 of 1

Host-Only Ethernet Adapter

Posted: 3. Nov 2009, 20:46
by dooamtel
Hello! I have a strange problem, using "Host-Only Ethernet Adapter". If I set a static ip-address, all my host network connections instead vboxnet0 stop working. If I use built-in DHCP-server anything works fine, but using DHCP is uncomfortabl? for me. I'm using this machine at work and at home, so I need to use static IP in it. How I must configure "Host-Only Ethernet Adapter" properly without DHCP?

Host:

Code: Select all

Linux 2.6.26-2-686 #1 SMP i686 GNU/Linux
Guest: the same as host

Host network (ifconfig -a):

Code: Select all

eth1    ...  
          inet addr:172.25.39.54  Bcast:172.25.39.255  Mask:255.255.255.0
          ...

lo       ...  
          inet addr:127.0.0.1  Mask:255.0.0.0
          ...

ppp0   ... 
          inet addr:91.211.248.103  P-t-P:172.25.255.111  Mask:255.255.255.255
          ...
ppp0 - pppoe connection, receiving setting from DHCP server of my ISP.

VB Host-Only Ethernet Adapter (DHCP settings - all working fine):

Code: Select all

vboxnet0  ...  
          inet addr:192.168.56.1  Bcast:192.168.56.255  Mask:255.255.255.0
        ...
route:

Code: Select all

172.25.255.111  *               255.255.255.255 UH    0      0        0 ppp0
172.25.39.0     *               255.255.255.0   U     0      0        0 eth1
192.168.56.0    *               255.255.255.0   U     0      0        0 vboxnet0
172.25.0.0      g-1-0-13-TR-05. 255.255.0.0     UG    0      0        0 eth1
default         *               0.0.0.0         U     0      0        0 ppp0
VB Host-Only Ethernet Adapter (static IP settings - works only vboxnet0 connection; other connections doesn't work):

Code: Select all

vboxnet0  ...  
          inet addr:10.0.0.230  Bcast:10.0.0.255  Mask:255.0.0.0
        ...
route:

Code: Select all

172.25.255.111  *               255.255.255.255 UH    0      0        0 ppp0
172.25.39.0     *               255.255.255.0   U     0      0        0 eth1
10.0.0.0    *               255.0.0.0   U     0      0        0 vboxnet0
172.25.0.0      g-1-0-13-TR-05. 255.255.0.0     UG    0      0        0 eth1
default         *               0.0.0.0         U     0      0        0 ppp0

Re: Host-Only Ethernet Adapter

Posted: 3. Nov 2009, 20:52
by Perryg
You should not need the dhcp server to run host-only. It is just there to assist so you don't need to set it manually.
Open the VBox program and go to preferences and network. You can set it up there as well as turn off the dhcp server.

Re: Host-Only Ethernet Adapter

Posted: 4. Nov 2009, 07:00
by dooamtel
Solved! That's my fault!
I forgot that my ISP uses 10.0.0.0/8 subnet for DNS in pppoe. At work we using 10.0.0.0/8 subnet for local net (in VB I'm using a bridge and my virtual machine is in local net at work). So after setting static IP-address (that belongs to 10.0.0.0/8 too) automatically was created this route

Code: Select all

10.0.0.0    *               255.0.0.0   U     0      0        0 vboxnet0
That's means that all packets from host eth1 and ppp sent to vboxnet0. A built-in VB DHCP by default using 192.168.56.0/24 subnet and it doesn't influence on other host's packages.

Solution: I'll exclude my virtual machine from local net at work, setting network to host-only (with static IP in 192.168.0.0/16 that's unused at work and at home) in place of bridge. When machine will be ready and I will not use her at home, I'll set configuratuion at work to bridge again.