Host-Only Ethernet Adapter

Discussions related to using VirtualBox on Linux hosts.

Host-Only Ethernet Adapter

Postby dooamtel » 3. Nov 2009, 20:46

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   Expand viewCollapse view
Linux 2.6.26-2-686 #1 SMP i686 GNU/Linux

Guest: the same as host

Host network (ifconfig -a):
Code: Select all   Expand viewCollapse view
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   Expand viewCollapse view
vboxnet0  ... 
          inet addr:192.168.56.1  Bcast:192.168.56.255  Mask:255.255.255.0
        ...

route:
Code: Select all   Expand viewCollapse view
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   Expand viewCollapse view
vboxnet0  ... 
          inet addr:10.0.0.230  Bcast:10.0.0.255  Mask:255.0.0.0
        ...

route:
Code: Select all   Expand viewCollapse view
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
dooamtel
 
Posts: 2
Joined: 3. Nov 2009, 20:08
Primary OS: Debian Lenny
VBox Version: OSE Debian
Guest OSses: Debian

Re: Host-Only Ethernet Adapter

Postby Perryg » 3. Nov 2009, 20:52

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.
Perryg
Site Moderator
 
Posts: 25942
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX - Other

Re: Host-Only Ethernet Adapter

Postby dooamtel » 4. Nov 2009, 07:00

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   Expand viewCollapse view
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.
dooamtel
 
Posts: 2
Joined: 3. Nov 2009, 20:08
Primary OS: Debian Lenny
VBox Version: OSE Debian
Guest OSses: Debian


Return to VirtualBox on Linux Hosts

Who is online

Users browsing this forum: socratis, Yahoo [Bot] and 11 guests