openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #18853
hot to add routes (nexthops) to quantum router?
Hi,
how does one add other than default gw routes to quantum router?
Our external network has two switches:
a) .1 as gateway to company intranet 10.0.0.0/8
b) .2 as gateway to internet
and quantum router has port with 10.1.1.7/26 ip in external net. Now,
how do I tell the router to forward all outgoing packets to correct
gateways? How do you add next hops to quantum routers?
I would assume it should be done by adding additional routes to quantum
routers network namespace.
sudo ip netns exec <qrouter-namespace> ip r add 10.0.0.0/8 via 10.1.1.1
but it didn't work, and I suppose I should not (and I don't want to)
modify those tables manually anyhow. Adding host_routes to quantum
network only affected the dhcp server in the network, instead of adding
routes into any existing namespace:
quantum subnet-update net_out --host_routes type=dict list=true
destination=10.0.0.0/8,nexthop=10.1.1.1
Our quantum external network is configured like this:
$ quantum net-show 2f1758e6-5c73-4662-bdb8-a74ff2c2e440
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| id | 2f1758e6-5c73-4662-bdb8-a74ff2c2e440 |
| name | extnet |
| provider:network_type | flat |
| provider:physical_network | extnet |
| provider:segmentation_id | |
| router:external | True |
| shared | True |
| status | ACTIVE |
| subnets | af64dd41-3429-4f53-a479-92a84a6d3b85 |
| tenant_id | e169704059f6409cbe97114246ff943b |
+---------------------------+--------------------------------------+
$ quantum subnet-show af64dd41-3429-4f53-a479-92a84a6d3b85
+------------------+--------------------------------------------------------+
| Field |
Value |
+------------------+--------------------------------------------------------+
| allocation_pools | {"start": "10.1.1.6", "end": "10.1.1.62"} |
| cidr | 10.1.1.0/26 |
| dns_nameservers | |
| enable_dhcp |
True |
| gateway_ip | 10.1.1.2 |
| host_routes | {"destination": "80.0.0.0/8", "nexthop": "10.1.1.1"} |
| id |
af64dd41-3429-4f53-a479-92a84a6d3b85 |
| ip_version |
4 |
| name |
net_out |
| network_id |
2f1758e6-5c73-4662-bdb8-a74ff2c2e440 |
| tenant_id |
e169704059f6409cbe97114246ff943b |
+------------------+--------------------------------------------------------+
BR,
Ilkka Tengvall