beautypg.com

4 bridged networking, Bridged networking – Sun Microsystems VIRTUALBOX VERSION 3.1.0_BETA2 User Manual

Page 92

background image

6 Virtual networking

Protocols such as GRE are unsupported:

Protocols other than TCP and UDP are

not supported. This means some VPN products (e.g. PPTP from Microsoft) can-
not be used. There are other VPN products which use simply TCP and UDP.

Forwarding host ports < 1024 impossible:

On Unix-based hosts (e.g. Linux, So-

laris, Mac OS X) it is not possible to bind to ports below 1024 from applications
that are not run by root. As a result, if you try to configure such a port forward-
ing, the VM will refuse to start.

These limitations normally don’t affect standard network use. But the presence of

NAT has also subtle effects that may interfere with protocols that are normally work-
ing. One example is NFS, where the server is often configured to refuse connections
from non-privileged ports (i.e. ports not below 1024).

6.4 Bridged networking

With bridged networking, VirtualBox uses a device driver on your host system that
filters data from your physical network adapter. This driver is therefore called a “net
filter” driver. This allows VirtualBox to intercept data from the physical network and
inject data into it, effectively creating a new network interface in software. When a
guest is using such a new software interface, it looks to the host system as though the
guest were physically connected to the interface using a network cable: the host can
send data to the guest through that interface and receive data from it. This means that
you can set up routing or bridging between the guest and the rest of your network.

For this to work, VirtualBox needs a device driver on your host system. The way

bridged networking works has been completely rewritten with VirtualBox 2.0 and 2.1,
depending on the host operating system. From the user perspective, the main differ-
ence is that complex configuration is no longer necessary on any of the supported host
operating systems.

2

Note: Even though TAP is no longer necessary on Linux with bridged network-
ing, you can still use TAP interfaces for certain advanced setups, since you can
connect a VM to any host interface – which could also be a TAP interface.

To enable bridged networking, all you need to do is to open the Settings dialog of

a virtual machine, go to the “Network” page and select “Bridged network” in the drop
down list for the “Attached to” field. Finally, select desired host interface from the

2

For Mac OS X and Solaris hosts, net filter drivers were already added in VirtualBox 2.0 (as initial support

for Host Interface Networking on these platforms). With VirtualBox 2.1, net filter drivers were also
added for the Windows and Linux hosts, replacing the mechanisms previously present in VirtualBox for
those platforms; especially on Linux, the earlier method required creating TAP interfaces and bridges,
which was complex and varied from one distribution to the next. None of this is necessary anymore.
Bridged network was formerly called “Host Interface Networking” and has been renamed with version
2.2 without any change in functionality.

92