Ask Your Question
1

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

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

Moss gravatar image

Hello,

I'm trying to create a topology showed below:

Topology

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=192.168.0.2 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 192.168.0.1 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:)

Thanks,

Peter

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
1

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
1

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='http://10.0.10.10:5000/v2.0',
                    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
0

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

Comments

I'm using Havana. I cant find a way to do the same in Grizzly rather then dividing net in two subnets http://s13.postimg.org/njs27m76v/Screenshot_from_2013_11_05_20_43_35.png

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

Stats

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

Seen: 1,455 times

Last updated: Nov 07 '13