Skip to contentSkip to conversation

networking

Qemu-devel ich hier 2 participants 2 messages May 23, 2004

lore
Share & tools
lore

ich hier

author
#0 lore raw

Hi!

Something i did not understand until now (after playing for a while with this nice piece of software :) ) is the usage of tun/tap devices. As far as i understood, qemu (the running task) just allocates free device-names (tunX) as needed and runs a script /etc/qemu-ifup (if available) and thats it.
But is there any way, to tell qemu which exact (preconfigured) devices to use? Or do i have to catch the allocated devicenames, as qemu throws them at me (or my script :) ) and try to make something useful with this names (such as bridging or routing)??? It would be very nice, if there is some way (like in user-mode-linux for example) to tell qemu with arguments, how to map each emulated network-device to a predefined tun device. This way someone could configure various sets of tundevices with fixed names. Management would be much easier.
Also bridging of devices would be much cleaner and other tools which use tun/tap devices could be hardwired (even with names like "tunX" :) )

THNX in advance for your answers. Maybe i just had tomatoes on my eyes. (like we would say here in germany)

user05

#1 lore raw
Quoted 8 lines · ich hier

Hi!

Something i did not understand until now (after playing for a while with this nice piece of software :) ) is the usage of tun/tap devices. As far as i understood, qemu (the running task) just allocates free device-names (tunX) as needed and runs a script /etc/qemu-ifup (if available) and thats it.

"qemu -n other-script" will let you use a script other than /etc/qemu-ifup, if you want.

Quoted 4 lines

But is there any way, to tell qemu which exact (preconfigured) devices to use? Or do i have to catch the allocated devicenames, as qemu throws them at me (or my script :) ) and try to make something useful with this names (such as bridging or routing)???

You could use "qemu -tun-fd fd", but I'm not sure how as I've never used it directly. The man page says that an example is available at

http://bellard.org/qemu/tetrinet.html

Quoted 8 lines

It would be very nice, if there is some way (like in user-mode-linux for example) to tell qemu with arguments, how to map each emulated network-device to a predefined tun device. This way someone could configure various sets of tundevices with fixed names. Management would be much easier.
Also bridging of devices would be much cleaner and other tools which use tun/tap devices could be hardwired (even with names like "tunX" :) )

I prefer using VDE myself. It uses tap0 for ALL emulated machines on the network, instead of tun0 for machine 1, tun1 for machine 2, etc. No bridging required. Needs a bit more work to set up tho.

Quoted 4 lines

THNX in advance for your answers. Maybe i just had tomatoes on my eyes. (like we would say here in germany)

You can also try "qemu -user-net" if you wanted. Its not as good as tuntap, but a lot easier to set up. It also might be slightly buggier.

Quoted 7 lines

user05

_______________________________________________
Qemu-devel mailing list
[email protected]
http://mail.nongnu.org/mailman/listinfo/qemu-devel

Signature · 2 lines
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.