VirtualBox

source: vbox/trunk/doc/manual/en_US/dita/topics/network_hostonly.dita

最後變更 在這個檔案是 108297,由 vboxsync 提交於 4 週 前

Docs: bugref:10705. The following commits from doc's team git repo has been applied:

38ede4e3c915bbab9000b1b990e187daa07b4f61 Created 7.2 books from the 7.1 content with new part numbers, variables and removed non-7.2 content.
0951cfa5daf57ec2a81e36d335f14d8b4f2acd87 Merge branch 'Finalise_seamless_windows' into 'main'
b9e418eb08b28c6353e3f4534c7e360269cf5eef Included Klaus' feedback on known issues, moved some.
373130ebe466a21f4271e2ac36f11709c3697093 Initial edits to troubleshooting topics
a7459a9a24b73b4d268a751fba85e595ad6f35db Restructured and updated troubleshooting section
e3f67c800044e585a4428a4fc76016980269301b Added comments for future work
dcc46e566f3d269e5994d83cc5421532421fa639 Initial restructuring to move topics into suitable sections
e7b6f99bf86526813fcbe96903cf0c2652952eb0 removed Guest Control known issue. Info now in CLI topics
0209a6a155f460eaba79bcf0d0f34d8460413868 Reworded clipboard intro to be clear it requires GUI, made config a separate chapter
94f883f2b38dc281e759878880280370aa517d5c Included feedback from Brent on troubleshooting
ac1c0c919eeb58b1db478ca66e825ea89eb7a1a8 Removed preface, consolidated intro topics
7117e423ecdc1841b2bbca1aafda1c43ae38f7ea More restructuring and removing duplication
c8728eee82bd4081ab6f0500b32068c8f6749bc2 Updated intro and more restructuring
25389ab0df09df59f8f5f517f15590a917bb66a1 Added link to support and licensing
981ba048798bf7985f2c230fe97172d587e25fd6 7.2 updates for 3d acceleration
e95113d1da7ccf299642cd3368804e319e2bf3ca Updated diagram in intro, and filename
5c4555249e12738e55e9b8a0710f83ee7d4a9e61 New filenames, ids for intro
abf8d5092aea7f1fd4e9b7dbab578d615579eb4e Updated diagram to higher res

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 5.9 KB
 
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_hostonly">
4 <title>Host-Only Networking</title>
5
6 <body>
7 <p>Host-only networking can be thought of as a hybrid between the bridged and internal networking modes. As with
8 bridged networking, the virtual machines can talk to each other and the host as if they were connected through a
9 physical Ethernet switch. As with internal networking, a physical networking interface need not be present, and
10 the virtual machines cannot talk to the world outside the host since they are not connected to a physical
11 networking interface. </p>
12 <p>When host-only networking is used, <ph conkeyref="vbox-conkeyref-phrases/product-name"/> creates a new software
13 interface on the host which then appears next to your existing network interfaces. In other words, whereas with
14 bridged networking an existing physical interface is used to attach virtual machines to, with host-only networking
15 a new <i>loopback</i> interface is created on the host. And whereas with internal networking, the traffic between
16 the virtual machines cannot be seen, the traffic on the loopback interface on the host can be intercepted. </p>
17 <note>
18 <p>Hosts running recent macOS versions do not support host-only adapters. These adapters are replaced by host-only
19 networks, which define a network mask and an IP address range, where the host network interface receives the
20 lowest address in the range. </p>
21 <p>The host network interface gets added and removed dynamically by the operating system, whenever a host-only
22 network is used by virtual machines. </p>
23 <p>On macOS hosts, choose the <b outputclass="bold">Host-Only Network</b> option when configuring a network
24 adapter. The <b outputclass="bold">Host-Only Adapter</b> option is provided for legacy support. </p>
25 </note>
26 <p>Host-only networking is particularly useful for preconfigured virtual appliances, where multiple virtual machines
27 are shipped together and designed to cooperate. For example, one virtual machine may contain a web server and a
28 second one a database, and since they are intended to talk to each other, the appliance can instruct <ph
29 conkeyref="vbox-conkeyref-phrases/product-name"/> to set up a host-only network for the two. A second, bridged,
30 network would then connect the web server to the outside world to serve data to, but the outside world cannot
31 connect to the database. </p>
32 <p>To enable a host-only network interface for a virtual machine, do either of the following: </p>
33 <ul>
34 <li>
35 <p>Go to the <b outputclass="bold">Network</b> page in the virtual machine's <b outputclass="bold">Settings</b>
36 dialog and select an <b outputclass="bold">Adapter</b> tab. Ensure that the <b outputclass="bold">Enable
37 Network Adapter</b> check box is selected and choose <b outputclass="bold">Host-Only Adapter</b> for the <b
38 outputclass="bold">Attached To</b> field. </p>
39 </li>
40 <li>
41 <p>On the command line, use </p>
42 <p><userinput>VBoxManage modifyvm <varname>VM-name</varname> --nic<varname>N</varname>=hostonly --host-only-adapter<varname>N</varname>=<varname>interface-name</varname></userinput>.</p>
43 <p>See <xref href="../cli_topics/vboxmanage-modifyvm.dita"/>.</p>
44 </li>
45 </ul>
46 <p>For host-only networking, as with internal networking, you may find the DHCP server useful that is built into <ph
47 conkeyref="vbox-conkeyref-phrases/product-name"/>. This is enabled by default and manages the IP addresses in
48 the host-only network. Without the DHCP server you would need to configure all IP addresses statically. </p>
49 <ul>
50 <li>
51 <p>In <ph conkeyref="vbox-conkeyref-phrases/vbox-mgr"/> you can configure the DHCP server by choosing <b
52 outputclass="bold">File</b>, <b outputclass="bold">Tools</b>, <b outputclass="bold">Network Manager</b>. The
53 Network Manager window lists all host-only networks which are presently in use. Select the network name and
54 then use the <b outputclass="bold">DHCP Server</b> tab to configure DHCP server settings. See <xref
55 href="network-manager.dita#network-manager"/>. </p>
56 </li>
57 <li>
58 <p>Alternatively, you can use the <userinput>VBoxManage dhcpserver</userinput> command. See <xref href="../cli_topics/vboxmanage-dhcpserver.dita"/>.</p>
59 </li>
60 </ul>
61 <note>
62 <p>On Linux and macOS hosts the number of host-only interfaces is limited to 128. There is no such limit for
63 Oracle Solaris and Windows hosts. </p>
64 </note>
65 <p>On Linux, macOS and Solaris <ph conkeyref="vbox-conkeyref-phrases/product-name"/> will only allow IP addresses in
66 192.168.56.0/21 range to be assigned to host-only adapters. For IPv6 only link-local addresses are allowed. If
67 other ranges are required, they can be enabled by creating <filepath>/etc/vbox/networks.conf</filepath> and
68 specifying allowed ranges there. For example, to allow 10.0.0.0/8 and 192.168.0.0/16 IPv4 ranges as well as
69 2001::/64 range put the following lines into <filepath>/etc/vbox/networks.conf</filepath>: </p>
70 <pre xml:space="preserve"> * 10.0.0.0/8 192.168.0.0/16
71 * 2001::/64
72 </pre>
73 <p>Lines starting with the hash <userinput>#</userinput> are ignored. The following example allows any addresses,
74 effectively disabling range control: </p>
75 <pre xml:space="preserve"> * 0.0.0.0/0 ::/0
76 </pre>
77 <p>If the file exists, but no ranges are specified in it, no addresses will be assigned to host-only adapters. The
78 following example effectively disables all ranges: </p>
79 <pre xml:space="preserve"> # No addresses are allowed for host-only adapters
80 </pre>
81 </body>
82
83</topic>
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette