LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 02-07-2011, 10:12 AM   #1
tirab
Member
 
Registered: Dec 2010
Location: Italy, Lucca
Distribution: Slackware
Posts: 50

Rep: Reputation: 4
kvm: lan freezes when starting vmachine with 2 net cards


I'm testing kvm: a guest server with 2 network cards. When the guest starts the whole LAN freezes. If I start it with 1 net card it works with no problem.

Test: star vm - tcpdump - stop vm
tcpdump shows the same pocket received many many times
(example:
16:53:58.014920 STP 802.1d, Config, Flags [none], bridge-id 8001.00:1c:f9:fd:42:40.8001, length 42
16:53:58.014927 STP 802.1d, Config, Flags [none], bridge-id 8001.00:1c:f9:fd:42:40.8001, length 42
16:53:58.015261 STP 802.1d, Config, Flags [none], bridge-id 8001.00:1c:f9:fd:42:40.8001, length 42
...)

The message is not meaningfull. Every time a start the test I got a completely different message.

Some details:
-------------

brctl show:
Code:
bridge name	bridge id		STP enabled	interfaces
bridge0		8000.00226489f2cb	no		eth3
							qemutap0
bridge1		8000.00226489ec24	no		eth4
							qemutap1
Both eth3 and eth4 connected to the same switch

Command line for kvm:
Code:
/usr/bin/qemu-system-x86_64 -cdrom /opt/iso/slackware-13.1-install-dvd.iso -boot d -hda /vm/testoneA.img -hdb /vm/testoneB.img -m 512 -localtime -net nic,model=ne2k_pci,macaddr=52:54:00:00:0A:00 -net tap,ifname=qemutap0,script=no,downscript=no -net nic,model=ne2k_pci,macaddr=52:54:00:00:0A:01 -net tap,ifname=qemutap1,script=no,downscript=no -k it -usbdevice tablet -pidfile /var/run/qemu-testone.pid -daemonize -vnc 10.2.0.41:1
Kernel Modules:
Code:
lsmod | grep -e tun -e kvm       
kvm_amd                36097  0 
kvm                   265284  1 kvm_amd
tun                    13860  0
slackware64
Linux cariatide64 2.6.33.4 #3 SMP Wed May 12 23:13:09 CDT 2010 x86_64 Six-Core AMD Opteron(tm) Processor 8425 HE AuthenticAMD GNU/Linux

Any idea ?
Thanks
 
Old 02-07-2011, 11:54 AM   #2
r_hartman
LQ Newbie
 
Registered: Feb 2011
Location: Netherlands
Distribution: CentOS
Posts: 15

Rep: Reputation: 0
Not sure from the info above, but you're either creating a loop or having duplicate IPs. I wouldn't expect a 'freeze' from the latter, but the former definitely will; the network isn't 'frozen', but flooded by packets from your loop (compare an open microphone before a speaker; the squeal from the loop blocks out all music). That would be consistent with your tcp dump.

Any chance of duplicate MAC-addresses? I've seen this sort of thing happen before, don't remember what it was, but it was definitely an invalid interface configuration.
 
Old 02-07-2011, 01:53 PM   #3
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 995

Rep: Reputation: 115Reputation: 115
can you post ifconfig before and after the VM start?
 
Old 02-07-2011, 03:09 PM   #4
tirab
Member
 
Registered: Dec 2010
Location: Italy, Lucca
Distribution: Slackware
Posts: 50

Original Poster
Rep: Reputation: 4
First some explaination:

eth0 - host interface
eth1 and eth2 - used in bond (bond0) for a direct connection with a twin server for DRBD redundancy
eth3 belong to bridge0
eth4 belong to bridge1
eth5 belong to bridge2
eth6 belong to bridge3

virtual net for virtual machine are qemutap0 and qemutap1, bound to bridge0 and bridge1
Those interfaces are setup by the script which starts the vm

ipv6 disabled


Before starting:
Code:
root@cariatide64:~$ ifconfig -a   
bond0     Link encap:Ethernet  HWaddr 1c:c1:de:d8:03:96  
          inet addr:10.80.1.41  Bcast:10.80.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:34733 errors:0 dropped:0 overruns:0 frame:0
          TX packets:30681 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:26394024 (25.1 MiB)  TX bytes:26066492 (24.8 MiB)

bridge0   Link encap:Ethernet  HWaddr 00:22:64:89:f2:cb  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:817 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:64176 (62.6 KiB)  TX bytes:0 (0.0 B)

bridge1   Link encap:Ethernet  HWaddr 00:22:64:89:ec:24  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:817 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:64176 (62.6 KiB)  TX bytes:0 (0.0 B)

bridge2   Link encap:Ethernet  HWaddr 00:22:64:8a:3d:cc  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:816 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:64130 (62.6 KiB)  TX bytes:0 (0.0 B)

bridge3   Link encap:Ethernet  HWaddr 00:22:64:89:f9:29  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:816 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:64130 (62.6 KiB)  TX bytes:0 (0.0 B)

eth0      Link encap:Ethernet  HWaddr 00:22:64:89:f4:d7  
          inet addr:10.2.0.41  Bcast:10.2.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:774 errors:0 dropped:0 overruns:0 frame:0
          TX packets:213 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:63034 (61.5 KiB)  TX bytes:35676 (34.8 KiB)
          Memory:d9ee0000-d9f00000 

eth1      Link encap:Ethernet  HWaddr 1c:c1:de:d8:03:96  
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:17368 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15342 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:13197122 (12.5 MiB)  TX bytes:13033342 (12.4 MiB)
          Interrupt:31 Memory:dc000000-dc012800 

eth2      Link encap:Ethernet  HWaddr 1c:c1:de:d8:03:96  
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:17365 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15339 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:13196902 (12.5 MiB)  TX bytes:13033150 (12.4 MiB)
          Interrupt:32 Memory:da000000-da012800 

eth3      Link encap:Ethernet  HWaddr 00:22:64:89:f2:cb  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:831 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:77370 (75.5 KiB)  TX bytes:0 (0.0 B)
          Memory:dfae0000-dfb00000 

eth4      Link encap:Ethernet  HWaddr 00:22:64:89:ec:24  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:830 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:77306 (75.4 KiB)  TX bytes:0 (0.0 B)
          Memory:dfce0000-dfd00000 

eth5      Link encap:Ethernet  HWaddr 00:22:64:8a:3d:cc  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:829 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:77214 (75.4 KiB)  TX bytes:0 (0.0 B)
          Memory:df8e0000-df900000 

eth6      Link encap:Ethernet  HWaddr 00:22:64:89:f9:29  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:829 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:77214 (75.4 KiB)  TX bytes:0 (0.0 B)
          Memory:dfee0000-dff00000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:100 (100.0 B)  TX bytes:100 (100.0 B)
During the "freeze" period:

Code:
bond0     Link encap:Ethernet  HWaddr 1c:c1:de:d8:03:96  
          inet addr:10.80.1.41  Bcast:10.80.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:35067 errors:0 dropped:0 overruns:0 frame:0
          TX packets:31071 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:26420124 (25.1 MiB)  TX bytes:26096512 (24.8 MiB)

bridge0   Link encap:Ethernet  HWaddr 00:22:64:89:f2:cb  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2136 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:155804 (152.1 KiB)  TX bytes:42 (42.0 B)

bridge1   Link encap:Ethernet  HWaddr 00:22:64:89:ec:24  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2136 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:155804 (152.1 KiB)  TX bytes:42 (42.0 B)

bridge2   Link encap:Ethernet  HWaddr 00:22:64:8a:3d:cc  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2134 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:155712 (152.0 KiB)  TX bytes:42 (42.0 B)

bridge3   Link encap:Ethernet  HWaddr 00:22:64:89:f9:29  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2134 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:155712 (152.0 KiB)  TX bytes:42 (42.0 B)

eth0      Link encap:Ethernet  HWaddr 00:22:64:89:f4:d7  
          inet addr:10.2.0.41  Bcast:10.2.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1535 errors:0 dropped:0 overruns:0 frame:0
          TX packets:315 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:120771 (117.9 KiB)  TX bytes:60723 (59.2 KiB)
          Memory:d9ee0000-d9f00000 

eth1      Link encap:Ethernet  HWaddr 1c:c1:de:d8:03:96  
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:17535 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15537 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:13210172 (12.5 MiB)  TX bytes:13048352 (12.4 MiB)
          Interrupt:31 Memory:dc000000-dc012800 

eth2      Link encap:Ethernet  HWaddr 1c:c1:de:d8:03:96  
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:17532 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15534 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:13209952 (12.5 MiB)  TX bytes:13048160 (12.4 MiB)
          Interrupt:32 Memory:da000000-da012800 

eth3      Link encap:Ethernet  HWaddr 00:22:64:89:f2:cb  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1892 errors:0 dropped:0 overruns:0 frame:0
          TX packets:264 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:172446 (168.4 KiB)  TX bytes:15822 (15.4 KiB)
          Memory:dfae0000-dfb00000 

eth4      Link encap:Ethernet  HWaddr 00:22:64:89:ec:24  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1891 errors:0 dropped:0 overruns:0 frame:0
          TX packets:265 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:172382 (168.3 KiB)  TX bytes:15882 (15.5 KiB)
          Memory:dfce0000-dfd00000 

eth5      Link encap:Ethernet  HWaddr 00:22:64:8a:3d:cc  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2153 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:188070 (183.6 KiB)  TX bytes:42 (42.0 B)
          Memory:df8e0000-df900000 

eth6      Link encap:Ethernet  HWaddr 00:22:64:89:f9:29  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2153 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:188070 (183.6 KiB)  TX bytes:42 (42.0 B)
          Memory:dfee0000-dff00000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:6 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:300 (300.0 B)  TX bytes:300 (300.0 B)

qemutap0  Link encap:Ethernet  HWaddr 06:aa:f2:e6:f6:18  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:264 errors:0 dropped:0 overruns:0 frame:0
          TX packets:264 errors:0 dropped:1 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:15840 (15.4 KiB)  TX bytes:15840 (15.4 KiB)

qemutap1  Link encap:Ethernet  HWaddr e6:fe:f3:79:ea:88  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:264 errors:0 dropped:0 overruns:0 frame:0
          TX packets:264 errors:0 dropped:1 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:15840 (15.4 KiB)  TX bytes:15840 (15.4 KiB)
I suppose there i something similar to a loop but note that if I startup the two qemutap interface without star the virtual machine no freeze happen.

I also think that during the freeze tcpdump record one broadcast message bouncing around ...

I note that:
- bond0 and its eth1 eth2 has the same mac address which is the real address of eth1. But I think it's ok.
- each bridge gets the mac address of the phisical interface eth* bound to it. I suppose is normat too.
- the two qemutap interfaces has their own mac address
- I've tried to start the virtual machine without setting a mac address from the command line, but the freeze is the same

thanks for your help.
 
Old 02-08-2011, 12:31 AM   #5
r_hartman
LQ Newbie
 
Registered: Feb 2011
Location: Netherlands
Distribution: CentOS
Posts: 15

Rep: Reputation: 0
As I'm not really that deep into this sort of thing, I cannot comment on these duplicate MAC addresses, but I would expect MAC addresses to be unique.

Just thinking out loud:
- Your packets indicate they are STP (Spanning Tree Protocol) packets. Config?
- Your btctl output shows STP is disabled on your bridges
- STP is supposed to prevent bridge loops
- Yet the behavior of your setup is that it does suffer bridge loops

Where do these STP packets come from, when STP is disabled?
Is there a way to enable STP on your bridges?
If yes, what's the effect?
 
Old 02-08-2011, 02:54 AM   #6
tirab
Member
 
Registered: Dec 2010
Location: Italy, Lucca
Distribution: Slackware
Posts: 50

Original Poster
Rep: Reputation: 4
Smile

I've found this thread (http://www.linuxquestions.org/questi...ration-803072/) with a problem like mine, and the solution works for me too.

Not sure, but seems that when a VM has 2 net cards in the same vlan (implicit) the vm itself acts as a bridge, and so the loop.

Now I do start the vm with a "vlan=1" in for the second card and no more broadcast storm ...

Thanks to everyone and to LQ ...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Starting KVM with public bridge as normal user under Debian/Ubuntu sfxpt Linux - Virtualization and Cloud 3 02-10-2011 08:37 AM
Double network speed with net bonding of 2 LAN cards maxy7710 Linux - Newbie 2 08-04-2009 09:39 AM
LXer: Create a LAN for Virtual Servers with KVM and VDE LXer Syndicated Linux News 0 11-12-2008 03:40 PM
machine has adsl ethernet modem, to make it gateway over lan do i need more lan cards b0nd Linux - Networking 2 10-04-2005 10:19 PM
I have two net cards but only shows eth0 dexter_modem Slackware 3 07-04-2003 12:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 04:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration