Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 04 Dec 2010 13:32:08 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        freebsd-questions@freebsd.org
Subject:   Re: FreeBSD on Virtualbox: No network access
Message-ID:  <4CFA42D8.5010605@infracaninophile.co.uk>
In-Reply-To: <1291368354.2905.19.camel@SHR-42-002>
References:  <BD9E30A7-919D-4145-A6B6-A9A086B6D7C2@vt.edu>	<4CF87854.1030103@mgwigglesworth.net>	<EA5E99C7-AA29-4D8B-BBAD-F1463C7B1CDA@vt.edu> <1291368354.2905.19.camel@SHR-42-002>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigE307ED768DDC6963A41CB6D7
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On 03/12/2010 09:25, Timm Wimmers wrote:
> Am Freitag, den 03.12.2010, 00:33 -0500 schrieb Weihang Wang:
>> Hi Martes,
>>
>> I have tried the first two interfaces which are said to be supported b=
y FreeBSD, they do not work. Surprisingly, now I choose the option "Intel=
 PRO/1000 T Server" and in NAT mode, it works now!!!!
>> Thank you so much, you do me a great favor!! Hope this also works for =
Chris!
>=20
> In most cases it is better to use bridge mode. In NAT mode your VM get =
a
> private subnet and other devices in your network can't find your VM,
> because the VM is behind (or encapsulated in) your HOST (as like as you=
r
> HOST is behind your router to the internet). This can work if you defin=
e
> routes, but bridging is mostly easier.
>=20
> In Bridge mode your VM acts like any other machine in your network and
> will get an IP-Adress from your DHCP server (if you use DHCP).
>=20

Hmmm.... I don't know about bridge mode being appropriate in "most"
cases.  NAT and bridge modes are useful in different circumstances

   * NAT mode means that your VMs are not exposed to incoming
     connections on the net.
   * Bridge mode means that the VMs can run network services
     for users on other machines.

Which one of those you prefer depends very much on how you're using the
VMs.  Eg. for a dev playground and for local testing, NAT looks like a
better idea.

Now, I run VirtualBox on my Mac with FreeBSD (inter alia) as a guest OS.
 Your setup may differ, but I find NAT mode to be the best choice.
In addition to the considerations above, I also see:

   * In NAT mode, the FreeBSD guest is insulated from how the Mac
     connects to the network.  Switching between wired or wireless
     networking, or even using a 3G dongle "just works" as far as
     the FreeBSD guest is concerned.
   * Similarly if the MAC gets a new IP when switching between
     different networks and DHCP servers, the guest OS just doesn't
     care.

You don't need to worry about configuring routing and so forth in the
guests: just use DHCP for the i/f, and it all works automagically.

Actually, I generally enable two network interfaces for unixoid guests
(ie. capable of running sshd) -- set to NAT and vboxnet0.  This means I
can ssh into local guest OSes from a Terminal.app session, which I find
more convenient than logging in via the console.  Again, it's all
configured effortlessly with DHCP.

My only complaint is that IPv6 doesn't work in these modes, but I can
live with that.

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
JID: matthew@infracaninophile.co.uk               Kent, CT11 9PW


--------------enigE307ED768DDC6963A41CB6D7
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkz6Qt4ACgkQ8Mjk52CukIxNfQCdFsQpTAn/5UJaNzKmj4mXKUaT
GgwAn2Kkzx3iEwFiJ2jeJDTWxtHFJCDI
=tKoX
-----END PGP SIGNATURE-----

--------------enigE307ED768DDC6963A41CB6D7--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4CFA42D8.5010605>