It doesn&#39;t matter if it is standby or active, the problem exists when there are 2 or more physical NICs on the virtual switch. It is caused by the physical NICs not dedicated to the VM&#39;s outbound traffic seeing the broadcast traffic (originating from the VM, but it doesn&#39;t know it because it because the VM is a bridge) and sending it to the VM. If it helps, the SR from VMware is <font size="2"><span id=":v7" class="hP">SR #1474266821</span></font>.<br>
Robert LeBlanc<br>Life Sciences &amp; Undergraduate Education Computer Support<br>Brigham Young University<br>
<br><br><div class="gmail_quote">On Thu, Jan 21, 2010 at 8:47 AM, Brad Hudson <span dir="ltr">&lt;<a href="mailto:hudson@pythian.com">hudson@pythian.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
   So are you saying that it&#39;s the standby nic on the ESX layer virtual switch that is causing this issue?  <br><br>I am actually at a vmware conference today and want to hit them up for more info.<br><br>Brad<br><br>
<p>Thumbs ... too ... big ... for ... BlackBerry</p><hr><div><b>From: </b> Robert LeBlanc &lt;<a href="mailto:robert@leblancnet.us" target="_blank">robert@leblancnet.us</a>&gt;
</div><div><b>Date: </b>Wed, 20 Jan 2010 14:32:33 -0700</div><div><b>To: </b>Brad Hudson&lt;<a href="mailto:hudson@pythian.com" target="_blank">hudson@pythian.com</a>&gt;</div><div><b>Cc: </b>&lt;<a href="mailto:bridge@lists.linux-foundation.org" target="_blank">bridge@lists.linux-foundation.org</a>&gt;</div>
<div><b>Subject: </b>Re: [Bridge] Incoming packets not always traversing the bridge</div><div><div></div><div class="h5"><div><br></div>It&#39;s on the front page, you need a google wave account to see the blog.<div><br></div>
<div>Here is the contents:</div><div><br></div><div><span style="font-family: Arial; font-size: 13px;"><p>
Interesting problem with Virtual Switches</p><p></p><p>So, after working with VMware yesterday, it is amazing how understanding a black box, can get you moving with a problem.</p><p></p><p><span style="text-decoration: underline;">The Problem:</span></p>

<p>I was trying to create a VM that would be a transparent firewall among other things for our server VMs. The problem I was seeing was that VMs behind the firewall would lose connectivity randomly. After a lot of testing, I found that it was not random, but happened when the VM sent out broadcast traffic. The Linux bridge would see the traffic originate from both sides of the bridge with the opposite port being the most recent. With the Linux bridge thinking that the VM was on the wrong port as the actual VM, the traffic would not get to the VM until the VM sent out more traffic to tell the bridge what port it was on. This caused the interruption.</p>

<p></p><p><span style="text-decoration: underline;">VMware explains:</span></p><p>After troubleshooting with creating a new virtual switch and putting one physical adapter on it, the problem disappeared. We added a second physical NIC to the switch and viola, the problem reappeared! The technician went on to explain that they &#39;cheat&#39; in their virtual switch code. Usually when connecting one switch to another you will trunk the ports, but the virtual switch doesn&#39;t do this. It offers more flexibility and more throughput for a lot less complexity. VMware just promises not to create a bridge between physical NICs (each VM is kind of assigned it&#39;s own physical NIC so it&#39;s not a real bridge). I went and did what VMware promises not to do causing my problem.</p>

<p></p><p><span style="text-decoration: underline;">Problem explained:</span></p><p>Since I was creating a bridge without trunking ports (not a real possibility in this situation), when the Linux bridge received a broadcast packet from the VM behind, it did the correct job of sending it out only the one port, this port is then assigned to a physical NIC, the physical switch that the NIC was connected to would then send out the broadcast packet to every other port on that physical switch. The second physical NIC on the ESX server would also receive the broadcast packet and send it to the bridge VM, hence the bridge VM saw the traffic on both ports. A classic case of reflection.</p>

<p></p><p><span style="text-decoration: underline;">The solution:</span></p><p>I&#39;m still working on this, but there are a couple of solutions that I can think of.</p><p style="margin-left: 17px;">1. Make the transparent bridge a router. I&#39;m not huge fan of this idea as I will have to have more connection with the network engineers and we deviate from the standard network config.</p>

<p style="margin-left: 17px;">2. Use some cleaver ebtables rules to squash duplicate broadcast frames. Although I haven&#39;t really used ebtables, it&#39;s structure is much like iptables, so it can&#39;t be too hard. I might also be able to rely on some Open Source virtual appliances that already do something similar to help me out.</p>

<p style="margin-left: 17px;"></p><p>Virtualization is great, but there are times when things just don&#39;t work the same as the physical realm. It&#39;s good to know when these times are.<span></span><span> </span></p>

</span><br>Robert LeBlanc<br>Life Sciences &amp; Undergraduate Education Computer Support<br>Brigham Young University<br>
<br><br><div class="gmail_quote">On Wed, Jan 20, 2010 at 2:29 PM, Brad Hudson <span dir="ltr">&lt;<a href="mailto:hudson@pythian.com" target="_blank">hudson@pythian.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Robert;<br>
<br>
I looked over your site and could not find the document you reference in<br>
your links.  Can you provide the url to get to it?<br>
<br>
I&#39;ll be happy to pass along anything I find and would appreciate it if<br>
you would do the same.  As the client having the issue is using it for<br>
production we may need to move to a non-bridged variety of transparent<br>
firewall with proxy_arp to get them back up quickly.  Ideally I would<br>
like to avoid that, but it&#39;s prod and needs to work.<br>
<br>
Regards;<br>
<font color="#888888"><br>
Brad<br>
</font><div><br>
Robert LeBlanc wrote:<br>
&gt; On Wed, Jan 20, 2010 at 1:04 PM, Brad Hudson &lt;<a href="mailto:hudson@pythian.com" target="_blank">hudson@pythian.com</a><br>
</div><div><div></div><div>&gt; &lt;mailto:<a href="mailto:hudson@pythian.com" target="_blank">hudson@pythian.com</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;     Hi all;<br>
&gt;<br>
&gt;     I have an odd problem that I have been dealing with for a week.  I was<br>
&gt;     hoping someone could help, or point me in the right direction for clues.<br>
&gt;<br>
&gt;     I have a standard bridge setup.  br0 is composed of eth0 and eth1.<br>
&gt;<br>
&gt;     # brctl show bro<br>
&gt;     bridge name     bridge id               STP enabled     interfaces<br>
&gt;     br0             8000.000c292280b9       no              eth0<br>
&gt;                                                            eth1<br>
&gt;<br>
&gt;     Eth0 and eth1 both have 0.0.0.0 (no) address assigned and are up.  br0<br>
&gt;     is assigned the proper IP and the routing table is correct.  STP is off.<br>
&gt;<br>
&gt;     I have been losing connectivity to hosts inside the local segment of the<br>
&gt;     bridge.  Some investigation has revealed that the problem is related to<br>
&gt;     arp not working correctly.  Arp packets going this way<br>
&gt;<br>
&gt;     eth1-&gt;br0-&gt;eth0-&gt;network/internet<br>
&gt;<br>
&gt;     have no problems at all.  The replies coming back the other way all get<br>
&gt;     to br0, but only 33% (approx, it varies) make it to the eth1 side of the<br>
&gt;     bridge.  I have verified this traffic pattern by tcpdump of arp packets<br>
&gt;     through each of these devices while doing an nmap -sP of the /24 network<br>
&gt;     to generate both arp and icmp.  We are not able to arp any host outside<br>
&gt;     our local segment, including the default gateway (which is owned by the<br>
&gt;     co-lo).  nmapping from the bridging server itself from interface br0<br>
&gt;     gets the correct number of arp replies.<br>
&gt;<br>
&gt;     ebtables and arp_tables are not running, and adding them in has had no<br>
&gt;     change in result.  There was a server with 2 NICs, each with an IP on<br>
&gt;     the same subnet, that was causing some MAC flapping but that has been<br>
&gt;     fixed and no change to the described behaviour.  All items in<br>
&gt;     /proc/sys/net/bridge are set to &#39;1&#39;, but setting them to &#39;0&#39; has no<br>
&gt;     effect.  The server hosting the bridge has been rebooted several times<br>
&gt;     with no effect.  proxy_arp does not help at all.  I also tried<br>
&gt;     parprouted with no success.<br>
&gt;<br>
&gt;     A couple other notes.<br>
&gt;<br>
&gt;     - This behaviour suddenly appeared about a week ago.  I think this is<br>
&gt;     probably related to an increase in network traffic but it&#39;s hard to say,<br>
&gt;     the client does not buy into that statement.  If it was a matter of 0<br>
&gt;     work or all work then there&#39;s places to look for that, but in this case<br>
&gt;     the problem is intermittent and the lost arp replies are not the same<br>
&gt;     every time.<br>
&gt;     - In another test we found that if we ping the inside server from the<br>
&gt;     firewall and also from an external machine the connectivity to the<br>
&gt;     inside server dies.  Once the pings are stopped, the connectivity<br>
&gt;     eventually returns.  If I ping out from the inside server while doing<br>
&gt;     that test, the session keeps going through without hanging.<br>
&gt;     - The firewall is a Vm running under ESX.  The vmxnet driver has been<br>
&gt;     reinstalled and the pcnet32 driver is not loaded.  Both NICs are virtual<br>
&gt;     so there is no chance of failed hardware, though I suppose the problem<br>
&gt;     could be on the ESX layer.  I have made some attempt to diagnose the WSX<br>
&gt;     layer but nothing jumps out at me.<br>
&gt;<br>
&gt;     I have been watching tcpdumps and do not see any sign of frags, dupes,<br>
&gt;     or anything that would cause lost packets.  I have combed the<br>
&gt;     newsgroups, google and even irc looking for clues or similar situations,<br>
&gt;     but nothing I have found fits the profile.<br>
&gt;<br>
&gt;     The workaround we currently have in place is to make a static arp entry<br>
&gt;     for the gateway on all servers on the inside.  This is not ideal because<br>
&gt;     the co-lo controls the router and it could fail over to another device<br>
&gt;     which would kill our route again.<br>
&gt;<br>
&gt;     Can anyone suggest anyplace I can look for clues, settings I should<br>
&gt;     check or other?  I am out of ideas at this point.<br>
&gt;<br>
&gt;     Your help is very much appreciated.<br>
&gt;<br>
&gt;     Regards;<br>
&gt;<br>
&gt;     Brad<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;     --<br>
&gt;     Brad Hudson<br>
&gt;     SA Team Lead<br>
&gt;     The Pythian Group - love your data<br>
&gt;     Desk: 613-565-8696 x202<br>
&gt;     IM: pythianhudson<br>
&gt;<br>
&gt;<br>
&gt; I assume you have multiple physical NICs connected to your virtual<br>
&gt; switch. If so I&#39;ve posted my finding on my web page<br>
&gt; <a href="http://robert.leblancnet.us" target="_blank">http://robert.leblancnet.us</a> and I&#39;ve posted a message to this form two<br>
&gt; days ago entitled &quot;Need help writing ebtables rules&quot;. I&#39;m not sure my<br>
&gt; messages are getting through as I&#39;ve sent a few messages with no one<br>
&gt; responding. If we can work together to solve the problem, we can both<br>
&gt; benefit.<br>
&gt;<br>
&gt; Thanks,<br>
&gt;<br>
&gt; Robert LeBlanc<br>
&gt; Life Sciences &amp; Undergraduate Education Computer Support<br>
&gt; Brigham Young University<br>
&gt;<br>
<br>
<br>
<br>
</div></div>--<br>
<div><div></div><div>Brad Hudson<br>
SA Team Lead<br>
The Pythian Group - love your data<br>
Desk: 613-565-8696 x202<br>
IM: pythianhudson<br>
</div></div></blockquote></div><br></div>

</div></div></blockquote></div><br>