Information Technology Reference
In-Depth Information
offer performance advantages over the other emulated devices. PV drivers
are available in 2.6.25 or later Linux kernels. They can be downloaded for
other operating systems at the KVM project page.
In addition to choosing the virtual device for the guest, the user must configure
a host networking mode to use for each device. Five different modes are available,
each of which offers some interesting benefits.
Not attached is a mode similar to a network adapter that doesn't have a network
cable attached. The device is present in the guest machine but is not reporting a
positive link status. Traffic will not flow through this device in this mode.
Network Address Translation (NAT) will hide the guest's interface behind
a network tunnel. This mode is often used when the guest is a desktop system
and primarily a consumer of network resources rather than a provider. To as-
sist guests that automatically detect their network settings, VirtualBox provides
a DHCP server, router, and DNS proxy to resolve network names and correctly
route packets. NAT has a few limitations that may cause applications to behave
differently than they would on a real system. For example, ping may not work
across the NAT tunnel. Some VPN products use this method to determine if a
network is reachable, so these products would not work with a virtual NIC in NAT
mode. In addition, jumbo frames are not reliable when using NAT.
Because external systems cannot communicate directly with a guest using
NAT mode, VirtualBox can provide port redirection using the host's IP address.
External systems connect to the specified port on the host; VirtualBox then re-
directs all of the packets to the guest. There are a few restrictions on the use of
port forwarding. For example, you cannot redirect a port that is already in use by
the host. Ports with numbers less than 1024 require the requester to be running
as root or with the net_privaddr privilege. Because neither of these is a recom-
mended practice for otherwise unprivileged users, you should choose a port on
the host with a number greater than 1024. The most common use of NAT mode
is to forward guest port 22, which allows an external system to access the guest
using SSH. The following example establishes an SSH port from the first network
adapter (an Intel Pro/1000 MT Desktop) on the guest named Solaris 10 to port
2222 on the host:
% VBoxManage setextradata "Solaris 10" \
"VBoxInternal/Devices/e1000/0/LUN#0/Config/s10ssh/Protocol" TCP
% VBoxManage setextradata "Solaris 10" \
"VBoxInternal/Devices/e1000/0/LUN#0/Config/s10ssh/GuestPort" 22
% VBoxManage setextradata "Solaris 10" \
"VBoxInternal/Devices/e1000/0/LUN#0/Config/s10ssh/HostPort" 2222
 
Search WWH ::




Custom Search