VirtualBox

source: vbox/trunk/doc/manual/en_US/user_Networking.xml@ 75206

Last change on this file since 75206 was 75206, checked in by vboxsync, 6 years ago

Manual: fixed and cleaned up networking modes table, thank you Socratis Kalogrianitis.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 53.5 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"[
4<!ENTITY % all.entities SYSTEM "all-entities.ent">
5%all.entities;
6]>
7<chapter id="networkingdetails">
8
9 <title>Virtual Networking</title>
10
11 <para>
12 As mentioned in <xref linkend="settings-network" />, VirtualBox
13 provides up to eight virtual PCI Ethernet cards for each virtual
14 machine. For each such card, you can individually select the
15 following:
16 </para>
17
18 <itemizedlist>
19
20 <listitem>
21 <para>
22 The hardware that will be virtualized.
23 </para>
24 </listitem>
25
26 <listitem>
27 <para>
28 The virtualization mode that the virtual card operates in, with
29 respect to your physical networking hardware on the host.
30 </para>
31 </listitem>
32
33 </itemizedlist>
34
35 <para>
36 Four of the network cards can be configured in the Network section
37 of the settings dialog in the graphical user interface of
38 VirtualBox. You can configure all eight network cards on the command
39 line using VBoxManage modifyvm. See
40 <xref linkend="vboxmanage-modifyvm" />.
41 </para>
42
43 <para>
44 This chapter explains the various networking settings in more
45 detail.
46 </para>
47
48 <sect1 id="nichardware">
49
50 <title>Virtual Networking Hardware</title>
51
52 <para>
53 For each card, you can individually select what kind of
54 <emphasis>hardware</emphasis> will be presented to the virtual
55 machine. VirtualBox can virtualize the following types of
56 networking hardware:
57 </para>
58
59 <itemizedlist>
60
61 <listitem>
62 <para>
63 AMD PCNet PCI II (Am79C970A)
64 </para>
65 </listitem>
66
67 <listitem>
68 <para>
69 AMD PCNet FAST III (Am79C973), the default setting
70 </para>
71 </listitem>
72
73 <listitem>
74 <para>
75 Intel PRO/1000 MT Desktop (82540EM)
76 </para>
77 </listitem>
78
79 <listitem>
80 <para>
81 Intel PRO/1000 T Server (82543GC)
82 </para>
83 </listitem>
84
85 <listitem>
86 <para>
87 Intel PRO/1000 MT Server (82545EM)
88 </para>
89 </listitem>
90
91 <listitem>
92 <para>
93 Paravirtualized network adapter (virtio-net)
94 </para>
95 </listitem>
96
97 </itemizedlist>
98
99 <para>
100 The PCNet FAST III is the default because it is supported by
101 nearly all operating systems, as well as by the GNU GRUB boot
102 manager. As an exception, the Intel PRO/1000 family adapters are
103 chosen for some guest operating system types that no longer ship
104 with drivers for the PCNet card, such as Windows Vista.
105 </para>
106
107 <para>
108 The Intel PRO/1000 MT Desktop type works with Windows Vista and
109 later versions. The T Server variant of the Intel PRO/1000 card is
110 recognized by Windows XP guests without additional driver
111 installation. The MT Server variant facilitates OVF imports from
112 other platforms.
113 </para>
114
115 <para>
116 The Paravirtualized network adapter (virtio-net) is special. If
117 you select this adapter, then VirtualBox does
118 <emphasis>not</emphasis> virtualize common networking hardware
119 that is supported by common guest operating systems. Instead,
120 VirtualBox expects a special software interface for virtualized
121 environments to be provided by the guest, thus avoiding the
122 complexity of emulating networking hardware and improving network
123 performance. Starting with version 3.1, VirtualBox provides
124 support for the industry-standard <emphasis>virtio</emphasis>
125 networking drivers, which are part of the open source KVM project.
126 </para>
127
128 <para>
129 The virtio networking drivers are available for the following
130 guest operating systems:
131 </para>
132
133 <itemizedlist>
134
135 <listitem>
136 <para>
137 Linux kernels version 2.6.25 or later can be configured to
138 provide virtio support. Some distributions have also
139 back-ported virtio to older kernels.
140 </para>
141 </listitem>
142
143 <listitem>
144 <para>
145 For Windows 2000, XP, and Vista, virtio drivers can be
146 downloaded and installed from the KVM project web page:
147 </para>
148
149 <para>
150 <ulink
151 url="http://www.linux-kvm.org/page/WindowsGuestDrivers"/>.
152 </para>
153 </listitem>
154
155 </itemizedlist>
156
157 <para>
158 VirtualBox also has limited support for <emphasis>jumbo
159 frames</emphasis>. These are networking packets with more than
160 1500 bytes of data, provided that you use the Intel card
161 virtualization and bridged networking. Jumbo frames are not
162 supported with the AMD networking devices. In those cases, jumbo
163 packets will silently be dropped for both the transmit and the
164 receive direction. Guest operating systems trying to use this
165 feature will observe this as a packet loss, which may lead to
166 unexpected application behavior in the guest. This does not cause
167 problems with guest operating systems in their default
168 configuration, as jumbo frames need to be explicitly enabled.
169 </para>
170
171 </sect1>
172
173 <sect1 id="networkingmodes">
174
175 <title>Introduction to Networking Modes</title>
176
177 <para>
178 Each of the networking adapters can be separately configured to
179 operate in one of the following modes:
180 </para>
181
182 <itemizedlist>
183
184 <listitem>
185 <para>
186 <emphasis role="bold">Not attached.</emphasis> In this mode,
187 VirtualBox reports to the guest that a network card is
188 present, but that there is no connection. This is as if no
189 Ethernet cable was plugged into the card. Using this mode, it
190 is possible to "pull" the virtual Ethernet cable and disrupt
191 the connection, which can be useful to inform a guest
192 operating system that no network connection is available and
193 enforce a reconfiguration.
194 </para>
195 </listitem>
196
197 <listitem>
198 <para>
199 <emphasis role="bold">Network Address Translation
200 (NAT)</emphasis>. If all you want is to browse the Web,
201 download files, and view email inside the guest, then this
202 default mode should be sufficient for you, and you can skip
203 the rest of this section. Please note that there are certain
204 limitations when using Windows file sharing. See
205 <xref linkend="nat-limitations" />.
206 </para>
207 </listitem>
208
209 <listitem>
210 <para>
211 <emphasis role="bold">NAT Network.</emphasis> The NAT network
212 is a new NAT flavour introduced in VirtualBox 4.3. See
213 <xref linkend="network_nat_service"/>.
214 </para>
215 </listitem>
216
217 <listitem>
218 <para>
219 <emphasis role="bold">Bridged networking.</emphasis> This is
220 for more advanced networking needs, such as network
221 simulations and running servers in a guest. When enabled,
222 VirtualBox connects to one of your installed network cards and
223 exchanges network packets directly, circumventing your host
224 operating system's network stack.
225 </para>
226 </listitem>
227
228 <listitem>
229 <para>
230 <emphasis role="bold">Internal networking.</emphasis> This can
231 be used to create a different kind of software-based network
232 which is visible to selected virtual machines, but not to
233 applications running on the host or to the outside world.
234 </para>
235 </listitem>
236
237 <listitem>
238 <para>
239 <emphasis role="bold">Host-only networking.</emphasis> This
240 can be used to create a network containing the host and a set
241 of virtual machines, without the need for the host's physical
242 network interface. Instead, a virtual network interface,
243 similar to a loopback interface, is created on the host,
244 providing connectivity among virtual machines and the host.
245 </para>
246 </listitem>
247
248 <listitem>
249 <para>
250 <emphasis role="bold"> Generic networking.</emphasis> Rarely
251 used modes which share the same generic network interface, by
252 allowing the user to select a driver which can be included
253 with VirtualBox or be distributed in an extension pack.
254 </para>
255
256 <para>
257 The following sub-modes are available:
258 </para>
259
260 <itemizedlist>
261
262 <listitem>
263 <para>
264 <emphasis role="bold">UDP Tunnel:</emphasis> Used to
265 interconnect virtual machines running on different hosts
266 directly, easily, and transparently, over an existing
267 network infrastructure.
268 </para>
269 </listitem>
270
271 <listitem>
272 <para>
273 <emphasis role="bold">VDE (Virtual Distributed Ethernet)
274 networking:</emphasis> Used to connect to a Virtual
275 Distributed Ethernet switch on a Linux or a FreeBSD host.
276 At the moment this option requires compilation of
277 VirtualBox from sources, as the Oracle packages do not
278 include it.
279 </para>
280 </listitem>
281
282 </itemizedlist>
283 </listitem>
284
285 </itemizedlist>
286
287 <para>
288 <xref linkend="table-networking-modes"/> provides a quick overview
289 of the most important networking modes.
290 </para>
291
292 <table id="table-networking-modes">
293 <title>Overview of Networking Modes</title>
294 <tgroup cols="6">
295 <colspec align="left" />
296 <colspec align="center" />
297 <colspec align="center" />
298 <colspec align="center" />
299 <colspec align="center" />
300 <colspec align="center" />
301 <thead valign="middle">
302 <row>
303 <entry></entry>
304 <entry><emphasis role="bold">VM&rarr;Host</emphasis></entry>
305 <entry><emphasis role="bold">VM&larr;Host</emphasis></entry>
306 <entry><emphasis role="bold">VM1&harr;VM2</emphasis></entry>
307 <entry><emphasis role="bold">VM&rarr;Net/LAN</emphasis></entry>
308 <entry><emphasis role="bold">VM&larr;Net/LAN</emphasis></entry>
309 </row>
310 </thead>
311 <tbody valign="middle">
312 <row>
313 <entry>Host-only</entry>
314 <entry><emphasis role="bold">+</emphasis></entry>
315 <entry><emphasis role="bold">+</emphasis></entry>
316 <entry align="center"><emphasis role="bold">+</emphasis></entry>
317 <entry>&ndash;</entry>
318 <entry>&ndash;</entry>
319 </row>
320 <row>
321 <entry>Internal</entry>
322 <entry>&ndash;</entry>
323 <entry>&ndash;</entry>
324 <entry><emphasis role="bold">+</emphasis></entry>
325 <entry>&ndash;</entry>
326 <entry>&ndash;</entry>
327 </row>
328 <row>
329 <entry>Bridged</entry>
330 <entry><emphasis role="bold">+</emphasis></entry>
331 <entry><emphasis role="bold">+</emphasis></entry>
332 <entry><emphasis role="bold">+</emphasis></entry>
333 <entry><emphasis role="bold">+</emphasis></entry>
334 <entry><emphasis role="bold">+</emphasis></entry>
335 </row>
336 <row>
337 <entry>NAT</entry>
338 <entry><emphasis role="bold">+</emphasis></entry>
339 <entry><link linkend="natforward">Port forward</link></entry>
340 <entry>&ndash;</entry>
341 <entry><emphasis role="bold">+</emphasis></entry>
342 <entry><link linkend="natforward">Port forward</link></entry>
343 </row>
344 <row>
345 <entry>NATservice</entry>
346 <entry><emphasis role="bold">+</emphasis></entry>
347 <entry><link linkend="network_nat_service">Port forward</link></entry>
348 <entry><emphasis role="bold">+</emphasis></entry>
349 <entry><emphasis role="bold">+</emphasis></entry>
350 <entry><link linkend="network_nat_service">Port forward</link></entry>
351 </row>
352 </tbody>
353 </tgroup>
354 </table>
355
356 <para>
357 The following sections describe the available network modes in
358 more detail.
359 </para>
360
361 </sect1>
362
363 <sect1 id="network_nat">
364
365 <title>Network Address Translation (NAT)</title>
366
367 <para>
368 Network Address Translation (NAT) is the simplest way of accessing
369 an external network from a virtual machine. Usually, it does not
370 require any configuration on the host network and guest system.
371 For this reason, it is the default networking mode in VirtualBox.
372 </para>
373
374 <para>
375 A virtual machine with NAT enabled acts much like a real computer
376 that connects to the Internet through a router. The router, in
377 this case, is the VirtualBox networking engine, which maps traffic
378 from and to the virtual machine transparently. In VirtualBox this
379 router is placed between each virtual machine and the host. This
380 separation maximizes security since by default virtual machines
381 cannot talk to each other.
382 </para>
383
384 <para>
385 The disadvantage of NAT mode is that, much like a private network
386 behind a router, the virtual machine is invisible and unreachable
387 from the outside internet. You cannot run a server this way unless
388 you set up port forwarding. See <xref linkend="natforward"/>.
389 </para>
390
391 <para>
392 The network frames sent out by the guest operating system are
393 received by VirtualBox's NAT engine, which extracts the TCP/IP
394 data and resends it using the host operating system. To an
395 application on the host, or to another computer on the same
396 network as the host, it looks like the data was sent by the
397 VirtualBox application on the host, using an IP address belonging
398 to the host. VirtualBox listens for replies to the packages sent,
399 and repacks and resends them to the guest machine on its private
400 network.
401 </para>
402
403 <para>
404 The virtual machine receives its network address and configuration
405 on the private network from a DHCP server integrated into
406 VirtualBox. The IP address thus assigned to the virtual machine is
407 usually on a completely different network than the host. As more
408 than one card of a virtual machine can be set up to use NAT, the
409 first card is connected to the private network 10.0.2.0, the
410 second card to the network 10.0.3.0 and so on. If you need to
411 change the guest-assigned IP range, see
412 <xref linkend="changenat" />.
413 </para>
414
415 <sect2 id="natforward">
416
417 <title>Configuring Port Forwarding with NAT</title>
418
419 <para>
420 As the virtual machine is connected to a private network
421 internal to VirtualBox and invisible to the host, network
422 services on the guest are not accessible to the host machine or
423 to other computers on the same network. However, like a physical
424 router, VirtualBox can make selected services available to the
425 world outside the guest through <emphasis>port
426 forwarding</emphasis>. This means that VirtualBox listens to
427 certain ports on the host and resends all packets which arrive
428 there to the guest, on the same or a different port.
429 </para>
430
431 <para>
432 To an application on the host or other physical (or virtual)
433 machines on the network, it looks as though the service being
434 proxied is actually running on the host. This also means that
435 you cannot run the same service on the same ports on the host.
436 However, you still gain the advantages of running the service in
437 a virtual machine. For example, services on the host machine or
438 on other virtual machines cannot be compromised or crashed by a
439 vulnerability or a bug in the service, and the service can run
440 in a different operating system than the host system.
441 </para>
442
443 <para>
444 To configure port forwarding you can use the graphical Port
445 Forwarding editor which can be found in the Network Settings
446 dialog for network adaptors configured to use NAT. Here, you can
447 map host ports to guest ports to allow network traffic to be
448 routed to a specific port in the guest.
449 </para>
450
451 <para>
452 Alternatively, the command line tool
453 <computeroutput>VBoxManage</computeroutput> can be used. See
454 <xref linkend="vboxmanage-modifyvm" />.
455 </para>
456
457 <para>
458 You will need to know which ports on the guest the service uses
459 and to decide which ports to use on the host. You may want to
460 use the same ports on the guest and on the host. You can use any
461 ports on the host which are not already in use by a service. For
462 example, to set up incoming NAT connections to an
463 <computeroutput>ssh</computeroutput> server in the guest, use
464 the following command:
465
466<screen>VBoxManage modifyvm "VM name" --natpf1 "guestssh,tcp,,2222,,22"</screen>
467
468 With the above example, all TCP traffic arriving on port 2222 on
469 any host interface will be forwarded to port 22 in the guest.
470 The protocol name <computeroutput>tcp</computeroutput> is a
471 mandatory attribute defining which protocol should be used for
472 forwarding, <computeroutput>udp</computeroutput> could also be
473 used. The name <computeroutput>guestssh</computeroutput> is
474 purely descriptive and will be auto-generated if omitted. The
475 number after <computeroutput>--natpf</computeroutput> denotes
476 the network card, as with other VBoxManage command.
477 </para>
478
479 <para>
480 To remove this forwarding rule, use the following command:
481
482<screen>VBoxManage modifyvm "VM name" --natpf1 delete "guestssh"</screen>
483 </para>
484
485 <para>
486 If for some reason the guest uses a static assigned IP address
487 not leased from the built-in DHCP server, it is required to
488 specify the guest IP when registering the forwarding rule:
489
490<screen>VBoxManage modifyvm "VM name" --natpf1 "guestssh,tcp,,2222,10.0.2.19,22"</screen>
491
492 This example is identical to the previous one, except that the
493 NAT engine is being told that the guest can be found at the
494 10.0.2.19 address.
495 </para>
496
497 <para>
498 To forward <emphasis>all</emphasis> incoming traffic from a
499 specific host interface to the guest, specify the IP of that
500 host interface like this:
501
502<screen>VBoxManage modifyvm "VM name" --natpf1 "guestssh,tcp,127.0.0.1,2222,,22"</screen>
503
504 This forwards all TCP traffic arriving on the localhost
505 interface (127.0.0.1) via port 2222 to port 22 in the guest.
506 </para>
507
508 <para>
509 It is possible to configure incoming NAT connections while the
510 VM is running, see <xref linkend="vboxmanage-controlvm"/>.
511 </para>
512
513 </sect2>
514
515 <sect2 id="nat-tftp">
516
517 <title>PXE Booting with NAT</title>
518
519 <para>
520 PXE booting is now supported in NAT mode. The NAT DHCP server
521 provides a boot file name of the form
522 <computeroutput>vmname.pxe</computeroutput> if the directory
523 <computeroutput>TFTP</computeroutput> exists in the directory
524 where the user's <computeroutput>VirtualBox.xml</computeroutput>
525 file is kept. It is the responsibility of the user to provide
526 <computeroutput>vmname.pxe</computeroutput>.
527 </para>
528
529 </sect2>
530
531 <sect2 id="nat-limitations">
532
533 <title>NAT Limitations</title>
534
535 <para>
536 There are some limitations of NAT mode which users should be
537 aware of, as follows:
538 </para>
539
540 <itemizedlist>
541
542 <listitem>
543 <para>
544 <emphasis role="bold">ICMP protocol limitations.</emphasis>
545 Some frequently used network debugging tools, such as
546 <computeroutput>ping</computeroutput> or tracerouting, rely
547 on the ICMP protocol for sending and receiving messages.
548 While ICMP support has been improved with VirtualBox 2.1,
549 meaning <computeroutput>ping</computeroutput> should now
550 work, some other tools may not work reliably.
551 </para>
552 </listitem>
553
554 <listitem>
555 <para>
556 <emphasis role="bold">Receiving of UDP
557 broadcasts.</emphasis> The guest does not reliably receive
558 UDP broadcasts. In order to save resources, it only listens
559 for a certain amount of time after the guest has sent UDP
560 data on a particular port. As a consequence, NetBios name
561 resolution based on broadcasts does not always work, but
562 WINS always works. As a workaround, you can use the numeric
563 IP of the desired server in the
564 <computeroutput>\\server\share</computeroutput> notation.
565 </para>
566 </listitem>
567
568 <listitem>
569 <para>
570 <emphasis role="bold">Some protocols are not
571 supported.</emphasis> Protocols other than TCP and UDP are
572 not supported. GRE is not supported. This means some VPN
573 products, such as PPTP from Microsoft, cannot be used. There
574 are other VPN products which use only TCP and UDP.
575 </para>
576 </listitem>
577
578 <listitem>
579 <para>
580 <emphasis role="bold">Forwarding host ports below
581 1024.</emphasis> On Unix-based hosts, such as Linux,
582 Solaris, and Mac OS X, it is not possible to bind to ports
583 below 1024 from applications that are not run by
584 <computeroutput>root</computeroutput>. As a result, if you
585 try to configure such a port forwarding, the VM will refuse
586 to start.
587 </para>
588 </listitem>
589
590 </itemizedlist>
591
592 <para>
593 These limitations normally do not affect standard network use.
594 But the presence of NAT has also subtle effects that may
595 interfere with protocols that are normally working. One example
596 is NFS, where the server is often configured to refuse
597 connections from non-privileged ports, which are those ports not
598 below 1024.
599 </para>
600
601 </sect2>
602
603 </sect1>
604
605 <sect1 id="network_nat_service">
606
607 <title>Network Address Translation Service</title>
608
609 <para>
610 The Network Address Translation (NAT) service works in a similar
611 way to a home router, grouping the systems using it into a network
612 and preventing systems outside of this network from directly
613 accessing systems inside it, but letting systems inside
614 communicate with each other and with systems outside using TCP and
615 UDP over IPv4 and IPv6.
616 </para>
617
618 <para>
619 A NAT service is attached to an internal network. Virtual machines
620 which are to make use of it should be attached to that internal
621 network. The name of internal network is chosen when the NAT
622 service is created and the internal network will be created if it
623 does not already exist. An example command to create a NAT network
624 is:
625 </para>
626
627 <para>
628<screen>VBoxManage natnetwork add --netname natnet1 --network "192.168.15.0/24" --enable</screen>
629 </para>
630
631 <para>
632 Here, natnet1 is the name of the internal network to be used and
633 192.168.15.0/24 is the network address and mask of the NAT service
634 interface. By default in this static configuration the gateway
635 will be assigned the address 192.168.15.1, the address following
636 the interface address, though this is subject to change. To attach
637 a DHCP server to the internal network, we modify the example as
638 follows:
639 </para>
640
641 <para>
642<screen>VBoxManage natnetwork add --netname natnet1 --network "192.168.15.0/24" --enable --dhcp on</screen>
643 </para>
644
645 <para>
646 To add a DHCP server to an existing network:
647 </para>
648
649 <para>
650<screen>VBoxManage natnetwork modify --netname natnet1 --dhcp on</screen>
651 </para>
652
653 <para>
654 To disable the DHCP server:
655 </para>
656
657 <para>
658<screen>VBoxManage natnetwork modify --netname natnet1 --dhcp off</screen>
659 </para>
660
661 <para>
662 A DHCP server provides a list of registered nameservers, but does
663 not map servers from the 127/8 network.
664 </para>
665
666 <para>
667 To start the NAT service, use the following command:
668 </para>
669
670 <para>
671<screen>VBoxManage natnetwork start --netname natnet1</screen>
672 </para>
673
674 <para>
675 If the network has a DHCP server attached then it will start
676 together with the NAT network service.
677 </para>
678
679 <para>
680 To stops the NAT network service, together with any DHCP server:
681 </para>
682
683 <para>
684<screen>VBoxManage natnetwork stop --netname natnet1</screen>
685 </para>
686
687 <para>
688 To delete the NAT network service:
689 </para>
690
691 <para>
692<screen>VBoxManage natnetwork remove --netname natnet1</screen>
693 </para>
694
695 <para>
696 This command does not remove the DHCP server if one is enabled on
697 the internal network.
698 </para>
699
700 <para>
701 Port-forwarding is supported, using the
702 <computeroutput>--port-forward-4</computeroutput> switch for IPv4
703 and <computeroutput>--port-forward-6</computeroutput> for IPv6.
704 For example:
705 </para>
706
707 <para>
708<screen>VBoxManage natnetwork modify \
709 --netname natnet1 --port-forward-4 "ssh:tcp:[]:1022:[192.168.15.5]:22"</screen>
710 </para>
711
712 <para>
713 This adds a port-forwarding rule from the host's TCP 1022 port to
714 the port 22 on the guest with IP address 192.168.15.5. Host port,
715 guest port and guest IP are mandatory. To delete the rule, use:
716 </para>
717
718 <para>
719<screen>VBoxManage natnetwork modify --netname natnet1 --port-forward-4 delete ssh</screen>
720 </para>
721
722 <para>
723 It is possible to bind a NAT service to specified interface. For
724 example:
725 </para>
726
727<screen>VBoxManage setextradata global "NAT/win-nat-test-0/SourceIp4" 192.168.1.185</screen>
728
729 <para>
730 To see the list of registered NAT networks, use:
731 </para>
732
733 <para>
734<screen>VBoxManage list natnetworks</screen>
735 </para>
736
737 </sect1>
738
739 <sect1 id="network_bridged">
740
741 <title>Bridged Networking</title>
742
743 <para>
744 With bridged networking, VirtualBox uses a device driver on your
745 <emphasis>host</emphasis> system that filters data from your
746 physical network adapter. This driver is therefore called a
747 <emphasis>net filter</emphasis> driver. This allows VirtualBox to
748 intercept data from the physical network and inject data into it,
749 effectively creating a new network interface in software. When a
750 guest is using such a new software interface, it looks to the host
751 system as though the guest were physically connected to the
752 interface using a network cable. The host can send data to the
753 guest through that interface and receive data from it. This means
754 that you can set up routing or bridging between the guest and the
755 rest of your network.
756 </para>
757
758 <para>
759 For this to work, VirtualBox needs a device driver on your host
760 system. The way bridged networking works has been completely
761 rewritten with VirtualBox 2.0 and 2.1, depending on the host
762 operating system. From the user perspective, the main difference
763 is that complex configuration is no longer necessary on any of the
764 supported host operating systems.
765
766 <footnote>
767
768 <para>
769 For Mac OS X and Solaris hosts, net filter drivers were
770 already added in VirtualBox 2.0, as initial support for Host
771 Interface Networking on these platforms. With VirtualBox 2.1,
772 net filter drivers were also added for the Windows and Linux
773 hosts, replacing the mechanisms previously present in
774 VirtualBox for those platforms; especially on Linux, the
775 earlier method required creating TAP interfaces and bridges,
776 which was complex and varied from one distribution to the
777 next. None of this is necessary anymore. Bridged network was
778 formerly called Host Interface Networking and has been renamed
779 with version 2.2 without any change in functionality.
780 </para>
781
782 </footnote>
783 </para>
784
785 <note>
786 <para>
787 Even though TAP is no longer necessary on Linux with bridged
788 networking, you <emphasis>can</emphasis> still use TAP
789 interfaces for certain advanced setups, since you can connect a
790 VM to any host interface.
791 </para>
792 </note>
793
794 <para>
795 To enable bridged networking, open the Settings dialog of a
796 virtual machine, go to the Network page and select
797 <emphasis role="bold">Bridged Network</emphasis> in the drop-down
798 list for the Attached To field. Select a host interface from the
799 list at the bottom of the page, which contains the physical
800 network interfaces of your systems. On a typical MacBook, for
801 example, this will allow you to select between en1: AirPort, which
802 is the wireless interface, and en0: Ethernet, which represents the
803 interface with a network cable.
804 </para>
805
806 <note>
807 <para>
808 Bridging to a wireless interface is done differently from
809 bridging to a wired interface, because most wireless adapters do
810 not support promiscuous mode. All traffic has to use the MAC
811 address of the host's wireless adapter, and therefore VirtualBox
812 needs to replace the source MAC address in the Ethernet header
813 of an outgoing packet to make sure the reply will be sent to the
814 host interface. When VirtualBox sees an incoming packet with a
815 destination IP address that belongs to one of the virtual
816 machine adapters it replaces the destination MAC address in the
817 Ethernet header with the VM adapter's MAC address and passes it
818 on. VirtualBox examines ARP and DHCP packets in order to learn
819 the IP addresses of virtual machines.
820 </para>
821 </note>
822
823 <para>
824 Depending on your host operating system, the following limitations
825 apply:
826 </para>
827
828 <itemizedlist>
829
830 <listitem>
831 <para>
832 <emphasis role="bold">Mac OS X hosts.</emphasis> Functionality
833 is limited when using AirPort, the Mac's wireless networking
834 system, for bridged networking. Currently, VirtualBox supports
835 only IPv4 and IPv6 over AirPort. For other protocols, such as
836 IPX, you must choose a wired interface.
837 </para>
838 </listitem>
839
840 <listitem>
841 <para>
842 <emphasis role="bold">Linux hosts.</emphasis> Functionality is
843 limited when using wireless interfaces for bridged networking.
844 Currently, VirtualBox supports only IPv4 and IPv6 over
845 wireless. For other protocols, such as IPX, you must choose a
846 wired interface.
847 </para>
848
849 <para>
850 Also, setting the MTU to less than 1500 bytes on wired
851 interfaces provided by the sky2 driver on the Marvell Yukon II
852 EC Ultra Ethernet NIC is known to cause packet losses under
853 certain conditions.
854 </para>
855
856 <para>
857 Some adapters strip VLAN tags in hardware. This does not allow
858 to use VLAN trunking between VM and the external network with
859 pre-2.6.27 Linux kernels nor with host operating systems other
860 than Linux.
861 </para>
862 </listitem>
863
864 <listitem>
865 <para>
866 <emphasis role="bold">Solaris hosts.</emphasis> There is no
867 support for using wireless interfaces. Filtering guest traffic
868 using IPFilter is also not completely supported due to
869 technical restrictions of the Solaris networking subsystem.
870 These issues would be addressed in a future release of Solaris
871 11.
872 </para>
873
874 <para>
875 Starting with VirtualBox 4.1, on Solaris 11 hosts build 159
876 and above, it is possible to use Solaris Crossbow Virtual
877 Network Interfaces (VNICs) directly with VirtualBox without
878 any additional configuration other than each VNIC must be
879 exclusive for every guest network interface.
880 </para>
881
882 <para>
883 Starting with VirtualBox 2.0.4 and up to VirtualBox 4.0, VNICs
884 can be used, but with the following caveats:
885 </para>
886
887 <itemizedlist>
888
889 <listitem>
890 <para>
891 A VNIC cannot be shared between multiple guest network
892 interfaces. For example, each guest network interface must
893 have its own, exclusive VNIC.
894 </para>
895 </listitem>
896
897 <listitem>
898 <para>
899 The VNIC and the guest network interface that uses the
900 VNIC must be assigned identical MAC addresses.
901 </para>
902 </listitem>
903
904 </itemizedlist>
905
906 <para>
907 When using VLAN interfaces with VirtualBox, they must be named
908 according to the PPA-hack naming scheme, such as e1000g513001.
909 Otherwise, the guest may receive packets in an unexpected
910 format.
911 </para>
912 </listitem>
913
914 </itemizedlist>
915
916 </sect1>
917
918 <sect1 id="network_internal">
919
920 <title>Internal Networking</title>
921
922 <para>
923 Internal Networking is similar to bridged networking in that the
924 VM can directly communicate with the outside world. However, the
925 outside world is limited to other VMs on the same host which
926 connect to the same internal network.
927 </para>
928
929 <para>
930 Even though technically, everything that can be done using
931 internal networking can also be done using bridged networking,
932 there are security advantages with internal networking. In bridged
933 networking mode, all traffic goes through a physical interface of
934 the host system. It is therefore possible to attach a packet
935 sniffer such as Wireshark to the host interface and log all
936 traffic that goes over it. If, for any reason, you prefer two or
937 more VMs on the same machine to communicate privately, hiding
938 their data from both the host system and the user, bridged
939 networking therefore is not an option.
940 </para>
941
942 <para>
943 Internal networks are created automatically as needed. There is no
944 central configuration. Every internal network is identified simply
945 by its name. Once there is more than one active virtual network
946 card with the same internal network ID, the VirtualBox support
947 driver will automatically <emphasis>wire</emphasis> the cards and
948 act as a network switch. The VirtualBox support driver implements
949 a complete Ethernet switch and supports both broadcast/multicast
950 frames and promiscuous mode.
951 </para>
952
953 <para>
954 In order to attach a VM's network card to an internal network, set
955 its networking mode to Internal Networking. There are two ways to
956 accomplish this:
957 </para>
958
959 <itemizedlist>
960
961 <listitem>
962 <para>
963 Use the VM's Settings dialog in the VirtualBox graphical user
964 interface. In the Networking category of the settings dialog,
965 select <emphasis role="bold">Internal Networking</emphasis>
966 from the drop-down list of networking modes. Select the name
967 of an existing internal network from the drop-down list below,
968 or enter a new name into the entry field.
969 </para>
970 </listitem>
971
972 <listitem>
973 <para>
974 Use the command line, for example:
975 </para>
976
977<screen>VBoxManage modifyvm "VM name" --nic&lt;x&gt; intnet</screen>
978
979 <para>
980 Optionally, you can specify a network name with the command:
981 </para>
982
983<screen>VBoxManage modifyvm "VM name" --intnet&lt;x&gt; "network name"</screen>
984
985 <para>
986 If you do not specify a network name, the network card will be
987 attached to the network
988 <computeroutput>intnet</computeroutput> by default.
989 </para>
990 </listitem>
991
992 </itemizedlist>
993
994 <para>
995 Unless you configure the virtual network cards in the guest
996 operating systems that are participating in the internal network
997 to use static IP addresses, you may want to use the DHCP server
998 that is built into VirtualBox to manage IP addresses for the
999 internal network. See <xref linkend="vboxmanage-dhcpserver" />.
1000 </para>
1001
1002 <para>
1003 As a security measure, by default, the Linux implementation of
1004 internal networking only allows VMs running under the same user ID
1005 to establish an internal network. However, it is possible to
1006 create a shared internal networking interface, accessible by users
1007 with different user IDs.
1008 </para>
1009
1010 </sect1>
1011
1012 <sect1 id="network_hostonly">
1013
1014 <title>Host-Only Networking</title>
1015
1016 <para>
1017 Host-only networking is another networking mode that was added
1018 with version 2.2 of VirtualBox. It can be thought of as a hybrid
1019 between the bridged and internal networking modes. As with bridged
1020 networking, the virtual machines can talk to each other and the
1021 host as if they were connected through a physical Ethernet switch.
1022 As with internal networking, a physical networking interface need
1023 not be present, and the virtual machines cannot talk to the world
1024 outside the host since they are not connected to a physical
1025 networking interface.
1026 </para>
1027
1028 <para>
1029 When host-only networking is used, VirtualBox creates a new
1030 software interface on the host which then appears next to your
1031 existing network interfaces. In other words, whereas with bridged
1032 networking an existing physical interface is used to attach
1033 virtual machines to, with host-only networking a new
1034 <emphasis>loopback</emphasis> interface is created on the host.
1035 And whereas with internal networking, the traffic between the
1036 virtual machines cannot be seen, the traffic on the loopback
1037 interface on the host can be intercepted.
1038 </para>
1039
1040 <para>
1041 Host-only networking is particularly useful for preconfigured
1042 virtual appliances, where multiple virtual machines are shipped
1043 together and designed to cooperate. For example, one virtual
1044 machine may contain a web server and a second one a database, and
1045 since they are intended to talk to each other, the appliance can
1046 instruct VirtualBox to set up a host-only network for the two. A
1047 second, bridged, network would then connect the web server to the
1048 outside world to serve data to, but the outside world cannot
1049 connect to the database.
1050 </para>
1051
1052 <para>
1053 To change a virtual machine's virtual network interface to Host
1054 Only mode, do either of the following:
1055 </para>
1056
1057 <itemizedlist>
1058
1059 <listitem>
1060 <para>
1061 Go to the Network page in the virtual machine's Settings
1062 dialog and select <emphasis role="bold">Host-Only
1063 Networking</emphasis>.
1064 </para>
1065 </listitem>
1066
1067 <listitem>
1068 <para>
1069 On the command line, type <computeroutput>VBoxManage modifyvm
1070 "VM name" --nic&lt;x&gt; hostonly</computeroutput>. See
1071 <xref
1072 linkend="vboxmanage-modifyvm" />.
1073 </para>
1074 </listitem>
1075
1076 </itemizedlist>
1077
1078 <para>
1079 Before you can attach a VM to a host-only network you have to
1080 create at least one host-only interface. You can use the GUI for
1081 this. Choose <emphasis role="bold">File</emphasis>,
1082 <emphasis role="bold">Preferences</emphasis>,
1083 <emphasis role="bold">Network</emphasis>,
1084 <emphasis role="bold">Host-Only Network</emphasis>,
1085 <emphasis role="bold">(+)Add Host-Only Network</emphasis>.
1086 </para>
1087
1088 <para>
1089 Alternatively, you can use the command line:
1090 </para>
1091
1092<screen>VBoxManage hostonlyif create</screen>
1093
1094 <para>
1095 See <xref linkend="vboxmanage-hostonlyif" />.
1096 </para>
1097
1098 <para>
1099 For host-only networking, as with internal networking, you may
1100 find the DHCP server useful that is built into VirtualBox. This
1101 can be enabled to then manage the IP addresses in the host-only
1102 network since otherwise you would need to configure all IP
1103 addresses statically.
1104 </para>
1105
1106 <itemizedlist>
1107
1108 <listitem>
1109 <para>
1110 In the VirtualBox graphical user interface, you can configure
1111 all these items in the global settings by choosing
1112 <emphasis role="bold">File</emphasis>,
1113 <emphasis role="bold">Preferences</emphasis>,
1114 <emphasis role="bold">Network</emphasis>. This lists all
1115 host-only networks which are presently in use. Click on the
1116 network name and then on
1117 <emphasis role="bold">Edit</emphasis>. You can then modify the
1118 adapter and DHCP settings.
1119 </para>
1120 </listitem>
1121
1122 <listitem>
1123 <para>
1124 Alternatively, you can use <computeroutput>VBoxManage
1125 dhcpserver</computeroutput> on the command line. See
1126 <xref
1127 linkend="vboxmanage-dhcpserver" />.
1128 </para>
1129 </listitem>
1130
1131 </itemizedlist>
1132
1133 <note>
1134 <para>
1135 On Linux and Mac OS X hosts the number of host-only interfaces
1136 is limited to 128. There is no such limit for Solaris and
1137 Windows hosts.
1138 </para>
1139 </note>
1140
1141 </sect1>
1142
1143 <sect1 id="network_udp_tunnel">
1144
1145 <title>UDP Tunnel Networking</title>
1146
1147 <para>
1148 This networking mode allows you to interconnect virtual machines
1149 running on different hosts.
1150 </para>
1151
1152 <para>
1153 Technically this is done by encapsulating Ethernet frames sent or
1154 received by the guest network card into UDP/IP datagrams, and
1155 sending them over any network available to the host.
1156 </para>
1157
1158 <para>
1159 UDP Tunnel mode has the following parameters:
1160 </para>
1161
1162 <itemizedlist>
1163
1164 <listitem>
1165 <para>
1166 <emphasis role="bold">Source UDP port:</emphasis> The port on
1167 which the host listens. Datagrams arriving on this port from
1168 any source address will be forwarded to the receiving part of
1169 the guest network card.
1170 </para>
1171 </listitem>
1172
1173 <listitem>
1174 <para>
1175 <emphasis role="bold">Destination address:</emphasis> IP
1176 address of the target host of the transmitted data.
1177 </para>
1178 </listitem>
1179
1180 <listitem>
1181 <para>
1182 <emphasis role="bold">Destination UDP port:</emphasis> Port
1183 number to which the transmitted data is sent.
1184 </para>
1185 </listitem>
1186
1187 </itemizedlist>
1188
1189 <para>
1190 When interconnecting two virtual machines on two different hosts,
1191 their IP addresses must be swapped. On a single host, source and
1192 destination UDP ports must be swapped.
1193 </para>
1194
1195 <para>
1196 In the following example, host 1 uses the IP address 10.0.0.1 and
1197 host 2 uses IP address 10.0.0.2. To configure using the
1198 command-line:
1199 </para>
1200
1201<screen> VBoxManage modifyvm "VM 01 on host 1" --nic&lt;x&gt; generic
1202 VBoxManage modifyvm "VM 01 on host 1" --nicgenericdrv&lt;x&gt; UDPTunnel
1203 VBoxManage modifyvm "VM 01 on host 1" --nicproperty&lt;x&gt; dest=10.0.0.2
1204 VBoxManage modifyvm "VM 01 on host 1" --nicproperty&lt;x&gt; sport=10001
1205 VBoxManage modifyvm "VM 01 on host 1" --nicproperty&lt;x&gt; dport=10002</screen>
1206
1207<screen> VBoxManage modifyvm "VM 02 on host 2" --nic&lt;y&gt; generic
1208 VBoxManage modifyvm "VM 02 on host 2" --nicgenericdrv&lt;y&gt; UDPTunnel
1209 VBoxManage modifyvm "VM 02 on host 2" --nicproperty&lt;y&gt; dest=10.0.0.1
1210 VBoxManage modifyvm "VM 02 on host 2" --nicproperty&lt;y&gt; sport=10002
1211 VBoxManage modifyvm "VM 02 on host 2" --nicproperty&lt;y&gt; dport=10001</screen>
1212
1213 <para>
1214 Of course, you can always interconnect two virtual machines on the
1215 same host, by setting the destination address parameter to
1216 127.0.0.1 on both. It will act similarly to an internal network in
1217 this case. However, the host can see the network traffic which it
1218 could not in the normal internal network case.
1219 </para>
1220
1221 <note>
1222 <para>
1223 On Unix-based hosts, such as Linux, Solaris, and Mac OS X, it is
1224 not possible to bind to ports below 1024 from applications that
1225 are not run by <computeroutput>root</computeroutput>. As a
1226 result, if you try to configure such a source UDP port, the VM
1227 will refuse to start.
1228 </para>
1229 </note>
1230
1231 </sect1>
1232
1233 <sect1 id="network_vde">
1234
1235 <title>VDE Networking</title>
1236
1237 <para>
1238 Virtual Distributed Ethernet (VDE)
1239
1240 <footnote>
1241
1242 <para>
1243 VDE is a project developed by Renzo Davoli, Associate
1244 Professor at the University of Bologna, Italy.
1245 </para>
1246
1247 </footnote>
1248
1249 is a flexible, virtual network infrastructure system, spanning
1250 across multiple hosts in a secure way. It allows for L2/L3
1251 switching, including spanning-tree protocol, VLANs, and WAN
1252 emulation. It is an optional part of VirtualBox which is only
1253 included in the source code.
1254 </para>
1255
1256 <para>
1257 The basic building blocks of the infrastructure are VDE switches,
1258 VDE plugs and VDE wires which inter-connect the switches.
1259 </para>
1260
1261 <para>
1262 The VirtualBox VDE driver has a single parameter: VDE network.
1263 This is the name of the VDE network switch socket to which the VM
1264 will be connected.
1265 </para>
1266
1267 <para>
1268 The following basic example shows how to connect a virtual machine
1269 to a VDE switch.
1270 </para>
1271
1272 <orderedlist>
1273
1274 <listitem>
1275 <para>
1276 Create a VDE switch:
1277 </para>
1278
1279<screen>vde_switch -s /tmp/switch1</screen>
1280 </listitem>
1281
1282 <listitem>
1283 <para>
1284 Configure VMs using the command-line:
1285 </para>
1286
1287<screen>VBoxManage modifyvm "VM name" --nic&lt;x&gt; generic</screen>
1288
1289<screen>VBoxManage modifyvm "VM name" --nicgenericdrv&lt;x&gt; VDE</screen>
1290
1291 <para>
1292 To connect to an automatically allocated switch port:
1293 </para>
1294
1295<screen>VBoxManage modifyvm "VM name" --nicproperty&lt;x&gt; network=/tmp/switch1</screen>
1296
1297 <para>
1298 To connect to a specific switch port
1299 <replaceable>n</replaceable>:
1300 </para>
1301
1302<screen>VBoxManage modifyvm "VM name" --nicproperty&lt;x&gt; network=/tmp/switch1[&lt;n&gt;]</screen>
1303
1304 <para>
1305 This command can be useful for VLANs.
1306 </para>
1307 </listitem>
1308
1309 <listitem>
1310 <para>
1311 (Optional) Map between a VDE switch port and a VLAN.
1312 </para>
1313
1314 <para>
1315 Using the switch command line:
1316 </para>
1317
1318<screen>vde$ vlan/create &lt;VLAN&gt;</screen>
1319
1320<screen>vde$ port/setvlan &lt;port&gt; &lt;VLAN&gt;</screen>
1321 </listitem>
1322
1323 </orderedlist>
1324
1325 <para>
1326 VDE is available on Linux and FreeBSD hosts only. It is only
1327 available if the VDE software and the VDE plugin library from the
1328 VirtualSquare project are installed on the host system
1329
1330 <footnote>
1331
1332 <para>
1333 For Linux hosts, the shared library libvdeplug.so must be
1334 available in the search path for shared libraries
1335 </para>
1336
1337 </footnote>
1338
1339 . For more information on setting up VDE networks, please see the
1340 documentation accompanying the software.
1341
1342 <footnote>
1343
1344 <para>
1345 <ulink
1346 url="http://wiki.virtualsquare.org/wiki/index.php/VDE_Basic_Networking">http://wiki.virtualsquare.org/wiki/index.php/VDE_Basic_Networking</ulink>.
1347 </para>
1348
1349 </footnote>
1350 </para>
1351
1352 </sect1>
1353
1354 <sect1 id="network_bandwidth_limit">
1355
1356 <title>Limiting Bandwidth for Network I/O</title>
1357
1358 <para>
1359 Starting with version 4.2, VirtualBox allows for limiting the
1360 maximum bandwidth used for network transmission. Several network
1361 adapters of one VM may share limits through bandwidth groups. It
1362 is possible to have more than one such limit.
1363 </para>
1364
1365 <note>
1366 <para>
1367 VirtualBox shapes VM traffic only in the transmit direction,
1368 delaying the packets being sent by virtual machines. It does not
1369 limit the traffic being received by virtual machines.
1370 </para>
1371 </note>
1372
1373 <para>
1374 Limits are configured through
1375 <computeroutput>VBoxManage</computeroutput>. The example below
1376 creates a bandwidth group named Limit, sets the limit to 20 Mbps
1377 and assigns the group to the first and second adapters of the VM:
1378
1379<screen>VBoxManage bandwidthctl "VM name" add Limit --type network --limit 20m
1380VBoxManage modifyvm "VM name" --nicbandwidthgroup1 Limit
1381VBoxManage modifyvm "VM name" --nicbandwidthgroup2 Limit</screen>
1382 </para>
1383
1384 <para>
1385 All adapters in a group share the bandwidth limit, meaning that in
1386 the example above the bandwidth of both adapters combined can
1387 never exceed 20 Mbps. However, if one adapter does not require
1388 bandwidth the other can use the remaining bandwidth of its group.
1389 </para>
1390
1391 <para>
1392 The limits for each group can be changed while the VM is running,
1393 with changes being picked up immediately. The example below
1394 changes the limit for the group created in the example above to
1395 100 Kbps:
1396
1397<screen>VBoxManage bandwidthctl "VM name" set Limit --limit 100k</screen>
1398 </para>
1399
1400 <para>
1401 To completely disable shaping for the first adapter of VM use the
1402 following command:
1403
1404<screen>VBoxManage modifyvm "VM name" --nicbandwidthgroup1 none</screen>
1405 </para>
1406
1407 <para>
1408 It is also possible to disable shaping for all adapters assigned
1409 to a bandwidth group while VM is running, by specifying the zero
1410 limit for the group. For example, for the bandwidth group named
1411 Limit use:
1412
1413<screen>VBoxManage bandwidthctl "VM name" set Limit --limit 0</screen>
1414 </para>
1415
1416 </sect1>
1417
1418 <sect1 id="network_performance">
1419
1420 <title>Improving Network Performance</title>
1421
1422 <para>
1423 VirtualBox provides a variety of virtual network adapters that can
1424 be attached to the host's network in a number of ways. Depending
1425 on which types of adapters and attachments are used the network
1426 performance will be different. Performance-wise the virtio network
1427 adapter is preferable over Intel PRO/1000 emulated adapters, which
1428 are preferred over the PCNet family of adapters. Both virtio and
1429 Intel PRO/1000 adapters enjoy the benefit of segmentation and
1430 checksum offloading. Segmentation offloading is essential for high
1431 performance as it allows for less context switches, dramatically
1432 increasing the sizes of packets that cross the VM/host boundary.
1433 </para>
1434
1435 <note>
1436 <para>
1437 Neither virtio nor Intel PRO/1000 drivers for Windows XP support
1438 segmentation offloading. Therefore Windows XP guests never reach
1439 the same transmission rates as other guest types. Refer to MS
1440 Knowledge base article 842264 for additional information.
1441 </para>
1442 </note>
1443
1444 <para>
1445 Three attachment types: Internal, Bridged, and Host-Only, have
1446 nearly identical performance. The Internal type is a little bit
1447 faster and uses less CPU cycles as the packets never reach the
1448 host's network stack. The NAT attachment type is the slowest and
1449 most secure of all attachment types, as it provides network
1450 address translation. The generic driver attachment is special and
1451 cannot be considered as an alternative to other attachment types.
1452 </para>
1453
1454 <para>
1455 The number of CPUs assigned to VM does not improve network
1456 performance and in some cases may hurt it due to increased
1457 concurrency in the guest.
1458 </para>
1459
1460 <para>
1461 Here is a short summary of things to check in order to improve
1462 network performance:
1463 </para>
1464
1465 <orderedlist>
1466
1467 <listitem>
1468 <para>
1469 Whenever possible use the virtio network adapter. Otherwise,
1470 use one of the Intel PRO/1000 adapters.
1471 </para>
1472 </listitem>
1473
1474 <listitem>
1475 <para>
1476 Use a Bridged attachment instead of NAT.
1477 </para>
1478 </listitem>
1479
1480 <listitem>
1481 <para>
1482 Make sure segmentation offloading is enabled in the guest OS.
1483 Usually it will be enabled by default. You can check and
1484 modify offloading settings using the
1485 <computeroutput>ethtool</computeroutput> command on Linux
1486 guests.
1487 </para>
1488 </listitem>
1489
1490 <listitem>
1491 <para>
1492 Perform a full, detailed analysis of network traffic on the
1493 VM's network adaptor using a third party tool such as
1494 Wireshark. To do this, a promiscuous mode policy needs to be
1495 used on the VM's network adaptor. Use of this mode is only
1496 possible on the following network types: NAT Network, Bridged
1497 Adapter, Internal Network, and Host-Only Adapter.
1498 </para>
1499
1500 <para>
1501 To setup a promiscuous mode policy, either select from the
1502 drop down list located in the Network Settings dialog for the
1503 network adaptor or use the command line tool
1504 <computeroutput>VBoxManage</computeroutput>. See
1505 <xref linkend="vboxmanage-modifyvm" />.
1506 </para>
1507
1508 <para>
1509 Promiscuous mode policies are as follows:
1510 </para>
1511
1512 <itemizedlist>
1513
1514 <listitem>
1515 <para>
1516 <computeroutput>deny</computeroutput>, which hides any
1517 traffic not intended for the VM's network adaptor. This is
1518 the default setting.
1519 </para>
1520 </listitem>
1521
1522 <listitem>
1523 <para>
1524 <computeroutput>allow-vms</computeroutput>, which hides
1525 all host traffic from the VM's network adaptor, but allows
1526 it to see traffic from and to other VMs.
1527 </para>
1528 </listitem>
1529
1530 <listitem>
1531 <para>
1532 <computeroutput>allow-all</computeroutput>, which removes
1533 all restrictions. The VM's network adaptor sees all
1534 traffic.
1535 </para>
1536 </listitem>
1537
1538 </itemizedlist>
1539 </listitem>
1540
1541 </orderedlist>
1542
1543 </sect1>
1544
1545</chapter>
Note: See TracBrowser for help on using the repository browser.

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