virtualbox networking setup

Michael Powell nightrecon at
Wed Nov 12 11:50:52 PST 2008

Paul Cartwright wrote:

> I'm new to the group, and I'm new to setting up VirtualBox guest hosts.
> right now I have a Debian linux box, and I setup Virtual box. I installed
> FreeBSD on it, but I can't seem to get the networking to work. I tried to
> rerun sysinstall, but I'm not sure what options to change or why it isn't
> working. I have the command line terminal window up, but in the virtualbox
> window, I cannot copy & past to here, so I can't paste the ifconfig info..
> it does say inet, but it does say UP, BROADCASTING...
> I looked at the usermanual, but I didn't see anything about actually
> setting up the network, using DHCP...
> I hae a home network, with a router, gateway, and my desktop
> is in that subnet 192.168.10.x
> not sure what to do now...
> thanks,
> I grew up with AT&T UNIX SYS V, but it's been a few years:)

Don't know about Debian, and I haven't actually tried FreeBSD as a guest in
VirtualBox, but have used it for other things.

The default install of vbox sets up a logical NAT/DHCP server internally, so
all you would do is use vi to put something like ifconfig_rl0="DHCP" in
your /etc/rc.conf. Substitute the according vbox interface. When you
configure your new VM in the OSE the default NIC type will be PCnet-FAST
III (Am79C973) in vbox 2.0.4. This is supported by the pcn driver so your
line would be ifconfig_pcn0="DHCP". 

IF you get the interface to come up examine it with ifconfig -a. I believe
vbox settles for a network, but YMMV. You may need to play
around with defaultrouter="something" and name services in resolv.conf or
fiddle with dhclient.conf. The best is to ensure that dhclient.conf is
pulling the info from DHCP rather than trying to manually stuff numbers in

Also, if the pcn driver doesn't seem to want to play and if you are using
VirtualBox 2.0.4 there are 2 Intel Nics you can try (not sure if they
are "Windows" exclusive, or not - will find out in the next few days as I
plan on trying Nexenta this way) instead which are supported by the "em"
driver (ifconfig_em0="DHCP"). This just has to match whatever you set up in
the VM.


More information about the freebsd-questions mailing list