Adding a second external network using gre, second network does not route?

Asked by digitalwonk

I was successful in creating an initial gre-based external network using the following guide "Per-tenant Routers with Private Networks": http://docs.openstack.org/trunk/openstack-network/admin/content/app_demo_routers_with_private_networks.html. However, when I create a second external network and attempt to add a second tenant network, router, vm, etc. It does not seem to route. Are there any special steps to add the second external network that isn't mentioned in the documentation?

Thanks in advance!
Ed

Here are the steps I used to create everything on the second network:

# NOTE: the first external network was 192.168.1.0/24
quantum net-create EXTERNAL_NETWORK2 --provider:network_type local --router:external true
quantum subnet-create EXTERNAL_NETWORK2 --gateway 192.168.2.1 192.168.2.0/24

# NOTE: the first tenant network was 172.16.1.0/24
quantum net-create TENANT_NET2
quantum subnet-create TENANT_NET2 172.16.2.0/24
nova boot --image ${image_id} --flavor 1 --nic net-id=<TENANT_NET2 ID> TESTVM
quantum router-create TENANT_ROUTER2
quantum router-interface-add TENANT_ROUTER2 <TENANT_NET2 SUBNET ID>
quantum router-gateway-set TENANT_ROUTER2 EXTERNAL_NETWORK2
quantum floatingip-create EXTERNAL_NETWORK2
quantum floatingip-associate <FLOATING IP ID> <VM PORT ID>

Question information

Language:
English Edit question
Status:
Answered
For:
neutron Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
yong sheng gong (gongysh) said :
#1

can u show me your log of l3 agent?
If u have two external networks, you need to specify the external_network_id in l3_agent.ini.

Revision history for this message
digitalwonk (digitalwonk) said :
#2

Thanks for the response Yong.

The l3 log currently report the following error message repeatedly:

2013-03-04 14:14:56 ERROR [quantum.agent.l3_agent] Error running l3_nat daemon_loop
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/quantum/agent/l3_agent.py", line 171, in daemon_loop
    self.do_single_loop()
  File "/usr/lib/python2.7/dist-packages/quantum/agent/l3_agent.py", line 202, in do_single_loop
    target_ex_net_id = self._fetch_external_net_id()
  File "/usr/lib/python2.7/dist-packages/quantum/agent/l3_agent.py", line 185, in _fetch_external_net_id
    raise Exception("must configure 'gateway_external_network_id' if "
Exception: must configure 'gateway_external_network_id' if Quantum has more than one external network.

So, if I have two separate external subnets, is there no way to have both of them being used on the same network node? Or would I need to somehow setup a separate quantum network node?

If I have to specify only one gateway_external_network_id, then why would anyone have more than external networks?

Thank you,
Edwin

Revision history for this message
dan wendlandt (danwent) said :
#3

you can run multiple agents per node, assuming you are running with
namespaces enabled.

On Tue, Mar 5, 2013 at 9:11 AM, digitalwonk <
<email address hidden>> wrote:

> Question #223386 on quantum changed:
> https://answers.launchpad.net/quantum/+question/223386
>
> Status: Answered => Open
>
> digitalwonk is still having a problem:
> Thanks for the response Yong.
>
> The l3 log currently report the following error message repeatedly:
>
> 2013-03-04 14:14:56 ERROR [quantum.agent.l3_agent] Error running l3_nat
> daemon_loop
> Traceback (most recent call last):
> File "/usr/lib/python2.7/dist-packages/quantum/agent/l3_agent.py", line
> 171, in daemon_loop
> self.do_single_loop()
> File "/usr/lib/python2.7/dist-packages/quantum/agent/l3_agent.py", line
> 202, in do_single_loop
> target_ex_net_id = self._fetch_external_net_id()
> File "/usr/lib/python2.7/dist-packages/quantum/agent/l3_agent.py", line
> 185, in _fetch_external_net_id
> raise Exception("must configure 'gateway_external_network_id' if "
> Exception: must configure 'gateway_external_network_id' if Quantum has
> more than one external network.
>
> So, if I have two separate external subnets, is there no way to have
> both of them being used on the same network node? Or would I need to
> somehow setup a separate quantum network node?
>
> If I have to specify only one gateway_external_network_id, then why
> would anyone have more than external networks?
>
> Thank you,
> Edwin
>
> --
> You received this question notification because you are an answer
> contact for quantum.
>

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dan Wendlandt
Nicira, Inc: www.nicira.com
twitter: danwendlandt
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Revision history for this message
digitalwonk (digitalwonk) said :
#4

I installed using the ubuntu cloud archive packages, which only seems to only provide one agent, at least out of the box. Would I need to launch a separate agent manually? Also, would I need to setup a separate bridge if br-ex is already used? If so, would I be able to attach that new bridge to the same interface?

Thanks!

Revision history for this message
yong sheng gong (gongysh) said :
#5

multiple external networks are useful because it does not need operator to connect all of the related devices on one network.
the operator can have one external network on AT&T device, another one on another vendor's.

Even if u have only one vendor, but with many external networks, u can divide quantum network nodes according to the way of their connection to that network. for example you can let each external network host a certain subnet...

the cost is to give gateway_external_network_id in l3_agent.ini file.

Can you help with this problem?

Provide an answer of your own, or ask digitalwonk for more information if necessary.

To post a message you must log in.