<meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: medium; border-collapse: collapse; "><div id=":24v" class="ii gt" style="font-size: 13px; margin-top: 5px; margin-right: 15px; margin-bottom: 5px; margin-left: 15px; padding-bottom: 20px; ">

<div id=":1no"><div><div><div>Hi,</div><div>After restarting a HN3 It doesn&#39;t connect to my MySQL server anymore (MySQL is running inside an OVZ container, called sql-server, that lives on HN3. Connections from HN1 or HN2 to MySQL work fine). The reason seems to be network related. </div>

<div><br></div><div>HN3: <a href="http://77.2.179.77/24" target="_blank" style="color: rgb(92, 69, 32); ">77.2.179.77/24</a></div><div>sql-server: <a href="http://77.2.179.120/24" target="_blank" style="color: rgb(92, 69, 32); ">77.2.179.120/24</a> (remember, it lives on HN3)</div>

<div><br></div><div>lets do a ping, from HN3 to sql-server container</div><div><br></div><div>HN3:~# ping 77.2.179.120</div><div>PING 77.2.179.120 (77.2.179.120) 56(84) bytes of data.</div><div>64 bytes from <a href="http://77.2.179.120" target="_blank" style="color: rgb(92, 69, 32); ">77.2.179.120</a>: icmp_seq=1 ttl=64 time=0.043 ms</div>

<div><br></div><div>Seems to work fine, but when we use tcpdump to examine that ping, we get this:</div><div><br></div><div>HN3:~# tcpdump ip proto 1 -i venet0</div><div>16:07:15.175602 IP 10.0.10.3 &gt; <a href="http://77.2.179.120" target="_blank" style="color: rgb(92, 69, 32); ">77.2.179.120</a>: ICMP echo request, id 33323, seq 28, length 64</div>

<div>16:07:15.175623 IP 77.2.179.120 &gt; <a href="http://10.0.10.3" target="_blank" style="color: rgb(92, 69, 32); ">10.0.10.3</a>: ICMP echo reply, id 33323, seq 28, length 64</div><div><br></div><div>Why HN3 use 10.0.10.3 src ip address instead of 77.2.179.77 ? At least it&#39;s what &#39;ip ro&#39; say: </div>

<div><br></div><div>HN3:~# ip ro</div><div>10.0.0.20 dev venet0  scope link </div><div>77.2.179.122 dev venet0  scope link </div><div>77.2.179.120 dev venet0  scope link </div><div>77.2.179.126 dev venet0  scope link </div>

<div>77.2.179.125 dev venet0  scope link </div><div><a href="http://10.0.0.0/24" target="_blank" style="color: rgb(92, 69, 32); ">10.0.0.0/24</a> dev vmbr1  proto kernel  scope link  src 10.0.0.3 </div><div><a href="http://77.2.179.0/24" target="_blank" style="color: rgb(92, 69, 32); ">77.2.179.0/24</a> dev vmbr0  proto kernel  scope link  src 77.2.179.77 </div>

<div><a href="http://10.10.0.0/24" target="_blank" style="color: rgb(92, 69, 32); ">10.10.0.0/24</a> dev eth3  proto kernel  scope link  src 10.10.0.3 </div><div><a href="http://10.0.10.0/24" target="_blank" style="color: rgb(92, 69, 32); ">10.0.10.0/24</a> dev eth2  proto kernel  scope link  src 10.0.10.3 </div>

<div>default via 77.2.179.7 dev vmbr0 </div><div><br></div><div>packets to <a href="http://77.2.179.0/24" target="_blank" style="color: rgb(92, 69, 32); ">77.2.179.0/24</a> must use 77.2.179.77 as src address.</div><div>
<br>
</div><div>What is that I&#39;m missing? Maybe &quot;venet&quot; doesn&#39;t look &#39;ip ro&#39; table? How could I force a correct src address for the ip packets to my sql-server?</div><div><br></div><div><br></div><div>

<br></div><div>Note:</div><div>packet src addr from others HN are correct:</div><div><br></div><div>16:25:53.535392 IP 77.2.179.75 &gt; <a href="http://77.2.179.120" target="_blank" style="color: rgb(92, 69, 32); ">77.2.179.120</a>: ICMP echo request, id 6748, seq 4, length 64</div>

<div>16:25:53.535423 IP 77.2.179.120 &gt; <a href="http://77.2.179.75" target="_blank" style="color: rgb(92, 69, 32); ">77.2.179.75</a>: ICMP echo reply, id 6748, seq 4, length 64</div><div><br></div><div>br</div></div></div>

</div></div></span>-- <br>Marc<br>