[Openstack] Multiple private nets and routing

Cynthia Lopes clsacramento at gmail.com
Tue May 26 08:52:13 UTC 2015


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...


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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20150526/fc9116ff/attachment.html>


More information about the Openstack mailing list