1 | <?xml version='1.0' encoding='UTF-8'?>
|
---|
2 | <!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
|
---|
3 | <topic xml:lang="en-us" id="network_internal">
|
---|
4 | <title>Internal Networking</title>
|
---|
5 |
|
---|
6 | <body>
|
---|
7 | <p>
|
---|
8 | Internal Networking is similar to bridged networking in that the
|
---|
9 | VM can directly communicate with the outside world. However, the
|
---|
10 | outside world is limited to other VMs on the same host which
|
---|
11 | connect to the same internal network.
|
---|
12 | </p>
|
---|
13 | <p>
|
---|
14 | Even though technically, everything that can be done using
|
---|
15 | internal networking can also be done using bridged networking,
|
---|
16 | there are security advantages with internal networking. In bridged
|
---|
17 | networking mode, all traffic goes through a physical interface of
|
---|
18 | the host system. It is therefore possible to attach a packet
|
---|
19 | sniffer such as Wireshark to the host interface and log all
|
---|
20 | traffic that goes over it. If, for any reason, you prefer two or
|
---|
21 | more VMs on the same machine to communicate privately, hiding
|
---|
22 | their data from both the host system and the user, bridged
|
---|
23 | networking therefore is not an option.
|
---|
24 | </p>
|
---|
25 | <p>
|
---|
26 | Internal networks are created automatically as needed. There is no
|
---|
27 | central configuration. Every internal network is identified simply
|
---|
28 | by its name. Once there is more than one active virtual network
|
---|
29 | card with the same internal network ID, the Oracle VM VirtualBox support
|
---|
30 | driver will automatically <i>wire</i> the cards and
|
---|
31 | act as a network switch. The Oracle VM VirtualBox support driver
|
---|
32 | implements a complete Ethernet switch and supports both
|
---|
33 | broadcast/multicast frames and promiscuous mode.
|
---|
34 | </p>
|
---|
35 | <p>
|
---|
36 | In order to attach a VM's network card to an internal network, set
|
---|
37 | its networking mode to Internal Networking. There are two ways to
|
---|
38 | accomplish this:
|
---|
39 | </p>
|
---|
40 | <ul>
|
---|
41 | <li>
|
---|
42 | <p>
|
---|
43 | Use the VM's <b outputclass="bold">Settings</b> window
|
---|
44 | in VirtualBox Manager. In the <b outputclass="bold">Network</b>
|
---|
45 | category of the Settings window, select
|
---|
46 | <b outputclass="bold">Internal Network</b> from the
|
---|
47 | drop-down list of networking modes. Select the name of an
|
---|
48 | existing internal network from the drop-down list below, or
|
---|
49 | enter a new name into the
|
---|
50 | <b outputclass="bold">Name</b> field.
|
---|
51 | </p>
|
---|
52 | </li>
|
---|
53 | <li>
|
---|
54 | <p>
|
---|
55 | Use the command line, for example:
|
---|
56 | </p>
|
---|
57 | <pre xml:space="preserve">VBoxManage modifyvm "VM name" --nic<x> intnet</pre>
|
---|
58 | <p>
|
---|
59 | Optionally, you can specify a network name with the command:
|
---|
60 | </p>
|
---|
61 | <pre xml:space="preserve">VBoxManage modifyvm "VM name" --intnet<x> "network name"</pre>
|
---|
62 | <p>
|
---|
63 | If you do not specify a network name, the network card will be
|
---|
64 | attached to the network <codeph>intnet</codeph> by default.
|
---|
65 | </p>
|
---|
66 | </li>
|
---|
67 | </ul>
|
---|
68 | <p>
|
---|
69 | Unless you configure the virtual network cards in the guest
|
---|
70 | operating systems that are participating in the internal network
|
---|
71 | to use static IP addresses, you may want to use the DHCP server
|
---|
72 | that is built into Oracle VM VirtualBox to manage IP addresses for the
|
---|
73 | internal network. See <xref href="man_VBoxManage-dhcpserver.dita#vboxmanage-dhcpserver"/>.
|
---|
74 | </p>
|
---|
75 | <p>
|
---|
76 | As a security measure, by default, the Linux implementation of
|
---|
77 | internal networking only allows VMs running under the same user ID
|
---|
78 | to establish an internal network. However, it is possible to
|
---|
79 | create a shared internal networking interface, accessible by users
|
---|
80 | with different user IDs.
|
---|
81 | </p>
|
---|
82 | </body>
|
---|
83 |
|
---|
84 | </topic>
|
---|