<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div>Guys, I was successful with my network extension.<br></div><br>I'd a <a href="http://192.168.22.0/24">192.168.22.0/24</a> network in FlatDHCP mode, Essex, and I would like to extend into a larger network range(e.g <a href="http://192.168.0.0/16">192.168.0.0/16</a>), so I can have more IP for instances.<br>

</div><br>So here is how I've done this. Remember that this is VERY RISKS, it's only for thug life guys!<br><br></div>Nova database backup<br># mysqldump -uroot -p'' nova > nova.dump<br><br></div>Then check your network and plan the extension. In my case all my instances were at <a href="http://192.168.22.0/24">192.168.22.0/24</a>, changing the network to <a href="http://192.168.0.0/16">192.168.0.0/16</a> does not affect the IP's from VM's.<br>

<br></div># mysql -uroot -p''  -e 'SELECT * FROM networks' nova<br></div><br>You have to change the values: cidr, netmask, gateway, broadcast, dhcp_start<br></div></div></div># mysql -uroot -p'' -e "UPDATE networks set cidr='<a href="http://192.168.0.0/16">192.168.0.0/16</a>',netmask='255.255.0.0',gateway='192.168.0.1',broadcast='192.168.255.255',dhcp_start='192.168.0.2'" nova<br>

<br></div><div>Now we have to create the missing fixed_ips<br># for i in {0..21} {23..255}; do for j in {0..255}; do echo INSERT INTO fixed_ips (created_at, deleted, address, network_id, allocated,leased, reserved) values (now(),0,\'192.168.$i.$j\',1,0,0,0) ;done ;done > insert_fixed_ips.sql<br>

</div><div><br>The command above will create all ips in the range 192.168.0.0 - 192.168.21.255 and 192.168.23.0 -> 192.168.255.255, because all 192.168.22.{0..255} exists already.<br><br></div><div>Then I change the two firsts IP and the last as RESERVED, cause they are use to assign the network, gateway and broadcast.<br>

</div><div># vim  insert_fixed_ips.sql</div><div><br>INSERT INTO fixed_ips (created_at, deleted, address, network_id, allocated,leased, reserved) values (now(),0,'192.168.0.0',1,0,0,1);<br>INSERT INTO fixed_ips (created_at, deleted, address, network_id, allocated,leased, reserved) values (now(),0,'192.168.0.1',1,0,0,1);<br>

INSERT INTO fixed_ips (created_at, deleted, address, network_id, 
allocated,leased, reserved) values (now(),0,'192.168.0.2',1,0,0,0);<br>...<br>INSERT INTO fixed_ips (created_at, deleted, address, network_id, 
allocated,leased, reserved) values (now(),0,'192.168.255.254',1,0,0,0);<br>INSERT INTO fixed_ips (created_at, deleted, address, network_id, allocated,leased, reserved) values (now(),0,'192.168.255.255',1,0,0,1);<br>

<br></div><div>and use this script in mysql<br></div><div># mysql -uroot -p'' nova <  insert_fixed_ips.sql<br><br></div>Now change these values on  /etc/nova/nova.conf in all nova-network instances you have.<br>

</div><div># vim   /etc/nova/nova.conf</div><div>--fixed_range=<a href="http://192.168.0.0/16">192.168.0.0/16</a><br>--network_size=65535<br>--flat_network_dhcp_start=192.168.0.2<br><br></div><div>Kill dnsmasq in all nova-network instances and restart the service<br>

<br></div><div># pkill dnsmasq<br></div><div># service nova-network restart<br><br></div><div>That's it!.<br></div> I hope this could be usefull to someone!<br><div><div><div><br></div></div></div></div><div class="gmail_extra">

<br><br><div class="gmail_quote">On Thu, Mar 7, 2013 at 2:23 PM, Gui Maluf <span dir="ltr"><<a href="mailto:guimalufb@gmail.com" target="_blank">guimalufb@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr"><div>I'm having the same doubt, in the same environment(essex, flatdhcp). I've created a small network, and now I want to extend it, so I can get more fixed IPs. Is this possible?<br></div>Thanks in advance.<br>


</div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">On Mon, Oct 1, 2012 at 4:09 PM, Ryan Lane <span dir="ltr"><<a href="mailto:rlane@wikimedia.org" target="_blank">rlane@wikimedia.org</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Based on what I'm seeing from the documentation and from nova-network,<br>
it's currently impossible to change a network range that's already<br>
created. Am I incorrect on this? What options do I have if my network<br>
is too small and it needs to be extended? Can I create a second<br>
network? It seems that this is something that nova is completely<br>
deficient at currently.<br>
<br>
Will this situation be fixed in quantum? It's a fairly normal<br>
operation to change networks, it would be really nice if OpenStack<br>
tools could do this too.<br>
<br>
- Ryan<br>
<br>
_______________________________________________<br>
OpenStack-operators mailing list<br>
<a href="mailto:OpenStack-operators@lists.openstack.org" target="_blank">OpenStack-operators@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators</a><br>
</blockquote></div><br><br clear="all"><br></div></div><span class="HOEnZb"><font color="#888888">-- <br><font face="Arial, Helvetica, sans-serif"><b>guilherme</b> \n<br>\<font>t</font> <b>maluf</b><br></font>
</font></span></div>
</blockquote></div><br><br clear="all"><br>-- <br><font face="Arial, Helvetica, sans-serif"><b>guilherme</b> \n<br>\<font>t</font> <b>maluf</b><br></font>
</div>