Date: Sat, 7 Mar 2009 06:42:51 -0600 From: Scot Hetzel <swhetzel@gmail.com> To: phusion2k@gmail.com, freebsd-emulation@freebsd.org Subject: RE: Help configuring qemu networking tap mode Message-ID: <790a9fff0903070442v66de9f4ar140cf6e2a6f716ac@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
>I would like to get networking tap mode working. I have set the >following already. : >For an example network that uses DHCP for 192.168.1.x, I would like to >have the guest os have an IP address (static or dynamic) in the same >range. Where do I make the necessary changes? Once you have setup up tap networking, you just have to configure the guest for DHCP, and it will automatically pull the DHCP address from your networks DHCP server. The below Qemu Tap Network Setup is how I setup my host system to allow the guest systems to connect to my network. This setup doesn't use any qemu startup/shutdown scripts to add/remove the tap* interfaces from bridge0. Scot ============================================= Qemu Tap Network Setup: 1. Setup tap* networking in rc.conf: cloned_interfaces="bridge0 tap0 tap1" ifconfig_bridge0="addm rl10 addm tap0 addm tap1" ifconfig_tap0="up" ifconfig_tap1="up" 2. modify /etc/sysctl.conf net.link.tap.up_on_open=1 net.link.tap.user_open=1 3. create a tap group in /etc/group and add the users who can access the /dev/tap* to the tap group. 4. add entry to /etc/devfs.conf for tap* # /dev/tap* perm tap0 0660 own tap0 root:tap perm tap1 0660 own tap1 root:tap 5. reboot system Installing Windows XP on QEMU: 1. Create disk image: qemu-img create -f raw Windows_XP.img 8G 2. start qemu to install Windows XP: Place the Windows XP CD into the cdrom drive, and execute qemu: qemu -name windows_xp -localtime -m 512 -net nic,macaddr=52:54:DE:AD:BE:EF,model=rtl8139 -net tap,ifname=tap0,script=no -hda Windows_XP.img -cdrom /dev/acd0 -boot d NOTE: 1. /dev/acd0 can be replaced with path to a cdrom iso image 2. to use user mode networking just drop -net tap* and/or -net nic*.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?790a9fff0903070442v66de9f4ar140cf6e2a6f716ac>