Ask Your Question

How to add a 2nd router interface to a subnet?

asked 2013-11-05 05:26:44 -0500

Moss gravatar image


I'm trying to create a topology showed below:


I am able to create new port but I don't have the possibility to attach it to the router - I'm getting error showed below:

root@controller:~# quantum port-create --fixed-ip subnet_id=0c7b6ff7-2c9b-4ee1-ae55-698f6f3ce55a,ip_address= 125a8d4a-bde3-42bb-8275-515b5b9cf92b
Created a new port:
root@controller:~# quantum router-interface-add 65bb5029-21ff-496d-8fd6-bd68eed927df 0c7b6ff7-2c9b-4ee1-ae55-698f6f3ce55a
Unable to complete operation for network 125a8d4a-bde3-42bb-8275-515b5b9cf92b. The IP address is in use.

In other words it tries to attach new router interface to 1st one which is in use by router_demo.

root@controller:~# quantum help router-interface-add
usage: quantum router-interface-add router-id subnet-id
Add an internal network interface to a router.
positional arguments:
  router-id             ID of the router
  subnet-id             ID of the internal subnet for the interface

I'm afraid that it is not possible at all since there is no such option in above command but I hope I'm wrong:)



edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted

answered 2013-11-05 07:53:11 -0500

updated 2013-11-05 07:53:44 -0500

You can do it with dashboard, you should specify IP when adding interface image description

edit flag offensive delete link more

answered 2013-11-06 09:34:02 -0500

darragh-oreilly gravatar image

updated 2013-11-07 06:33:13 -0500

To specify a port_id when adding a router interface, you will need the quantumclient at v2.2.3 or later which has this patch.

Or use the Python API - see here. Try something like this:

from quantumclient.quantum import client as qclient
qc = qclient.Client('2.0', auth_url='',
                    username='admin', tenant_name='demo', password='secrete')

routerid = ???
subnetid = ???
portid = ???
qc.add_interface_router(routerid, {'subnet_id': subnetid, 'port_id': portid})
edit flag offensive delete link more

answered 2013-11-05 08:45:38 -0500

Moss gravatar image

Thank you for quick reply

Unfortunately I don't have this option available in grizzly (even on admin user) - what release are you using?

image description

edit flag offensive delete link more


I'm using Havana. I cant find a way to do the same in Grizzly rather then dividing net in two subnets

laboshinl gravatar imagelaboshinl ( 2013-11-05 08:50:44 -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


Asked: 2013-11-05 05:26:44 -0500

Seen: 1,501 times

Last updated: Nov 07 '13