<html><head></head><body><div style="color:#000; background-color:#fff; font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_ym19_1_1520216510892_18702"><span></span></div><div class="qtdSeparateBR" id="yui_3_16_0_ym19_1_1520216510892_18687"><br></div><div class="yahoo_quoted" id="yui_3_16_0_ym19_1_1520216510892_18698" style="display: block;"><div style="font-family: Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_ym19_1_1520216510892_18696"><div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_ym19_1_1520216510892_18695"><div class="y_msg_container" id="yui_3_16_0_ym19_1_1520216510892_18701"><div id="yiv7483050897"><div id="yui_3_16_0_ym19_1_1520216510892_18700"><div style="color:#000;background-color:#fff;font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;" id="yui_3_16_0_ym19_1_1520216510892_18699"><div id="yiv7483050897yui_3_16_0_ym19_1_1519917328888_35327">Hi All,</div><div id="yiv7483050897yui_3_16_0_ym19_1_1519917328888_35327">   </div><div id="yiv7483050897yui_3_16_0_ym19_1_1519917328888_35327">      I would like to know the behavior of dnsmasq in the following scenario</div><div id="yiv7483050897yui_3_16_0_ym19_1_1519917328888_35327"><br></div><div id="yiv7483050897yui_3_16_0_ym19_1_1519917328888_35327"><br></div><div id="yiv7483050897yui_3_16_0_ym19_1_1519917328888_35327"><br></div><div id="yiv7483050897yui_3_16_0_ym19_1_1519917328888_35327"><br></div><div id="yiv7483050897yui_3_16_0_ym19_1_1519917328888_35327">PC --- Dnsmasq-as-Forwarder-------- |------ DNS-Server1 { abc.123.com ---- 1.1.1.1, abc.123.com ---- 1.1.1.2}</div><div id="yiv7483050897yui_3_16_0_ym19_1_1519917328888_35327">                                                             |</div><div id="yiv7483050897yui_3_16_0_ym19_1_1519917328888_35327">                                                             |</div><div id="yiv7483050897yui_3_16_0_ym19_1_1519917328888_35327" dir="ltr">                                                             |--------DNS-Server-2  { abc.123.com ---- 1.1.1.3, abc.123.com ---- 1.1.1.4}</div><div id="yiv7483050897yui_3_16_0_ym19_1_1519917328888_35327" dir="ltr"><br></div><div id="yiv7483050897yui_3_16_0_ym19_1_1519917328888_35327" dir="ltr">When PC sends the query for abc.123.com, Dnsmasq forwards queries to both DNS-servers. Both servers sends the reply.</div><div id="yiv7483050897yui_3_16_0_ym19_1_1519917328888_35327" dir="ltr">PC  receives only one reply with answer from either DNS-Server1 or DNS-Server2.  it is expected as per design. </div><div id="yiv7483050897yui_3_16_0_ym19_1_1519917328888_35327" dir="ltr"><br></div><div id="yiv7483050897yui_3_16_0_ym19_1_1519917328888_35327" dir="ltr"><br></div><div id="yiv7483050897yui_3_16_0_ym19_1_1519917328888_35327" dir="ltr">I was expecting the dnsmasq-forwarder  to cache the replies/answers from both servers( Server1's reply {abc.123.com ---- 1.1.1.1, 1.1.1.2} Server2's reply {abc.123.com ---- 1.1.1.3, 1.1.1.4)} .<br></div><div id="yiv7483050897yui_3_16_0_ym19_1_1519917328888_35327" dir="ltr"><br></div><div id="yiv7483050897yui_3_16_0_ym19_1_1519917328888_35327" dir="ltr">When i checked the cache of dnsmasq-forwarder, it only caches the first reply from either DNS-Server1 or DNS-Server2, NOT both. </div><div id="yiv7483050897yui_3_16_0_ym19_1_1519917328888_35327" dir="ltr"><br></div><div id="yiv7483050897yui_3_16_0_ym19_1_1519917328888_35327" dir="ltr">So wondering, how to do the RoudRobin Load balancing among four servers(1.1.1.1/2/3/4) which serves abc.123.com. </div><div id="yiv7483050897yui_3_16_0_ym19_1_1519917328888_35327" dir="ltr"><br></div><div id="yiv7483050897yui_3_16_0_ym19_1_1519917328888_35327" dir="ltr"> i checked the code. Looks like " the after  processing first reply, the frec is freed, so dnsmasq can't cache the entries."</div><div id="yiv7483050897yui_3_16_0_ym19_1_1519917328888_35327" dir="ltr"><br></div><div id="yiv7483050897yui_3_16_0_ym19_1_1519917328888_35327" dir="ltr">Could you explain? </div><div id="yiv7483050897yui_3_16_0_ym19_1_1519917328888_35327" dir="ltr"><br></div><div id="yiv7483050897yui_3_16_0_ym19_1_1519917328888_35327" dir="ltr">thanks</div><div id="yiv7483050897yui_3_16_0_ym19_1_1519917328888_35327" dir="ltr">S.Meenakshisundaram</div><div id="yiv7483050897yui_3_16_0_ym19_1_1519917328888_35327" dir="ltr"><br></div></div></div></div><br><br></div> </div> </div>  </div></div></body></html>