<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        text-align:justify;
        text-justify:inter-ideograph;
        font-size:10.5pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
 /* Page Definitions */
 @page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
        {page:WordSection1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=ZH-CN link=blue vlink=purple style='text-justify-trim:punctuation'>

<div class=WordSection1>

<p class=MsoNormal><span lang=EN-US>Hi,<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US>I am using VLAN network mode and will
connect eth1 and eth2 of my compute node to the LAN Switch, and LAN switch will
create individual VLAN IP interface for each Tenant/VLAN and then route to the
NAT equipment,through SNAT/DNAT to touch internet. So, that needs I can set the
default gateway of each Tenant VLAN to the different IP address of VLAN
interface on the switch.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US>For example, my first tenant(auto0Tenant) is
at VLAN200/br200/eth1/fix_ip range is 192.168.2.0/28 and second(aotu1Tenant) is
VLAN300/br300/eth2/fix_ip_range 192.168.3.0/28, the VLAN interface ip address for
them on switch is 192.168.2.9 and 192.168.3.9, I want to set the default
gateway of VMs in auto0Tenant to 192.168.2.9 and 192.168.3.9 for aotu1Tenant’s
VMs.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US>I try to use two methods, the first is to
use nova-command:<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:black'>nova-manage network create --label=auto0Tenat
--fixed_range_v4=192.168.2.0/28 --num_networks=1 --gateway=192.168.2.9
--dns1=61.139.2.69 --vlan=200 --bridge=br200 --bridge_interface=eth1 --network_size=16
--multi_host=T --project_id=5f9281bca6854fe3974a457d81afd78c </span><span
lang=EN-US><o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:black'><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:black'>nova-manage network create --label=aotu1Tenant
--fixed_range_v4=192.168.3.0/28 --num_networks=1 --gateway=192.168.3.9
--dns1=61.139.2.69 --vlan=300 --bridge=br300 --bridge_interface=eth2
--network_size=16 --multi_host=T --project_id=5f9281bca6854fe3974a457d81afd78c <o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:black'><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:black'>but the result is the newest created VM default gateway is still
the IP address of br200 or br300 by the system, that means the factor of “gateway”
and “dns1” in nova-mange network command did not work.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:black'><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:black'>The second way is to use dnsmasq.conf that Vish told me, that I
set just dhcp_option=3,192.168.2.9. Yes it is useful for auto0Tenat VLAN, it can
set auto0Tenant gateway to 192.168.2.9, but how to set others at the same time?<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:black'><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:black'>Then I tried to use:<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:black'><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:black'>Interface=vlan200<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:black'>dhcp_option=3,192.168.2.9<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:black'><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:black'>Interface=vlan300<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:black'>dhcp_option=3,192.168.3.9<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US>but the result is, nova-network show could
not find vlan300 in the start process, because that time,indeed vlan300
interface was not built by nova-network.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US>So, the question is, what is the standard method
to set individual external gateway for each tenant/VLAN in the designing of
nova or the VLAN network mode?<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US>Regards,<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US>Romi<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

</div>

</body>

</html>