You are not logged in.

#1 2009-07-20 04:48:40

tony5429
Member
Registered: 2006-03-28
Posts: 1,017

[SOLVED] Tap Networking with QEMU, while Using WICD for Network

I would like to set up tap networking with my QEMU system. I note that according to

http://wiki.archlinux.org/index.php/QEM … _with_QEMU

I am supposed to set up the network bridge to include my real adapter inside it. However, because I am using WICD, the actual adapter switches between eth0 and wlan0 depending on whether I am on ethernet or wifi. Does anyone know what my "bridge_br0=..." line in my /etc/rc.conf should look like to use either eth0 or wlan0? Thanks in advance for any help!

Last edited by tony5429 (2009-07-24 19:43:36)

Offline

#2 2009-07-20 14:26:17

tony5429
Member
Registered: 2006-03-28
Posts: 1,017

Re: [SOLVED] Tap Networking with QEMU, while Using WICD for Network

Actually, I think if I can figure out the name of the interface WICD uses, I can use this solution for bridging the connection:

http://blog.alantan.com/2007/01/qemu-ta … ation.html

Does anyone know the name of WICD's interface which would not change between ethernet and wifi?

Offline

#3 2009-07-22 09:25:19

tony5429
Member
Registered: 2006-03-28
Posts: 1,017

Re: [SOLVED] Tap Networking with QEMU, while Using WICD for Network

Okay...I've made some progress on this problem but I'm still missing something... I've taken the following steps so far...

1. I installed uml_utilities, iproute2, and parprouted
2. I added tun to the modules array of /etc/rc.conf and rebooted
3. Before running Qemu, I run the following commands as root
    sysctl net.ipv4.ip_forward=1
    tunctl -b -u (my user name)
    ifconfig tap0 up
    ip addr add 192.168.1.108/24 dev tap0
    parprouted wlan0 tap0
4. I start Qemu with qemu-kvm -boot c -m 512 -hda /home/tony/win_xp.img -net nic,macaddr=36:7B:36:F7:F0:6F -net tap,ifname=tap0,script=no,downscript=no -localtime -k en-us -soundhw ac97 -vga std -full-screen (that mac address is the mac address for tap0)
5. In Qemu, running 64-bit Windows XP, I changed the TCP/IP properties to use the static IP 192.168.1.108, subnet mask 255.255.255.0, default gateway 192.168.1.1, preferred DNS server 216.104.64.5, and alternate DNS server 216.104.72.5.
6. After running Qemu, I shut down the interface running the following as root
    ifconfig tap0 down
    tunctl -d tap0 > /dev/null
    sysctl net.ipv4.ip_forward=0
    pkill parprouted

However, I am still unable to see the outside network from the virtual system. Does anyone have any ideas on how to solve this problem? Any help is greatly appreciated...

Offline

#4 2009-07-22 17:22:59

tony5429
Member
Registered: 2006-03-28
Posts: 1,017

Re: [SOLVED] Tap Networking with QEMU, while Using WICD for Network

Well I just learned from http://www.scottro.net/vboxbridge.html#ArchLinux that I also need to make a symlink to /usr/sbin/ip for parprouted to work correctly,

ln -s /usr/sbin/ip /sbin/ip

I will try this out when I am back on my 192.168.*.* network. I will also try setting the static IP address in my guest O/S to a unique address (rather than the same address as the tap device).

Last edited by tony5429 (2009-07-22 18:57:20)

Offline

#5 2009-07-22 17:26:11

tony5429
Member
Registered: 2006-03-28
Posts: 1,017

Re: [SOLVED] Tap Networking with QEMU, while Using WICD for Network

This may also be useful: http://www.savvyadmin.com/2008/09

Offline

#6 2009-07-23 01:32:50

tony5429
Member
Registered: 2006-03-28
Posts: 1,017

Re: [SOLVED] Tap Networking with QEMU, while Using WICD for Network

Okay; I gave the ideas I had two posts above a shot now that I am back on a 192.168.*.* network. Still no luck... I'm running out of ideas. Can anyone help?

Offline

#7 2009-07-24 19:43:24

tony5429
Member
Registered: 2006-03-28
Posts: 1,017

Re: [SOLVED] Tap Networking with QEMU, while Using WICD for Network

Well in the end I decided setting up tap networking using wireless was too difficult. I know it's possible, but it's not easy and I've not seen anyone online say they've been able to get DHCP support at the same time. So in the end I decided to just use tap networking when I'm on ethernet. If anyone comes to this page and wants to know how I did that, I ended up using the instructions at http://www.scottro.net/vboxbridge.html and it works fine now smile

Offline

Board footer

Powered by FluxBB