<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Apr 13, 2014 at 11:06 AM, sylecn <span dir="ltr"><<a href="mailto:sylecn@gmail.com" target="_blank">sylecn@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div>Hi all,<br><br>
</div>neutron port-create usually allocate one IP with one port, but in a recent use case, I need to allocate two IP addresses on one port. I am glade to see it is already supported by neutron.<br>

<br></div></div></div></div></div></div></blockquote><div>Didn't you try something like this ?</div><div>neutron port-create --fixed-ip subnet_id=<subnet1> --fixed-ip subnet_id=<subnet1> net1<br></div><div>
<br></div><div>now use the above port in nova boot as nic port id. I dont see any reason why this shouldnt work, I havent tried this myself though, let me know the outcome</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div><div><div><div><div>The vm also boots fine with the virtual port. Problem is vm is configured to get address from DHCP and only one address is offered and binded to eth0 automatically. What is the best way to bind both IPs in a automated way?<br>


</div><br>I could think of two solutions:<br></div>1. create the port and pass in both IPs via userdata to nova api.<br>    Use system commands to bind the 2nd IP.<br><br></div>2. enhance metadata service to return all IP addresses instead of only the first IP.<br>


</div><div>    For example, <br><br>curl <a href="http://169.254.169.254/openstack/2013-10-17/ips.json" target="_blank">http://169.254.169.254/openstack/2013-10-17/ips.json</a><br><br>[["eth0", ["192.168.1.5", "10.0.1.5"]]<br>


 ["eth1": ["172.17.1.5"]]]<br><br></div>    Use cloud-init to bind all IPs that is not binded by DHCP client.<br><br></div>What's your advice on this? Are there any neutron or DHCP extensions that can help on this?<br>


<div><br><div><div><div><div><div><div><div><div><div><div><div><div dir="ltr"><div><i><br>YY Inc. is hiring openstack and python developers. Interested? Check <a href="http://www.nsbeta.info/jobs" target="_blank">http://www.nsbeta.info/jobs</a></i><br>


</div><div><br>--<br>Thanks,<br></div>Yuanle<br></div></div>
</div></div></div></div></div></div></div></div></div></div></div></div>
<br>_______________________________________________<br>
Mailing list: <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br>
Post to     : <a href="mailto:openstack@lists.openstack.org">openstack@lists.openstack.org</a><br>
Unsubscribe : <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br>
<br></blockquote></div>Best</div><div class="gmail_extra">Ashok</div></div>