Connecting two tap interfaces to one qemu instance
Hello,
I've found a problem when trying to run one qemu instance with two tap devices connected to a bridge.
I mean a commandline like this:
qemu -net nic -net tap -net nic -net tap ...
After a short time (in seconds, rather than minutes, depends on the machine I'm runnig qemu) my network gets flooded with packets - mostly arp requests gathered from all over the network and replicated.
What's interesting there is no problem with running two or more qemu instances, when giving each one a tap device and connecting all of them to the same bridge - everything works fine then.
The issue appears on qemu 0.10.5 stable both in FreeBSD and Linux environment.
Have any of you tried to use two tap devices in one qemu instance? Any luck?
Any information would be greatly appreciated,
Jedrzej Kalinowski
Try turning STP on for the bridge maybe.
Quoted 28 lines · Jedrzej Kalinowski
Hello,
I've found a problem when trying to run one qemu instance with two tap devices connected to a bridge.
I mean a commandline like this:
qemu -net nic -net tap -net nic -net tap ...After a short time (in seconds, rather than minutes, depends on the machine I'm runnig qemu) my network gets flooded with packets - mostly arp requests gathered from all over the network and replicated.
What's interesting there is no problem with running two or more qemu instances, when giving each one a tap device and connecting all of them to the same bridge - everything works fine then.
The issue appears on qemu 0.10.5 stable both in FreeBSD and Linux environment.
Have any of you tried to use two tap devices in one qemu instance? Any luck?
Any information would be greatly appreciated,
Jedrzej Kalinowski
Brian Jackson pisze:
Quoted 34 lines
Try turning STP on for the bridge maybe.
Quoted 28 lines · Jedrzej Kalinowski
Hello,
I've found a problem when trying to run one qemu instance with two tap devices connected to a bridge.
I mean a commandline like this:
qemu -net nic -net tap -net nic -net tap ...After a short time (in seconds, rather than minutes, depends on the machine I'm runnig qemu) my network gets flooded with packets - mostly arp requests gathered from all over the network and replicated.
What's interesting there is no problem with running two or more qemu instances, when giving each one a tap device and connecting all of them to the same bridge - everything works fine then.
The issue appears on qemu 0.10.5 stable both in FreeBSD and Linux environment.
Have any of you tried to use two tap devices in one qemu instance? Any luck?
Any information would be greatly appreciated,
Jedrzej Kalinowski
Yes, I tried STP on bridge and it helps. But it's fighting effects, not cause of the problem
My understanding is that qemu should not work like this. Usual host with two network devices connected to the same network doesn't create loops like this.
--
Jedrzej Kalinowski
Quoted 6 lines
Yes, I tried STP on bridge and it helps. But it's fighting effects, not cause of the problem
My understanding is that qemu should not work like this. Usual host with two network devices connected to the same network doesn't create loops like this.
You aren't emulating a host with two devices. You're emulating a switch with three ports. One connected to the guest, and the other two connected to tap interfaces. Exactly the same thing will happen if you implement this topology with real hardware.
Paul
Quoted 7 lines · Jedrzej Kalinowski
Hello,
I've found a problem when trying to run one qemu instance with two tap devices connected to a bridge.
I mean a commandline like this:
qemu -net nic -net tap -net nic -net tap ...
Do this instead:
qemu -net nic,vlan=0 -net tap,vlan=0 -net nic,vlan=1 -net tap,vlan=1 ...
Quoted 6 lines · Charles Duffy
Quoted 5 lines · Jedrzej Kalinowski
Hello,
I've found a problem when trying to run one qemu instance with two tap devices connected to a bridge.
Quoted 9 lines
Quoted 2 lines
I mean a commandline like this:
qemu -net nic -net tap -net nic -net tap ...Do this instead:
qemu -net nic,vlan=0 -net tap,vlan=0 -net nic,vlan=1 -net tap,vlan=1 ...
It helped, thank you!
Signature · 1 line
Jędrzej Kalinowski