Philippe Latu
2008-12-02
Hello,
I have been trying to use vde_switch + virtio enabled KVM guests and I am facing some kind of freeze problems.
The lab setup is the documented here :
http://translate.google.com/translate?u=http%3A%2F%2Fwww.linux-france.org%2Fprj%2Finetdoc%2Fcours%2Finterco.ospf%2F&hl=fr&ie=UTF-8&sl=fr&tl=en
Sorry, it's in french and the translation is quite funny.
This lab works fine with 100Mbps default interfaces.
With virtio nic model, guests are running, the OSPF routing protocol has converged, and when I try to install debian iperf package from a guest through a ssh connection, the download starts and freezes.
I'm still able to kill the ssh connection through the guest console.
Any hint ?
Luca Bigliardi
2008-12-04
Hi!
Uhm... I must admit I haven't read whole document but I jump to section 9. The setup seems quite normal. If you have a recent kvm you can avoid 'vdeq' and use kvm native vde support.
I can try to give you some suggestions to debug virtual ethernet connections (layer 2).
I suppose you have vde2 with 'debug' menu, that's to say compiled with --enable-experimental configure flag. If you have a recent .deb it is ok! :)
1. Add '-F' option to vde_switch command line to use FSTP.
2. Monitor port, fstp and vlan status on each switch. Use 'debug/list' to have a list of parameters you can monitor and, for instance, 'debug/add fstp' to start monitoring fstp or 'debug/add port/+' to start monitoring new ports.
3. Analyze virtual ethernet traffic on each switch. Use vde pdump plugin to dump or monitor traffic as explained here: http://wiki.virtualsquare.org/index.php/VDE_Basic_Networking#Dump_or_Monitor_switch_traffic
If you're not able to find a solution and you think it's a vde bug please try to find the simplest way to reproduce it and then tell us how to do that (with some examples).
HTH,
luca
Philippe Latu
2008-12-05
Hello,
Here are the debian packages I'm actually using :
$ dpkg -l kvm vde2 | grep ^ii
ii kvm 79+dfsg-2 Full virtualization on x86 hardware
ii vde2 2.2.2-3 Virtual Distributed Ethernet
I ran the lab setup with FSTP activated in vde_switch
I met the same problems.
Analysis of the pcap packet dump file shows some ip traffic is duplicated between (guests|routers).
. OSPF Hello packets frames are transmitted tagged and the protocol works fine
. SSH session frames are transmitted untagged and duplicated ! In this case, communication fails as these frames should be transmitted tagged too.
I guess the problem comes from the vlan list.
In the following list, VLAN 0 is active on ports 2,3, and 4 and it shouldn't as frames transmited between these ports should be tagged only.
vde$ vlan/allprint
0000 DATA END WITH '.'
VLAN 0000
-- Port 0001 tagged=0 active=1 status=Forwarding
-- Port 0002 tagged=0 active=1 status=Forwarding
-- Port 0003 tagged=0 active=1 status=Forwarding
-- Port 0004 tagged=0 active=1 status=Forwarding
VLAN 0012
-- Port 0002 tagged=1 active=1 status=Forwarding
-- Port 0003 tagged=1 active=1 status=Forwarding
VLAN 0013
-- Port 0002 tagged=1 active=1 status=Forwarding
-- Port 0004 tagged=1 active=1 status=Forwarding
VLAN 0023
-- Port 0003 tagged=1 active=1 status=Forwarding
-- Port 0004 tagged=1 active=1 status=Forwarding
Is there a way to deactivate VLAN 0 on ports 2, 3 and 4 ?
Am I doing anything wrong ?
The pcap sample is at the following address : http://www.linux-france.org/~platu/vde_dump.cap
Regards,
- Philippe
Philippe Latu
2008-12-05
Hello again,
A follow up to my previous post ...
I'm still stuck with duplicated untagged frames but I found a way to «deactivate» VLAN 0 and this was not the answer to my problem.
I tried this VLAN setup in order to isolate untagged frames.
VLANs 2 and 3 are only there to collect untagged frames.
vde$ vlan/print
0000 DATA END WITH '.'
VLAN 0000
-- Port 0001 tagged=0 active=1 status=Forwarding
-- Port 0002 tagged=0 active=1 status=Forwarding
VLAN 0002
-- Port 0003 tagged=0 active=1 status=Forwarding
VLAN 0003
-- Port 0004 tagged=0 active=1 status=Forwarding
VLAN 0012
-- Port 0002 tagged=1 active=1 status=Forwarding
-- Port 0003 tagged=1 active=1 status=Forwarding
VLAN 0013
-- Port 0002 tagged=1 active=1 status=Forwarding
-- Port 0004 tagged=1 active=1 status=Forwarding
VLAN 0023
-- Port 0003 tagged=1 active=1 status=Forwarding
-- Port 0004 tagged=1 active=1 status=Forwarding
.
1000 Success
vde$ port/print
0000 DATA END WITH '.'
Port 0001 untagged_vlan=0000 ACTIVE - Unnamed Allocatable
IN: pkts 291 bytes 26267
OUT: pkts 731 bytes 91913
-- endpoint ID 0008 module tuntap : tap0
Port 0002 untagged_vlan=0000 ACTIVE - Unnamed Allocatable
IN: pkts 884 bytes 117464
OUT: pkts 1729 bytes 175406
-- endpoint ID 0017 module unix prog : QEMU user=phil PID=9700 SOCK=/tmp/vde.ctl/.09700-00000
Port 0003 untagged_vlan=0002 ACTIVE - Unnamed Allocatable
IN: pkts 461 bytes 92318
OUT: pkts 1457 bytes 102717
-- endpoint ID 0019 module unix prog : QEMU user=phil PID=9701 SOCK=/tmp/vde.ctl/.09701-00000
Port 0004 untagged_vlan=0003 ACTIVE - Unnamed Allocatable
IN: pkts 291 bytes 28134
OUT: pkts 1286 bytes 84589
-- endpoint ID 0013 module unix prog : QEMU user=phil PID=9702 SOCK=/tmp/vde.ctl/.09702-00000
.
1000 Success
Any other hint ?
Philippe Latu
2008-12-07
Hello,
I finally found a workaround to my VLAN internetworking troubles with virtio !!
I had to set manually each interface MTU to 1496 bytes.
This seems to be the major difference between the non virtio and virtio nic models.
This is a very old issue of inter-VLAN routing with Linux that had disappeared many years ago.
Now: the «silly me» part of the post.
The 2 previous posts are not relevant as frame duplication in pdump plugin capture is due to the fact that one frame is seen coming in on one port and seen again coming out on another port.
It would be great if the pdump plugin capture could be restricted to one designated switch port.
VDE is a fantastic piece of software, and I hope I'll be able to virtualize more switching and internetworking labs for my students ;)).
Regards,
- Philippe
Philippe Latu
2011-02-14
Hello,
The following URLs, points to the correct documentation.
MTU manual setup is not needed anymore.
Inter-VLAN routing on top of VDE works like a charm.
Regards,