Ask Your Question
0

How to save route in tenant router permanently

asked 2015-04-29 03:34:34 -0500

cnadn.net gravatar image

updated 2015-04-29 03:36:21 -0500

Hi, I have 2 tenants, each have a router, now I want to route tenant A traffic to tenant B, so I add static route in the tenant routers, then, everything work fine. The problem is the static route will be lost after restarting. How to save it permanently? Thanks

For example: 1. Add a route into a tenant router: ip netns exec qrouter-b65e4316-6dad-40af-b002-430b311aa239 ip route add 10.168.168.0/24 via 9.9.9.20

root@controller:/home/gavin# ip netns    exec    qrouter-b65e4316-6dad-40af-b002-430b311aa239 netstat -nr Kernel IP routing table  Destination     Gateway            Genmask         Flags   MSS Window   irtt Iface
   0.0.0.0         9.9.9.253       0.0.0.0         UG        0 0          0 qg-ea383fb8-36
   9.9.9.0         0.0.0.0         255.255.255.0   U         0 0          0 qg-ea383fb8-36    **10.168.168.0  
9.9.9.20        255.255.255.0   UG        0 0          0 qg-ea383fb8-36**
   192.168.169.0   0.0.0.0         255.255.255.0   U         0 0          0 qr-209078ed-73
  1. reboot box, the route disappear...
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-04-29 04:21:36 -0500

You could try adding it directly with Openstack... Try with:

neutron router-update ROUTER_UUID --router_rules type=dict list=true source=any,destination=any,action=permit source=EXAMPLE_CIDR(or any),destination=10.168.168.0/24,action=permit,nexthops=9.9.9.20

This configuration should apply again after reboot

edit flag offensive delete link more

Comments

Thanks Antonio, I got below error on icehouse:

Unrecognized attribute(s) 'router_rules'

I am newbee to openstack, I can not find those options in neutron router-update -h command..

cnadn.net gravatar imagecnadn.net ( 2015-04-29 20:55:43 -0500 )edit

could you try:

neutron router-update ROUTER_UUID  --routes type=dict list=true
destination=,nexthop=
Antonio G. gravatar imageAntonio G. ( 2015-04-30 06:59:36 -0500 )edit

Yes, It works. And the route is still there after reboot. BTW, I can not find these options with -h in the neutron command, is this hidden or because bad help of the command, where can I find these? Thanks a lot.

cnadn.net gravatar imagecnadn.net ( 2015-05-05 21:21:51 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-04-29 03:34:34 -0500

Seen: 344 times

Last updated: Apr 29 '15