Ask Your Question
0

Is it possible to add routes to the floating pool?

asked 2013-12-05 07:40:19 -0500

I want to add routes different from default to foating pool like this. Is it possible?

Destination     Gateway         Genmask         
0.0.0.0         192.168.122.1   0.0.0.0         
192.168.2.0     192.168.122.2   255.255.255.0   
192.168.122.0   0.0.0.0         255.255.255.0   
edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
0

answered 2013-12-06 09:32:23 -0500

darragh-oreilly gravatar image

updated 2013-12-06 09:34:15 -0500

With Havana(need to check! maybe it is trunk) you can add static routes to a router. Devstack creates a router with two subnets connected:

vagrant@devstack:~/devstack$ neutron subnet-list -c name -c cidr 
+----------------+-----------------+
| name           | cidr            |
+----------------+-----------------+
| public-subnet  | 172.24.4.224/28 |
| private-subnet | 10.0.0.0/24     |
+----------------+-----------------+

vagrant@devstack:~/devstack$ neutron router-update router1 \ 
    --routes type=dict list=true destination=100.0.0.0/24,nexthop=172.24.4.230
Updated router: router1

note: you need have the admin role to do that.

vagrant@devstack:~/devstack$ neutron router-list -c name -c routes
+---------+------------------------------------------------------------------+
| name    | routes                                                           |
+---------+------------------------------------------------------------------+
| router1 | [{u'nexthop': u'172.24.4.230', u'destination': u'100.0.0.0/24'}] |
+---------+------------------------------------------------------------------+

vagrant@devstack:~/devstack$ sudo ip netns exec \
    qrouter-c29357dc-416f-4712-9c3b-ce697b889bd7 route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         172.24.4.225    0.0.0.0         UG    0      0        0 qg-b5d072f1-36
10.0.0.0        0.0.0.0         255.255.255.0   U     0      0        0 qr-d188b8db-44
100.0.0.0       172.24.4.230    255.255.255.0   UG    0      0        0 qg-b5d072f1-36
172.24.4.224    0.0.0.0         255.255.255.240 U     0      0        0 qg-b5d072f1-36
edit flag offensive delete link more
0

answered 2013-12-05 09:50:02 -0500

updated 2013-12-06 22:36:09 -0500

I have only found this solution.

[root@localhost ~]# ip netns exec qrouter-22366760-ae5e-4588-ba71-e8244f5f8fd8 route -n

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.0.0.0        0.0.0.0         255.255.255.0   U     0      0        0 qr-70545ca6-4b
192.168.250.0   0.0.0.0         255.255.254.0   U     0      0        0 qg-cad8eab5-ef
0.0.0.0         192.168.250.1   0.0.0.0         UG    0      0        0 qg-cad8eab5-ef

[root@localhost ~]# ip netns exec qrouter-22366760-ae5e-4588-ba71-e8244f5f8fd8 ip route add 172.16.0.0/24 via 192.168.251.1

[root@localhost ~]# ip netns exec qrouter-22366760-ae5e-4588-ba71-e8244f5f8fd8 route -n

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.0.0.0        0.0.0.0         255.255.255.0   U     0      0        0 qr-70545ca6-4b
172.16.0.0      192.168.251.1   255.255.255.0   UG    0      0        0 qg-cad8eab5-ef
192.168.250.0   0.0.0.0         255.255.254.0   U     0      0        0 qg-cad8eab5-ef
0.0.0.0         192.168.250.1   0.0.0.0         UG    0      0        0 qg-cad8eab5-ef

In vm:

$ traceroute 172.16.0.1

traceroute to 172.16.0.1 (172.16.0.1), 30 hops max, 46 byte packets
 1  10.0.0.1 (10.0.0.1)  5.608 ms  1.185 ms  1.236 ms
 2  192.168.251.1 (192.168.251.1)  1.553 ms  3.173 ms  3.191 ms
 3  192.168.250.1 (192.168.250.1)  3.073 ms  1.732 ms  2.388 ms
 4  195.208.117.190 (195.208.117.190)  74.664 ms  26.545 ms  93.563 ms
edit flag offensive delete link more

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: 2013-12-05 07:40:19 -0500

Seen: 1,191 times

Last updated: Dec 06 '13