Difference between revisions of "VirtualBox Network Configuration"

From DAVE Developer's Wiki
Jump to: navigation, search
(Created page with "{{InfoBoxTop}} {{Applies_To_DVDK}} {{InfoBoxBottom}} {{WorkInProgress}}")
 
Line 4: Line 4:
  
 
{{WorkInProgress}}
 
{{WorkInProgress}}
 +
 +
=== VirtualBox Network Configuration Primer ===
 +
 +
VirtualBox networking supports different configuration. For a in-depth discussion regarding virtual networking see VBox official documentation [http://www.virtualbox.org/manual/ch06.html here].
 +
 +
For developing purpose, we are interested in two configuration:
 +
* NAT, which is the default provided with [[:Category:DVDK|DVDK]], and
 +
* Bridged Networking
 +
 +
=== Network Address Translation (NAT) ===
 +
 +
[http://en.wikipedia.org/wiki/Network_address_translation Network Address Translation] is a tecnique used in IP networking that modify IP packet header, by changing IP address, while the routering device process the packet.
 +
 +
Only the IP address of the routing device (in case of a Virtual Machine, the host ack at router for the guest) is seen from outside. Usually the routed device (in our case, the guest machine) has an IP address that belongs to a completely different IP subnet.
 +
 +
NAT make easy to use a virtual machine because:
 +
* it does not require to configure guest network parameters (the guest act as DHCP server and give all the needed information to the guest)
 +
* it garantee that the VM can be executed in any network environment without breaking the existing network.
 +
 +
However it's really hard to configure NAT to let the VM to act as a server (e.g. as NFS or TFTP server), for this reason the developer usually choose a bridged configuration, with proper IP parameter assignments.
 +
 +
=== Bridge Configuration ===
 +
 +
In brief, [http://en.wikipedia.org/wiki/Bridge_%28networking%29 Bridge Networking] configure host's physical network interface and guest's virtual network interface as if they are connected with a Ethernet Switch.
 +
 +
In this way:
 +
* guest (DVDK Virtual Machine) has it's own IP address, usually on the same subnet of the host
 +
* guest is directly accessible (apart from firewall rules that may be configured on the host) from any device on the same subnet
 +
 +
To change from NAT to Bridge configuration user have to:
 +
* change Virtual Box network setting
 +
* configure, if needed, guest networking. Guest by default uses DHCP so, if DHCP server is available on your network, no additional configuration is needed.

Revision as of 10:07, 20 April 2012

Info Box
VirtualMachine.png Applies to DVDK


WorkInProgress.gif

VirtualBox Network Configuration Primer[edit | edit source]

VirtualBox networking supports different configuration. For a in-depth discussion regarding virtual networking see VBox official documentation here.

For developing purpose, we are interested in two configuration:

  • NAT, which is the default provided with DVDK, and
  • Bridged Networking

Network Address Translation (NAT)[edit | edit source]

Network Address Translation is a tecnique used in IP networking that modify IP packet header, by changing IP address, while the routering device process the packet.

Only the IP address of the routing device (in case of a Virtual Machine, the host ack at router for the guest) is seen from outside. Usually the routed device (in our case, the guest machine) has an IP address that belongs to a completely different IP subnet.

NAT make easy to use a virtual machine because:

  • it does not require to configure guest network parameters (the guest act as DHCP server and give all the needed information to the guest)
  • it garantee that the VM can be executed in any network environment without breaking the existing network.

However it's really hard to configure NAT to let the VM to act as a server (e.g. as NFS or TFTP server), for this reason the developer usually choose a bridged configuration, with proper IP parameter assignments.

Bridge Configuration[edit | edit source]

In brief, Bridge Networking configure host's physical network interface and guest's virtual network interface as if they are connected with a Ethernet Switch.

In this way:

  • guest (DVDK Virtual Machine) has it's own IP address, usually on the same subnet of the host
  • guest is directly accessible (apart from firewall rules that may be configured on the host) from any device on the same subnet

To change from NAT to Bridge configuration user have to:

  • change Virtual Box network setting
  • configure, if needed, guest networking. Guest by default uses DHCP so, if DHCP server is available on your network, no additional configuration is needed.