You are not logged in.

#1 2012-10-06 13:11:29

nastaliq
Member
Registered: 2012-10-06
Posts: 2

[SOLVED] Configuring two interfaces with netcfg in VirtualBox

Hi everyone,

I am using VirtualBox, and I've defined two network interfaces for an Arch VM. One is a NAT interface, so that the VM could have internet access; and the other is a host-only interface, so that I can access the VM from the host.

Now, I am using netcfg for managing the network interfaces and have these files:

$ cat /etc/network.d/vbox-nat
CONNECTION='ethernet'
DESCRIPTION='NAT connection to use in VBox'
INTERFACE='eth0'
IP='dhcp'
$ cat /etc/network.d/vbox-hostonly
CONNECTION='ethernet'
DESCRIPTION='VBox Host Only network'
INTERFACE='eth1'
IP='static'
ADDR='192.168.56.101'
GATEWAY='192.168.56.1'
NETMASK='255.255.255.0'

Now, here's the issue: When I start the vbox-nat (eth0) profile using systemctl, it works as expected and I can successfully ping example.com (or any other valid address). But next when I start the vbox-hostonly profile (eth1), I cannot ping anything, but I can access the VM from my host completely fine. When I stop vbox-hostonly, I can again ping without any issues. So in other words, the host-only interface works without any issues, but the NAT interface will work only if the host-only interface is not enabled.

What am I missing?

Last edited by nastaliq (2012-10-06 16:13:08)

Offline

#2 2012-10-06 15:22:18

plustwo
Member
From: South Africa, ZA
Registered: 2012-09-13
Posts: 32

Re: [SOLVED] Configuring two interfaces with netcfg in VirtualBox

nastaliq, chek if this post is not related to your problem;

https://bbs.archlinux.org/viewtopic.php?id=138754

this might also help
https://wiki.archlinux.org/index.php/Ad … Networking

tnx

Last edited by plustwo (2012-10-06 15:32:07)

Offline

#3 2012-10-06 16:11:25

nastaliq
Member
Registered: 2012-10-06
Posts: 2

Re: [SOLVED] Configuring two interfaces with netcfg in VirtualBox

plustwo wrote:

nastaliq, chek if this post is not related to your problem;

https://bbs.archlinux.org/viewtopic.php?id=138754

This post has the same problem (I somehow missed it during my earlier searching). The solution mentioned there worked for me, thanks. smile

Offline

Board footer

Powered by FluxBB