I am using netcfg to configure two interfaces in my archlinux VM. In VirtualBox I have set two active interfaces. The first (eth0) is the NAT interface to provide the VM with Internet access. The second (eth1) is a host-only network so I can access the VM directly from the host.
I have tried to configure eth0 with dhcp since it doesnt matter what IP-address it gets from the NAT. And I have tried to configure eth1 with a static IP in the host-only network.
Everything seems to work fine, but here is the thing. If I activate the eth1 interface (host-only) I am able to ping it from the host (as expected), but if I then enable the eth0 interface (nat) I am not able to access the Internet (tried to ping 126.96.36.199). But, if I then disable eth1, eth0 suddenly works fine. Long story short: The NAT interface wont work simultaneously with the host-only interface. The host-only interface seem to always work.
It is because of this I thought the problem existed in the configuration of eth1, since it obviously hindered eth0 to work properly. The configurations are very simplistic, but I have been unsuccessfull to identify the error.
Configuration of eth0 (nat)
INTERFACE="eth0" CONNECTION="ethernet" DESCRIPTION="DHCP (NAT for Internet access" IP="dhcp"
Configuration of eth1 (host-only)
INTERFACE="eth1" CONNECTION="ethernet" DESCRIPTION="Static IP (development)" IP="static" ADDR="192.168.56.100" GATEWAY="192.168.56.1" NETMASK="255.255.255.0"