[Openstack] Multiple private nets and routing

Dmitry Makovey dmitry at athabascau.ca
Tue May 26 18:20:18 UTC 2015


On 05/26/2015 02:52 AM, Cynthia Lopes wrote:
> Hi,
> 
> Just one thing that my be helpful... You don't have to add theses routes
> manually in each VM, you can have neutron do that for you.
> 
> It is possible to configure the subnet to inject static routes on the VMs...
> 
> When you create the subnet, you can pass the addres of the subnet you want
> to reach as "destination", and the IP of the router as "nexthop":
> 
> # neutron subnet-create  --host-route destination=CIDR,nexthop=IP_ADDR
> 
> Additional route (This option can be repeated if you need multiple routes)
> 
> Then, all the VMs created on the subnet will be injected with the route(s)
> you specified.
> 
> 
> 
> You might be able to update the subnet to add theses routes, but I never
> tried it by updating...

Brilliant. I'll give it a go in a couple of days, when I return back to
that project. This sounds like a great solution. Even if it means
redefining networks - long term it's worth it IMO. Thank you very much.

> 
> 
> Kind regards,
> ---------------------------------------------------------------
> Cynthia Lopes do Sacramento
> Ingénieur DevOps Cloud SDN
> Maya Technologies - Bull/Atos
> 
> 2015-05-22 22:07 GMT+02:00 Richard Raseley <richard at raseley.com>:
> 
>> Dmitry Makovey wrote:
>>
>>> first of all - thank you very much for bearing with me on this one.;)
>>>
>>
>> My pleasure, happy to help!
>>
>>  So how shall I go about setting it up? do I need to spin up some
>>> "dual-nic" VM that would act as a router or can I use some other
>>> OpenStack facilities for that?
>>>
>>
>> You won't need a dual NIC VM, but rather to just add a route on each VM
>> that tells it that, for hosts which have addresses in the other network(s),
>> to not use the default gateway (which is the ext_net attached router), but
>> to send their traffic via the other ('private') router's interface.
>>
>> So, for example on the instance which you have attached to the
>> 'private_gb_db_net' network you would have two routes:
>>
>> * ip route add -net 10.10.31.0 netmask 255.255.255.0 gw 10.10.10.4
>>
>> * ip route add -net 10.10.25.0 netmask 255.255.255.0 gw 10.10.10.6
>>
>> As of now, the default gateway is the only route they know of, so while it
>> is true that the Neutron routers themselves have automatic knowledge of
>> their attached networks, that is separate from the instance's knowledge of
>> which routers are available.
>>
>> I hope that helps.
>>
>>
>> Regards,
>>
>> Richard
>>
>>
>> _______________________________________________
>> Mailing list:
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>> Post to     : openstack at lists.openstack.org
>> Unsubscribe :
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>>
> 


-- 
Dmitry Makovey
Web Systems Administrator
Athabasca University
(780) 675-6245
---
Confidence is what you have before you understand the problem
    Woody Allen

When in trouble when in doubt run in circles scream and shout
     http://www.wordwizard.com/phpbb3/viewtopic.php?f=16&t=19330

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 173 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20150526/a4a0af1d/attachment.sig>


More information about the Openstack mailing list