0

When I put data on a wire in qemu what sets the upper limit on the rate of data I can transmit? The situation is I set up two machines A and B

create two tap interfaces

openvpn --mktun --dev tap0 --user `id -un`
openvpn --mktun --dev tap1 --user `id -un`

bridge between them

/usr/sbin/brctl addbr br0
/usr/sbin/brctl addif br0 tap1
/usr/sbin/brctl addif br0 tap0

bring up the bridge

/sbin/ifconfig br0 10.0.0.1 netmask 255.255.255.0 broadcast 10.0.0.255

I start them with a tap device

qemu -m 256 -hda diskA.img -net nic -net tap,ifname=tap0,script=no
qemu -m 256 -hda diskB.img -net nic -net tap,ifname=tap1,script=no

The tap device writes data to a userspace, but where is that userspace ,what are its constraints and how do I control it?

pistache
  • 225
  • 1
  • 6
Dave
  • 367
  • 2
  • 5
  • 11
  • Why did you create the tap interface with openvpn? Openvpn is running in this moment? – Sacx Feb 13 '13 at 12:04

1 Answers1

0

In your case the userspace application is qemu. TUN/TAP devices are kernel space virtual devices. To control tap interface use ifconfig, ip, brctl etc.

The upper limit of your transmitted data is dictated by your CPU. If you want to control the limit then you should use tcng (traffic control language interpreter).

Also, if you want just to connect the qemu's between them, you can use just 1 tap interface and share it between qemu's.

Sacx
  • 2,581
  • 16
  • 13