[Openstack] Neutron network node setup

Ageeleshwar Kandavelu Ageeleshwar.Kandavelu at csscorp.com
Thu Apr 3 06:05:45 UTC 2014


Maruf was correct.

Also in your plugin.ini you have associate each physical network to a bridge. And each of those bridges should have one physical network interface attached.

In my previous mail i gave an example where I associated Extnet to br-ex. Then add eth2 to br-ex. Then your external network(ext-net) would be overlaid on top of Extnet, bridged to br-ex, then traffic flows outside through eth2.

Thank you,
Ageeleshwar K
________________________________
From: Md. Maruful Hassan [mrf.mnm at gmail.com]
Sent: Thursday, April 03, 2014 9:29 AM
To: Erich Weiler
Cc: Ageeleshwar Kandavelu; Alex Yang; openstack at lists.openstack.org
Subject: Re: [Openstack] Neutron network node setup

You need to use 'flat' instead of 'local' and specify physical_network . so modify

neutron net-create ext-net --provider:network_type=local --shared --router:external=True

to

neutron net-create ext-net --provider:network_type=flat --provider:physical_network Extnet --shared --router:external=True

Extnet is the name you configured in plugin.ini  as bridge_mapping

- Maruf

--
m at ruf


On Thu, Apr 3, 2014 at 9:37 AM, Erich Weiler <weiler at soe.ucsc.edu<mailto:weiler at soe.ucsc.edu>> wrote:
Hi Ageeleshwar,

I *think* I see what you are saying - is this correct?  First, I create a flat external network:

# neutron net-create ext-net --provider:network_type=local --shared --router:external=True


Created a new network:
+---------------------------+--------------------------------------+
| Field                     | Value                                |
+---------------------------+--------------------------------------+
| admin_state_up            | True                                 |
| id                        | 71b4b5b9-e744-4c67-9b62-4f64ab727e47 |
| name                      | ext-net                              |
| provider:network_type     | local                                |
| provider:physical_network |                                      |
| provider:segmentation_id  |                                      |
| router:external           | True                                 |
| shared                    | True                                 |

| status                    | ACTIVE                               |
| subnets                   |                                      |
| tenant_id                 | 36687b1d611740bd9e7309432b22dbcd     |
+---------------------------+--------------------------------------+

# neutron subnet-create ext-net --allocation-pool start=134.145.112.10,end=134.145.112.100 --gateway=134.145.112.1 --enable_dhcp=False 134.145.112.0/24<http://134.145.112.0/24>

Created a new subnet:
+------------------+------------------------------------------------------+
| Field            | Value                                                |
+------------------+------------------------------------------------------+
| allocation_pools | {"start": "134.145.112.10", "end": "134.145.112.100"} |
| cidr             | 134.145.112.0/26<http://134.145.112.0/26>                                    |
| dns_nameservers  |                                                      |
| enable_dhcp      | False                                                |
| gateway_ip       | 134.145.112.1                                       |
| host_routes      |                                                      |
| id               | 6082cdb3-98bc-4fbe-a0fb-ff264ea7384f                 |
| ip_version       | 4                                                    |
| name             |                                                      |
| network_id       | 71b4b5b9-e744-4c67-9b62-4f64ab727e47                 |
| tenant_id        | 36687b1d611740bd9e7309432b22dbcd                     |
+------------------+------------------------------------------------------+

Create a router from ext-to-int for my demo tenant:

# neutron router-create ext-to-int --tenant-id f7e61747885045d8b266a161310c0094
Created a new router:
+-----------------------+--------------------------------------+
| Field                 | Value                                |
+-----------------------+--------------------------------------+
| admin_state_up        | True                                 |
| external_gateway_info |                                      |
| id                    | 4ca4292c-8954-4f21-acd6-b0044e0d02cb |
| name                  | ext-to-int                           |
| status                | ACTIVE                               |
| tenant_id             | f7e61747885045d8b266a161310c0094     |
+-----------------------+--------------------------------------+

Set my router gateway:

# neutron router-gateway-set 4ca4292c-8954-4f21-acd6-b0044e0d02cb 71b4b5b9-e744-4c67-9b62-4f64ab727e47

Set gateway for router 4ca4292c-8954-4f21-acd6-b0044e0d02cb

Create a tenant-network with a VLAN:

# neutron net-create --tenant-id f7e61747885045d8b266a161310c0094 demo-net --provider:network_type vlan --provider:physical_network physnet1 --provider:segmentation_id 201


Created a new network:
+---------------------------+--------------------------------------+
| Field                     | Value                                |
+---------------------------+--------------------------------------+
| admin_state_up            | True                                 |
| id                        | 37190389-df4b-49c0-81b9-05aa6411a81b |
| name                      | demo-net                             |

| provider:network_type     | vlan                                 |
| provider:physical_network | physnet1                             |
| provider:segmentation_id  | 201                                  |

| shared                    | False                                |
| status                    | ACTIVE                               |
| subnets                   |                                      |
| tenant_id                 | f7e61747885045d8b266a161310c0094     |
+---------------------------+--------------------------------------+

Create demo-net subnet:

# neutron subnet-create --tenant-id f7e61747885045d8b266a161310c0094 demo-net 10.200.0.0/16<http://10.200.0.0/16> --gateway 10.200.0.1

Created a new subnet:
+------------------+--------------------------------------------------+
| Field            | Value                                            |
+------------------+--------------------------------------------------+
| allocation_pools | {"start": "10.200.0.2", "end": "10.200.255.254"} |
| cidr             | 10.200.0.0/16<http://10.200.0.0/16>                                    |
| dns_nameservers  |                                                  |
| enable_dhcp      | True                                             |
| gateway_ip       | 10.200.0.1                                       |
| host_routes      |                                                  |
| id               | da53e0df-fb00-46ad-a709-6eaeda13e23f             |
| ip_version       | 4                                                |
| name             |                                                  |
| network_id       | 37190389-df4b-49c0-81b9-05aa6411a81b             |
| tenant_id        | f7e61747885045d8b266a161310c0094                 |
+------------------+--------------------------------------------------+

Set the router for demo-net:

# neutron router-interface-add 4ca4292c-8954-4f21-acd6-b0044e0d02cb da53e0df-fb00-46ad-a709-6eaeda13e23f

Added interface 250215bf-fe8b-40ed-aeb9-e284427ec432 to router 4ca4292c-8954-4f21-acd6-b0044e0d02cb.

And that should work yes?  With a flat ext-net and a VLAN-based internal net for my tenant net demo-net?

Thanks so much for you help!  The guides don't really go into this kind of detail...

-erich


On 4/2/14, 3:07 AM, Ageeleshwar Kandavelu wrote:
Make your external network flat. If you do so there wont be any vlan tag
on packets reaching your external network.

in you plugin.ini you put something like this
network_vlan_ranges = Intnet1:100:200,Extnet
bridge_mappings = Intnet1:br-eth1,Extnet:br-ex

This means you would use vlan id 100 to 200 on openstack networks
created on top of Intnet1.

On Extnet you would not use any vlan.

Then you say that to all traffic on network created on Intnet1 should be
bridged to br-eth1. Then you would add eth1 to br-eth1.

Then you say all traffic for Extnet should be bridged to br-ex. Then you
have to add a physical interface say eth2 to br-ex.

Finally you can create an external network in openstack with
physical_network=Extnet.

You just said that all internal network shall be created and Intnet1 and
allocated vlan from 100 to 200.
External network shall be overlaid on top of Extnet and no vlans.

Hope it makes sense.

Ageeleshwar K


------------------------------------------------------------------------
*From:* Alex Yang [alex890714 at gmail.com<mailto:alex890714 at gmail.com>]
*Sent:* Wednesday, April 02, 2014 7:09 AM
*To:* Erich Weiler
*Cc:* openstack at lists.openstack.org<mailto:openstack at lists.openstack.org>
*Subject:* Re: [Openstack] Neutron network node setup


Hi Erich,

I think this following articles may helpful for you.

http://developer.rackspace.com/blog/categories/networking/



2014-04-02 5:59 GMT+08:00 Erich Weiler <weiler at soe.ucsc.edu<mailto:weiler at soe.ucsc.edu>
<mailto:weiler at soe.ucsc.edu<mailto:weiler at soe.ucsc.edu>>>:


    Hey Y'all,

    I'm setting up a dedicated neutron network node and I'm having a bit
    of trouble understanding the way the networks work.  On the network
    node I have one interface on the public net (eth0), one interface on
    the private net (eth1) and I'm following these guides to set it up.

    My plan is to have eth0 on the public network, no VLAN magic there
    or anything.  eth1 will be the data interface, and it will be
    connected to a trunk switchport so it can use VLANs for tenant
    isolation (OVS VLAN plugin).

    I ran this command to set up ext-net:

    neutron net-create ext-net --router:external=True

    Created a new network:
    +---------------------------+-__------------------------------__-------+
    | Field                     | Value                                |
    +---------------------------+-__------------------------------__-------+
    | admin_state_up            | True                                 |
    | id                        | a5599b54-dbfc-42fa-b5b9-__e8ebd574ded0 |

    | name                      | ext-net                              |
    | provider:network_type     | vlan                                 |
    | provider:physical_network | physnet1                             |
    | provider:segmentation_id  | 200                                  |
    | router:external           | True                                 |
    | shared                    | False                                |
    | status                    | ACTIVE                               |
    | subnets                   |                                      |
    | tenant_id                 | 36687b1d611740bd9e7309432b22db__cd     |
    +---------------------------+-__------------------------------__-------+


    But, I don't think network_type=vlan right?  As eth0 just sits right
    on a public network?  Should network_type=local instead?  Also,
    should physical_network equal null, and also segmentation_id equal
    null as well?

    I would understand type=vlan and seg_id and such for a tenant
    network, but for ext-net?

    Any hints would be greatly appreciated...!

    -erich

    _________________________________________________
    Mailing list:
    http://lists.openstack.org/__cgi-bin/mailman/listinfo/__openstack

    <http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack>
    Post to     : openstack at lists.openstack.org<mailto:openstack at lists.openstack.org>
    <mailto:openstack at lists.openstack.org<mailto:openstack at lists.openstack.org>>
    Unsubscribe :
    http://lists.openstack.org/__cgi-bin/mailman/listinfo/__openstack
    <http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack>




--
   杨雨
   Email: alex890714 at gmail.com<mailto:alex890714 at gmail.com> <mailto:alex890714 at gmail.com<mailto:alex890714 at gmail.com>>

GitHub: https://github.com/AlexYangYu
  Weibo: http://www.weibo.com/alexyangyu
http://www.csscorp.com/common/email-disclaimer.php

_______________________________________________
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to     : openstack at lists.openstack.org<mailto:openstack at lists.openstack.org>
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack

http://www.csscorp.com/common/email-disclaimer.php
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20140403/317bd8a3/attachment.html>


More information about the Openstack mailing list