<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Aug 3, 2016 at 1:22 AM, zhuna <span dir="ltr"><<a href="mailto:juno.zhu@huawei.com" target="_blank">juno.zhu@huawei.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="ZH-CN" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi Carl,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d">IMO, if the upstream router has the route to floating ip subnet, no need to assign additional IP address to the router.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d">For example, there are 2 subnets in external network,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d">Subnet1: <a href="http://10.0.0.0/24" target="_blank">10.0.0.0/24</a> (fg ip address)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d">Subnet2: <a href="http://9.0.0.0/24" target="_blank">9.0.0.0/24</a> (fip)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d">Suppose assign fip 9.0.0.10 for vm1, and the fg ip address is 10.0.0.10, so there are 2 ip address configured in fg, one is 9.0.0.10 and 10.0.0.10.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d">+-------------------+<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d">| router ns |<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d">+-------------------+<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d"> | fg (10.0.0.10, 9.0.0.10)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d"> |<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d"> |<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d"> | router-if (10.0.0.1)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d">+---------------------------+<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d">| upstream router |---------------------------<wbr>- Internet<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d">+---------------------------+<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d">
<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1f497d">The default route of router ns is 10.0.0.1, add a static route <a href="http://9.0.0.10/32" target="_blank">9.0.0.10/32</a> 10.0.0.10 to upstream router , or learn the route by routing protocol
(neutron-dynamic-routing).</span></p></div></div></blockquote><div><br></div><div>This could certainly work. It would require some changes in the L3 agent because the L3 agent assumes that each of the subnets on the external network has a gateway address. It doesn't currently distinguish between different service types. So, when it gets its static address, <a href="http://10.0.0.10/24">10.0.0.10/24</a>, it will expect a gateway address within that subnet (e.g. 10.0.0.1).</div><div><br></div><div>We could make changes to the L3 agent to accommodate this but I'm hesitant to do this because it is much easier to get the default route from the interface's static address. This is because the floating IP addresses come and go and so we'd have to manage the default gateway for the router as they do. Also, routers that happen to not be hosting any floating ip addresses (CVRs, not DVRs) will not have any default gateway. It seems a lot more straight-forward to me to just require that the upstream router have an address on fg subnet.</div><div><br></div><div>Carl</div></div></div></div>