Commit 9d4fb82e3caf33f353cee7b71a238fb5dd8e5efb
1 parent
9fafc9ea
update
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@767 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
49 additions
and
1 deletions
qemu-doc.texi
... | ... | @@ -548,7 +548,55 @@ Since holes are used, the displayed size of the COW disk image is not |
548 | 548 | the real one. To know it, use the @code{ls -ls} command. |
549 | 549 | @end enumerate |
550 | 550 | |
551 | -@section Direct Linux Boot and Network emulation | |
551 | +@section Network emulation | |
552 | + | |
553 | +QEMU simulates up to 6 networks cards (NE2000 boards). Each card can | |
554 | +be connected to a specific host network interface. | |
555 | + | |
556 | +@subsection Using tun/tap network interface | |
557 | + | |
558 | +This is the standard way to emulate network. QEMU adds a virtual | |
559 | +network device on your host (called @code{tun0}), and you can then | |
560 | +configure it as if it was a real ethernet card. | |
561 | + | |
562 | +As an example, you can download the @file{linux-test-xxx.tar.gz} | |
563 | +archive and copy the script @file{qemu-ifup} in @file{/etc} and | |
564 | +configure properly @code{sudo} so that the command @code{ifconfig} | |
565 | +contained in @file{qemu-ifup} can be executed as root. You must verify | |
566 | +that your host kernel supports the TUN/TAP network interfaces: the | |
567 | +device @file{/dev/net/tun} must be present. | |
568 | + | |
569 | +See @ref{direct_linux_boot} to have an example of network use with a | |
570 | +Linux distribution. | |
571 | + | |
572 | +@subsection Using the user mode network stack | |
573 | + | |
574 | +This is @emph{experimental} (version 0.5.4). You must configure qemu | |
575 | +with @code{--enable-slirp}. Then by using the option | |
576 | +@option{-user-net} or if you have no tun/tap init script, QEMU uses a | |
577 | +completely user mode network stack (you don't need root priviledge to | |
578 | +use the virtual network). The virtual network configuration is the | |
579 | +following: | |
580 | + | |
581 | +@example | |
582 | + | |
583 | +QEMU Virtual Machine <------> Firewall/DHCP server <-----> Internet | |
584 | + (10.0.2.x) | (10.0.2.2) | |
585 | + | | |
586 | + ----> DNS | |
587 | + (10.0.2.3) | |
588 | +@end example | |
589 | + | |
590 | +The QEMU VM behaves as if it was behind a firewall which blocks all | |
591 | +incoming connections. You can use a DHCP client to automatically | |
592 | +configure the network in the QEMU VM. | |
593 | + | |
594 | +In order to check that the user mode network is working, you can ping | |
595 | +the address 10.0.2.2 and verify that you got an address in the range | |
596 | +10.0.2.x from the QEMU virtual DHCP server. | |
597 | + | |
598 | +@node direct_linux_boot | |
599 | +@section Direct Linux Boot | |
552 | 600 | |
553 | 601 | This section explains how to launch a Linux kernel inside QEMU without |
554 | 602 | having to make a full bootable image. It is very useful for fast Linux | ... | ... |