space line
space line
space line
space line
space line
您现在的位置是: 技术文章>>

network interface config for vbox

发布日期 2008-11-7 7:40:01
作者 shemily
出处 重用网
浏览次数 ...
今日浏览 ...
本月浏览 ...
我要留言 我要留言
space line
摘要
network interface config for visualbox
space line
详细内容

Host Interface Networking
With Host Interface Networking, VirtualBox creates a new host networking interface
for a guest´sConfiguring virtual machines

virtual network card. In other words, the virtual network card of the guest is
also represented as ifanother network card was plugged into the host system.
With Host Interface Networking, your virtual machines can be accessed from other computers and
the Internet. As opposed to with NAT that we described just above, you can therefore run server
software in your VMs. Also, network protocols other than TCP/IP are supported.
The following general rules apply to host networking:
1.
A host interface must be created statically on the host before being attached to a virtual ma-
chine´s virtual networking card. (Alternatively, on Linux hosts, interfaces can also be created
dynamically by VirtualBox.)
2.
A host interface can only be connected to one virtual network card at a time.
3.
Even though host interfaces are created on the host, they must be configured only from within
the guest. Do not set network parameters from the host.
Also, generally speaking, there are two ways in which your new host interface can gain
access to thenetwork traffic for the virtual machine:

With TCP/IP routing, the standard mechanisms for TCP/IP routing apply. Most probably, you
give the new host interface its own IP address and then set up a route from the host
interface toyour real network interface (and back) with the route command.
With this method, you have to define an identical IP configuration on both the guest
and the host interface and configure the correct routing rules on the host.

Since most host network interfaces are not normally configured to support this,
however, routing requires a thorough understanding of TCP/IP networking and
will not be covered here. Virtual-Box does support it though, and if you require support for it,
do not hesitate to contact InnoTek.

With Ethernet bridging, by contrast, you can sort of split a physical network
adapter into two by switching it into the so-called "promiscuous" mode.
This means that the network adapter will
also accept packages (ethernet frames) for MAC addresses other than its own, as well as send
out packets with a MAC address other than its own. By establishing a second, "virtual" MAC
address for the guest, you can make your network adapter act as if it was really two network ad-
apters.
In some network environments, measures have been taken to prevent a client connected to an Ether-
net switch from using more than one source MAC address on a single Ethernet port by temporarily
blocking communication on the switch port. These setups are not compatible with Host Interface
Networking in bridging mode.
Warning
Setting up bridging will break your current network connectivity temporarily, until the
bridge has been configured correctly. This must be taken into account especially when set-
ting up VirtualBox on a remote system. Generally bridging (just like setting up routing) re-
quires in-depth knowledge of networking concepts and the utilities involved to configure
the network setup. Incorrect use can lead to loss of network connectivity. Use with caution.
5.3.3.1. Bridging on Windows hosts
When you install VirtualBox on the Windows host, a special networking driver is installed together
with the rest of VirtualBox. This driver, the VirtualBox Host Interface NDIS driver, can be used to
create additional host interfaces.
Use the
VBoxManage
tool to create new host interfaces on your Windows system:
VBoxManage createhostif "VM1 external"
Configuring virtual machines
35
Each new host interface thus created appears as an additional network card in your standard "Net-
work Connections" properties.
Note
If your host is running Windows XP or newer, you can also use the built-in bridging fea-
ture to connect your host interfaces to your physical network card. After creating the de-
sired host interfaces, select your physical network adapter in the Network Connections
folder and the desired host interface adapters and select "Bridge connections" from the
popup menu. Note that you have to transfer your network configuration from your physical
network adapter to the network bridge because your physical network adapter will only
function as a transport medium in your bridge setup. When more than one connection is
active on a bridge, Windows will automatically put your physical Ethernet adapter into
promiscuous mode so that it will receive network data for all bridged connections.
After you have created your new host interface this way, you can select "Host Interface" as the net-
working mode in a virtual machine´s Settings window and select the new interface in the "Interface
name" drop-down list. With the above example, this drop-down list would contain "VM1 external".

 

space line
我要留言 我要留言    
space line
space line
space line
space line
赞助商提供
space line
space line