Add networking guide in Tricircle

1.What is the problem?
If end user or upstream developer wants to learn how to use
Tricircle after it was being deployed, there is no documentation
on how to create different networking topology.

2.What is the solution to the problem?
Documentations on networking guide are provided. Using CLI
commands to show how to create different networking topology.

3.What the features need to be implemented to the Tricircle
  to realize the solution?
No new feature

Change-Id: Id87a562309467924460e8416aa1deaa22db7e29e
Signed-off-by: joehuang <joehuang@huawei.com>
This commit is contained in:
joehuang 2017-01-14 03:13:11 -05:00
parent bc365876de
commit 441a8bd66b
7 changed files with 2338 additions and 4 deletions

View File

@ -3,10 +3,12 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to tricircle's documentation!
========================================================
=====================================
Welcome to Tricircle's documentation!
=====================================
Contents:
Contents
========
.. toctree::
:maxdepth: 2
@ -15,6 +17,7 @@ Contents:
usage
installation-guide
configuration
networking-guide
api_v1
contributing
@ -25,4 +28,4 @@ Indices and tables
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
* :ref:`search`

View File

@ -0,0 +1,386 @@
===================================================
North South Networking via Direct Provider Networks
===================================================
The following figure illustrates one typical networking mode, instances have
two interfaces, one interface is connected to net1 for heartbeat or
data replication, the other interface is connected to phy_net1 or phy_net2 to
provide service. There is different physical network in different region to
support service redundancy in case of region level failure.
.. code-block:: console
+-----------------+ +-----------------+
|RegionOne | |RegionTwo |
| | | |
| phy_net1 | | phy_net2 |
| +--+---------+ | | +--+---------+ |
| | | | | |
| | | | | |
| +--+--------+ | | +--+--------+ |
| | | | | | | |
| | Instance1 | | | | Instance2 | |
| +------+----+ | | +------+----+ |
| | | | | |
| | | | | |
| net1 | | | | |
| +------+-------------------------+---+ |
| | | |
+-----------------+ +-----------------+
How to create this network topology
===================================
Create provider network phy_net1, which will be located in az1, including
RegionOne.
.. code-block:: console
$ neutron --os-region-name=CentralRegion net-create --provider:network_type vlan --provider:physical_network extern --availability-zone-hint az1 phy_net1
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| availability_zone_hints | az1 |
| id | b7832cbb-d399-4d5d-bcfd-d1b804506a1a |
| name | phy_net1 |
| project_id | ce444c8be6da447bb412db7d30cd7023 |
| provider:network_type | vlan |
| provider:physical_network | extern |
| provider:segmentation_id | 170 |
| router:external | False |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | ce444c8be6da447bb412db7d30cd7023 |
+---------------------------+--------------------------------------+
Create subnet in phy_net1.
.. code-block:: console
$ neutron --os-region-name=CentralRegion subnet-create phy_net1 202.96.1.0/24
+-------------------+------------------------------------------------+
| Field | Value |
+-------------------+------------------------------------------------+
| allocation_pools | {"start": "202.96.1.2", "end": "202.96.1.254"} |
| cidr | 202.96.1.0/24 |
| created_at | 2017-01-11T08:43:48Z |
| description | |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 202.96.1.1 |
| host_routes | |
| id | 4941c48e-5602-40fc-a117-e84833b85ed3 |
| ip_version | 4 |
| ipv6_address_mode | |
| ipv6_ra_mode | |
| name | |
| network_id | b7832cbb-d399-4d5d-bcfd-d1b804506a1a |
| project_id | ce444c8be6da447bb412db7d30cd7023 |
| revision_number | 2 |
| subnetpool_id | |
| tenant_id | ce444c8be6da447bb412db7d30cd7023 |
| updated_at | 2017-01-11T08:43:48Z |
+-------------------+------------------------------------------------+
Create provider network phy_net2, which will be located in az2, including
RegionTwo.
.. code-block:: console
$ neutron --os-region-name=CentralRegion net-create --provider:network_type vlan --provider:physical_network extern --availability-zone-hint az2 phy_net2
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| availability_zone_hints | az2 |
| id | 731293af-e68f-4677-b433-f46afd6431f3 |
| name | phy_net2 |
| project_id | ce444c8be6da447bb412db7d30cd7023 |
| provider:network_type | vlan |
| provider:physical_network | extern |
| provider:segmentation_id | 168 |
| router:external | False |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | ce444c8be6da447bb412db7d30cd7023 |
+---------------------------+--------------------------------------+
Create subnet in phy_net2.
.. code-block:: console
$ neutron --os-region-name=CentralRegion subnet-create phy_net2 202.96.2.0/24
+-------------------+------------------------------------------------+
| Field | Value |
+-------------------+------------------------------------------------+
| allocation_pools | {"start": "202.96.2.2", "end": "202.96.2.254"} |
| cidr | 202.96.2.0/24 |
| created_at | 2017-01-11T08:47:07Z |
| description | |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 202.96.2.1 |
| host_routes | |
| id | f5fb4f11-4bc1-4911-bcca-b0eaccc6eaf9 |
| ip_version | 4 |
| ipv6_address_mode | |
| ipv6_ra_mode | |
| name | |
| network_id | 731293af-e68f-4677-b433-f46afd6431f3 |
| project_id | ce444c8be6da447bb412db7d30cd7023 |
| revision_number | 2 |
| subnetpool_id | |
| tenant_id | ce444c8be6da447bb412db7d30cd7023 |
| updated_at | 2017-01-11T08:47:08Z |
+-------------------+------------------------------------------------+
Create net1 which will work as the L2 network across RegionOne and RegionTwo.
.. code-block:: console
$ neutron --os-region-name=CentralRegion net-create --provider:network_type vlan --provider:physical_network bridge --availability-zone-hint az1 --availability-zone-hint az2 net1
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| availability_zone_hints | az1 |
| | az2 |
| id | 1897a446-bf6a-4bce-9374-6a3825ee5051 |
| name | net1 |
| project_id | ce444c8be6da447bb412db7d30cd7023 |
| provider:network_type | vlan |
| provider:physical_network | bridge |
| provider:segmentation_id | 132 |
| router:external | False |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | ce444c8be6da447bb412db7d30cd7023 |
+---------------------------+--------------------------------------+
Create subnet in net1.
.. code-block:: console
$ neutron --os-region-name=CentralRegion subnet-create net1 10.0.1.0/24
+-------------------+--------------------------------------------+
| Field | Value |
+-------------------+--------------------------------------------+
| allocation_pools | {"start": "10.0.1.2", "end": "10.0.1.254"} |
| cidr | 10.0.1.0/24 |
| created_at | 2017-01-11T08:49:53Z |
| description | |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 10.0.1.1 |
| host_routes | |
| id | 6a6c63b4-7f41-4a8f-9393-55cd79380e5a |
| ip_version | 4 |
| ipv6_address_mode | |
| ipv6_ra_mode | |
| name | |
| network_id | 1897a446-bf6a-4bce-9374-6a3825ee5051 |
| project_id | ce444c8be6da447bb412db7d30cd7023 |
| revision_number | 2 |
| subnetpool_id | |
| tenant_id | ce444c8be6da447bb412db7d30cd7023 |
| updated_at | 2017-01-11T08:49:53Z |
+-------------------+--------------------------------------------+
List available images in RegionOne.
.. code-block:: console
$ glance --os-region-name=RegionOne image-list
+--------------------------------------+---------------------------------+
| ID | Name |
+--------------------------------------+---------------------------------+
| 924a5078-efe5-4abf-85e8-992b7e5f6ac3 | cirros-0.3.4-x86_64-uec |
| d3e8349d-d58d-4d17-b0ab-951c095fbbc4 | cirros-0.3.4-x86_64-uec-kernel |
| c4cd7482-a145-4f26-9f41-a9ac17b9492c | cirros-0.3.4-x86_64-uec-ramdisk |
+--------------------------------------+---------------------------------+
List available flavors in RegionOne.
.. code-block:: console
$ nova --os-region-name=RegionOne flavor-list
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| 1 | m1.tiny | 512 | 1 | 0 | | 1 | 1.0 | True |
| 2 | m1.small | 2048 | 20 | 0 | | 1 | 1.0 | True |
| 3 | m1.medium | 4096 | 40 | 0 | | 2 | 1.0 | True |
| 4 | m1.large | 8192 | 80 | 0 | | 4 | 1.0 | True |
| 5 | m1.xlarge | 16384 | 160 | 0 | | 8 | 1.0 | True |
| c1 | cirros256 | 256 | 0 | 0 | | 1 | 1.0 | True |
| d1 | ds512M | 512 | 5 | 0 | | 1 | 1.0 | True |
| d2 | ds1G | 1024 | 10 | 0 | | 1 | 1.0 | True |
| d3 | ds2G | 2048 | 10 | 0 | | 2 | 1.0 | True |
| d4 | ds4G | 4096 | 20 | 0 | | 4 | 1.0 | True |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
Boot instance1 in RegionOne, and connect this instance to net1 and phy_net1.
.. code-block:: console
$ nova --os-region-name=RegionOne boot --flavor 1 --image 924a5078-efe5-4abf-85e8-992b7e5f6ac3 --nic net-id=1897a446-bf6a-4bce-9374-6a3825ee5051 --nic net-id=b7832cbb-d399-4d5d-bcfd-d1b804506a1a instance1
+--------------------------------------+----------------------------------------------------------------+
| Property | Value |
+--------------------------------------+----------------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | |
| OS-EXT-SRV-ATTR:host | - |
| OS-EXT-SRV-ATTR:hostname | instance1 |
| OS-EXT-SRV-ATTR:hypervisor_hostname | - |
| OS-EXT-SRV-ATTR:instance_name | |
| OS-EXT-SRV-ATTR:kernel_id | d3e8349d-d58d-4d17-b0ab-951c095fbbc4 |
| OS-EXT-SRV-ATTR:launch_index | 0 |
| OS-EXT-SRV-ATTR:ramdisk_id | c4cd7482-a145-4f26-9f41-a9ac17b9492c |
| OS-EXT-SRV-ATTR:reservation_id | r-eeu5hjq7 |
| OS-EXT-SRV-ATTR:root_device_name | - |
| OS-EXT-SRV-ATTR:user_data | - |
| OS-EXT-STS:power_state | 0 |
| OS-EXT-STS:task_state | scheduling |
| OS-EXT-STS:vm_state | building |
| OS-SRV-USG:launched_at | - |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| adminPass | ZB3Ve3nPS66g |
| config_drive | |
| created | 2017-01-11T10:49:32Z |
| description | - |
| flavor | m1.tiny (1) |
| hostId | |
| host_status | |
| id | 5fd0f616-1077-46df-bebd-b8b53d09663c |
| image | cirros-0.3.4-x86_64-uec (924a5078-efe5-4abf-85e8-992b7e5f6ac3) |
| key_name | - |
| locked | False |
| metadata | {} |
| name | instance1 |
| os-extended-volumes:volumes_attached | [] |
| progress | 0 |
| security_groups | default |
| status | BUILD |
| tags | [] |
| tenant_id | ce444c8be6da447bb412db7d30cd7023 |
| updated | 2017-01-11T10:49:33Z |
| user_id | 66d7b31664a840939f7d3f2de5e717a9 |
+--------------------------------------+----------------------------------------------------------------+
List available images in RegionTwo.
.. code-block:: console
$ glance --os-region-name=RegionTwo image-list
+--------------------------------------+---------------------------------+
| ID | Name |
+--------------------------------------+---------------------------------+
| 1da4303c-96bf-4714-a4dc-cbd5709eda29 | cirros-0.3.4-x86_64-uec |
| fb35d578-a984-4807-8234-f0d0ca393e89 | cirros-0.3.4-x86_64-uec-kernel |
| a615d6df-be63-4d5a-9a05-5cf7e23a438a | cirros-0.3.4-x86_64-uec-ramdisk |
+--------------------------------------+---------------------------------+
List available flavors in RegionTwo.
.. code-block:: console
$ nova --os-region-name=RegionTwo flavor-list
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| 1 | m1.tiny | 512 | 1 | 0 | | 1 | 1.0 | True |
| 2 | m1.small | 2048 | 20 | 0 | | 1 | 1.0 | True |
| 3 | m1.medium | 4096 | 40 | 0 | | 2 | 1.0 | True |
| 4 | m1.large | 8192 | 80 | 0 | | 4 | 1.0 | True |
| 5 | m1.xlarge | 16384 | 160 | 0 | | 8 | 1.0 | True |
| c1 | cirros256 | 256 | 0 | 0 | | 1 | 1.0 | True |
| d1 | ds512M | 512 | 5 | 0 | | 1 | 1.0 | True |
| d2 | ds1G | 1024 | 10 | 0 | | 1 | 1.0 | True |
| d3 | ds2G | 2048 | 10 | 0 | | 2 | 1.0 | True |
| d4 | ds4G | 4096 | 20 | 0 | | 4 | 1.0 | True |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
Boot instance1 in RegionOne, and connect this instance to net1 and phy_net2.
.. code-block:: console
$ nova --os-region-name=RegionTwo boot --flavor 1 --image 1da4303c-96bf-4714-a4dc-cbd5709eda29 --nic net-id=1897a446-bf6a-4bce-9374-6a3825ee5051 --nic net-id=731293af-e68f-4677-b433-f46afd6431f3 instance2
+--------------------------------------+----------------------------------------------------------------+
| Property | Value |
+--------------------------------------+----------------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | |
| OS-EXT-SRV-ATTR:host | - |
| OS-EXT-SRV-ATTR:hostname | instance2 |
| OS-EXT-SRV-ATTR:hypervisor_hostname | - |
| OS-EXT-SRV-ATTR:instance_name | |
| OS-EXT-SRV-ATTR:kernel_id | fb35d578-a984-4807-8234-f0d0ca393e89 |
| OS-EXT-SRV-ATTR:launch_index | 0 |
| OS-EXT-SRV-ATTR:ramdisk_id | a615d6df-be63-4d5a-9a05-5cf7e23a438a |
| OS-EXT-SRV-ATTR:reservation_id | r-m0duhg40 |
| OS-EXT-SRV-ATTR:root_device_name | - |
| OS-EXT-SRV-ATTR:user_data | - |
| OS-EXT-STS:power_state | 0 |
| OS-EXT-STS:task_state | scheduling |
| OS-EXT-STS:vm_state | building |
| OS-SRV-USG:launched_at | - |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| adminPass | M5FodqwcsTiJ |
| config_drive | |
| created | 2017-01-11T12:55:35Z |
| description | - |
| flavor | m1.tiny (1) |
| hostId | |
| host_status | |
| id | 010a0a24-0453-4e73-ae8d-21c7275a9df5 |
| image | cirros-0.3.4-x86_64-uec (1da4303c-96bf-4714-a4dc-cbd5709eda29) |
| key_name | - |
| locked | False |
| metadata | {} |
| name | instance2 |
| os-extended-volumes:volumes_attached | [] |
| progress | 0 |
| security_groups | default |
| status | BUILD |
| tags | [] |
| tenant_id | ce444c8be6da447bb412db7d30cd7023 |
| updated | 2017-01-11T12:55:35Z |
| user_id | 66d7b31664a840939f7d3f2de5e717a9 |
+--------------------------------------+----------------------------------------------------------------+
Make sure the instance1 is active in RegionOne.
.. code-block:: console
$ nova --os-region-name=RegionOne list
+--------------------------------------+-----------+--------+------------+-------------+-------------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+-----------+--------+------------+-------------+-------------------------------------+
| 5fd0f616-1077-46df-bebd-b8b53d09663c | instance1 | ACTIVE | - | Running | net1=10.0.1.4; phy_net1=202.96.1.13 |
+--------------------------------------+-----------+--------+------------+-------------+-------------------------------------+
Make sure the instance2 is active in RegionTwo.
.. code-block:: console
$ nova --os-region-name=RegionTwo list
+--------------------------------------+-----------+--------+------------+-------------+------------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+-----------+--------+------------+-------------+------------------------------------+
| 010a0a24-0453-4e73-ae8d-21c7275a9df5 | instance2 | ACTIVE | - | Running | phy_net2=202.96.2.5; net1=10.0.1.5 |
+--------------------------------------+-----------+--------+------------+-------------+------------------------------------+
Now you can ping instance2's IP address 10.0.1.5 from instance1, or ping
instance1's IP address 10.0.1.4 from instance2.
Note: Not all images will bring up the second nic, so you can ssh into
instance1 or instance2, use ifconfig -a to check whether all NICs are created,
and bring up all NICs if necessary.

View File

@ -0,0 +1,396 @@
================
Local Networking
================
The following figure illustrates one networking mode without cross
Neutron networking requirement, only networking inside one region is needed.
.. code-block:: console
+-----------------+ +-----------------+
| RegionOne | | RegionTwo |
| | | |
| ext-net1 | | ext-net2 |
| +-----+-----+ | | +-----+-----+ |
| | | | | |
| | | | | |
| +--+--+ | | +--+--+ |
| | | | | | | |
| | R1 | | | | R2 | |
| | | | | | | |
| +--+--+ | | +--+--+ |
| | | | | |
| | | | | |
| +---+-+-+ | | +---++--+ |
| net1 | | | net2 | |
| | | | | |
| +-------+---+ | | +-------+----+ |
| | instance1 | | | | instance2 | |
| +-----------+ | | +------------+ |
+-----------------+ +-----------------+
How to create this network topology
===================================
Create external network ext-net1, which will be located in RegionOne.
Need to specify region name as the value of availability-zone-hint.
If availability-zone-hint is not provided, then the external network
will be created in a default region.
.. code-block:: console
$ neutron --os-region-name=CentralRegion net-create --provider:network_type vlan --provider:physical_network extern --router:external --availability-zone-hint RegionOne ext-net1
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| availability_zone_hints | RegionOne |
| id | a3a23b20-b0c1-461a-bc00-3db04ce212ca |
| name | ext-net1 |
| project_id | c0e194dfadd44fc1983fd6dd7c8ed384 |
| provider:network_type | vlan |
| provider:physical_network | extern |
| provider:segmentation_id | 170 |
| router:external | True |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | c0e194dfadd44fc1983fd6dd7c8ed384 |
+---------------------------+--------------------------------------+
For external network, the network will be created in the region specified in
availability-zone-hint too.
.. code-block:: console
$ neutron --os-region-name=CentralRegion net-list
+--------------------------------------+----------+---------+
| id | name | subnets |
+--------------------------------------+----------+---------+
| a3a23b20-b0c1-461a-bc00-3db04ce212ca | ext-net1 | |
+--------------------------------------+----------+---------+
$ neutron --os-region-name=RegionOne net-list
+--------------------------------------+--------------------------------------+---------+
| id | name | subnets |
+--------------------------------------+--------------------------------------+---------+
| a3a23b20-b0c1-461a-bc00-3db04ce212ca | a3a23b20-b0c1-461a-bc00-3db04ce212ca | |
+--------------------------------------+--------------------------------------+---------+
Create subnet in ext-net1.
.. code-block:: console
$ neutron --os-region-name=CentralRegion subnet-create --name ext-subnet1 --disable-dhcp ext-net1 163.3.124.0/24
+-------------------+--------------------------------------------------+
| Field | Value |
+-------------------+--------------------------------------------------+
| allocation_pools | {"start": "163.3.124.2", "end": "163.3.124.254"} |
| cidr | 163.3.124.0/24 |
| created_at | 2017-01-10T04:49:16Z |
| description | |
| dns_nameservers | |
| enable_dhcp | False |
| gateway_ip | 163.3.124.1 |
| host_routes | |
| id | 055ec17a-5b64-4cff-878c-c898427aabe3 |
| ip_version | 4 |
| ipv6_address_mode | |
| ipv6_ra_mode | |
| name | ext-subnet1 |
| network_id | a3a23b20-b0c1-461a-bc00-3db04ce212ca |
| project_id | c0e194dfadd44fc1983fd6dd7c8ed384 |
| revision_number | 2 |
| subnetpool_id | |
| tenant_id | c0e194dfadd44fc1983fd6dd7c8ed384 |
| updated_at | 2017-01-10T04:49:16Z |
+-------------------+--------------------------------------------------+
Create router R1.
.. code-block:: console
$ neutron --os-region-name=CentralRegion router-create R1
+-----------------------+--------------------------------------+
| Field | Value |
+-----------------------+--------------------------------------+
| admin_state_up | True |
| created_at | 2017-01-10T04:50:06Z |
| description | |
| external_gateway_info | |
| id | 7ce3282f-3864-4c55-84bf-fc5edc3293cb |
| name | R1 |
| project_id | c0e194dfadd44fc1983fd6dd7c8ed384 |
| revision_number | 1 |
| status | ACTIVE |
| tenant_id | c0e194dfadd44fc1983fd6dd7c8ed384 |
| updated_at | 2017-01-10T04:50:06Z |
+-----------------------+--------------------------------------+
Set the router gateway to ext-net1 for R1.
.. code-block:: console
$ neutron --os-region-name=CentralRegion router-gateway-set R1 ext-net1
Set gateway for router R1
$ neutron --os-region-name=CentralRegion router-show R1
+-----------------------+------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-----------------------+------------------------------------------------------------------------------------------------------------+
| admin_state_up | True |
| created_at | 2017-01-10T04:50:06Z |
| description | |
| external_gateway_info | {"network_id": "a3a23b20-b0c1-461a-bc00-3db04ce212ca", "external_fixed_ips": [{"subnet_id": "055ec17a-5b64 |
| | -4cff-878c-c898427aabe3", "ip_address": "163.3.124.5"}]} |
| id | 7ce3282f-3864-4c55-84bf-fc5edc3293cb |
| name | R1 |
| project_id | c0e194dfadd44fc1983fd6dd7c8ed384 |
| revision_number | 3 |
| status | ACTIVE |
| tenant_id | c0e194dfadd44fc1983fd6dd7c8ed384 |
| updated_at | 2017-01-10T04:51:19Z |
+-----------------------+------------------------------------------------------------------------------------------------------------+
Create network net1.
.. code-block:: console
$ neutron --os-region-name=CentralRegion net-create net1
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| availability_zone_hints | |
| id | beaf59eb-c597-4b69-bd41-8bf9fee2dc6a |
| name | net1 |
| project_id | c0e194dfadd44fc1983fd6dd7c8ed384 |
| provider:network_type | local |
| provider:physical_network | |
| provider:segmentation_id | |
| router:external | False |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | c0e194dfadd44fc1983fd6dd7c8ed384 |
+---------------------------+--------------------------------------+
Create a subnet in net1.
.. code-block:: console
$ neutron --os-region-name=CentralRegion subnet-create net1 10.0.1.0/24
+-------------------+--------------------------------------------+
| Field | Value |
+-------------------+--------------------------------------------+
| allocation_pools | {"start": "10.0.1.2", "end": "10.0.1.254"} |
| cidr | 10.0.1.0/24 |
| created_at | 2017-01-10T04:54:29Z |
| description | |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 10.0.1.1 |
| host_routes | |
| id | ab812ed5-1a4c-4b12-859c-6c9b3df21642 |
| ip_version | 4 |
| ipv6_address_mode | |
| ipv6_ra_mode | |
| name | |
| network_id | beaf59eb-c597-4b69-bd41-8bf9fee2dc6a |
| project_id | c0e194dfadd44fc1983fd6dd7c8ed384 |
| revision_number | 2 |
| subnetpool_id | |
| tenant_id | c0e194dfadd44fc1983fd6dd7c8ed384 |
| updated_at | 2017-01-10T04:54:29Z |
+-------------------+--------------------------------------------+
Add this subnet to router R1.
.. code-block:: console
$ neutron --os-region-name=CentralRegion router-interface-add R1 ab812ed5-1a4c-4b12-859c-6c9b3df21642
Added interface 2b7eceaf-8333-49cd-a7fe-aa101d5c9598 to router R1.
List the available images in RegionOne.
.. code-block:: console
$ glance --os-region-name=RegionOne image-list
+--------------------------------------+---------------------------------+
| ID | Name |
+--------------------------------------+---------------------------------+
| 2f73b93e-8b8a-4e07-8732-87f968852d82 | cirros-0.3.4-x86_64-uec |
| 4040ca54-2ebc-4ccd-8a0d-4284f4713ef1 | cirros-0.3.4-x86_64-uec-kernel |
| 7e86341f-2d6e-4a2a-b01a-e334fa904cf0 | cirros-0.3.4-x86_64-uec-ramdisk |
+--------------------------------------+---------------------------------+
List the available flavors in RegionOne.
.. code-block:: console
$ nova --os-region-name=RegionOne flavor-list
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| 1 | m1.tiny | 512 | 1 | 0 | | 1 | 1.0 | True |
| 2 | m1.small | 2048 | 20 | 0 | | 1 | 1.0 | True |
| 3 | m1.medium | 4096 | 40 | 0 | | 2 | 1.0 | True |
| 4 | m1.large | 8192 | 80 | 0 | | 4 | 1.0 | True |
| 5 | m1.xlarge | 16384 | 160 | 0 | | 8 | 1.0 | True |
| c1 | cirros256 | 256 | 0 | 0 | | 1 | 1.0 | True |
| d1 | ds512M | 512 | 5 | 0 | | 1 | 1.0 | True |
| d2 | ds1G | 1024 | 10 | 0 | | 1 | 1.0 | True |
| d3 | ds2G | 2048 | 10 | 0 | | 2 | 1.0 | True |
| d4 | ds4G | 4096 | 20 | 0 | | 4 | 1.0 | True |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
Boot instance1 in RegionOne, and connect this instance to net1.
.. code-block:: console
$ nova --os-region-name=RegionOne boot --flavor 1 --image 2f73b93e-8b8a-4e07-8732-87f968852d82 --nic net-id=beaf59eb-c597-4b69-bd41-8bf9fee2dc6a instance1
+--------------------------------------+----------------------------------------------------------------+
| Property | Value |
+--------------------------------------+----------------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | |
| OS-EXT-SRV-ATTR:host | - |
| OS-EXT-SRV-ATTR:hostname | instance1 |
| OS-EXT-SRV-ATTR:hypervisor_hostname | - |
| OS-EXT-SRV-ATTR:instance_name | |
| OS-EXT-SRV-ATTR:kernel_id | 4040ca54-2ebc-4ccd-8a0d-4284f4713ef1 |
| OS-EXT-SRV-ATTR:launch_index | 0 |
| OS-EXT-SRV-ATTR:ramdisk_id | 7e86341f-2d6e-4a2a-b01a-e334fa904cf0 |
| OS-EXT-SRV-ATTR:reservation_id | r-5t409rww |
| OS-EXT-SRV-ATTR:root_device_name | - |
| OS-EXT-SRV-ATTR:user_data | - |
| OS-EXT-STS:power_state | 0 |
| OS-EXT-STS:task_state | scheduling |
| OS-EXT-STS:vm_state | building |
| OS-SRV-USG:launched_at | - |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| adminPass | 23DipTvrpCvn |
| config_drive | |
| created | 2017-01-10T04:59:25Z |
| description | - |
| flavor | m1.tiny (1) |
| hostId | |
| host_status | |
| id | 301546be-b675-49eb-b6c2-c5c986235ecb |
| image | cirros-0.3.4-x86_64-uec (2f73b93e-8b8a-4e07-8732-87f968852d82) |
| key_name | - |
| locked | False |
| metadata | {} |
| name | instance1 |
| os-extended-volumes:volumes_attached | [] |
| progress | 0 |
| security_groups | default |
| status | BUILD |
| tags | [] |
| tenant_id | c0e194dfadd44fc1983fd6dd7c8ed384 |
| updated | 2017-01-10T04:59:26Z |
| user_id | a7b7420bd76c48c2bb5cb97c16bb165d |
+--------------------------------------+----------------------------------------------------------------+
Make sure instance1 is active in RegionOne.
.. code-block:: console
$ nova --os-region-name=RegionOne list
+--------------------------------------+-----------+--------+------------+-------------+---------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+-----------+--------+------------+-------------+---------------+
| 301546be-b675-49eb-b6c2-c5c986235ecb | instance1 | ACTIVE | - | Running | net1=10.0.1.4 |
+--------------------------------------+-----------+--------+------------+-------------+---------------+
Verify regarding networking resource are provisioned in RegionOne.
.. code-block:: console
$ neutron --os-region-name=RegionOne router-list
+------------------------------------+------------------------------------+------------------------------------+-------------+-------+
| id | name | external_gateway_info | distributed | ha |
+------------------------------------+------------------------------------+------------------------------------+-------------+-------+
| d6cd0978-f3cc-4a0b-b45b- | 7ce3282f-3864-4c55-84bf- | {"network_id": "a3a23b20-b0c1 | False | False |
| a427ebc51382 | fc5edc3293cb | -461a-bc00-3db04ce212ca", | | |
| | | "enable_snat": true, | | |
| | | "external_fixed_ips": | | |
| | | [{"subnet_id": "055ec17a-5b64 | | |
| | | -4cff-878c-c898427aabe3", | | |
| | | "ip_address": "163.3.124.5"}]} | | |
+------------------------------------+------------------------------------+------------------------------------+-------------+-------+
Create a floating IP for instance1.
.. code-block:: console
$ neutron --os-region-name=CentralRegion floatingip-create ext-net1
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| created_at | 2017-01-10T05:17:48Z |
| description | |
| fixed_ip_address | |
| floating_ip_address | 163.3.124.7 |
| floating_network_id | a3a23b20-b0c1-461a-bc00-3db04ce212ca |
| id | 0c031c3f-93ba-49bf-9c98-03bf4b0c7b2b |
| port_id | |
| project_id | c0e194dfadd44fc1983fd6dd7c8ed384 |
| revision_number | 1 |
| router_id | |
| status | DOWN |
| tenant_id | c0e194dfadd44fc1983fd6dd7c8ed384 |
| updated_at | 2017-01-10T05:17:48Z |
+---------------------+--------------------------------------+
List the port in net1 for instance1.
.. code-block:: console
$ neutron --os-region-name=CentralRegion port-list
+------------------------------------+------------------------------------+-------------------+--------------------------------------+
| id | name | mac_address | fixed_ips |
+------------------------------------+------------------------------------+-------------------+--------------------------------------+
| 0b55c3b3-ae5f-4d03-899b- | | fa:16:3e:b5:1d:95 | {"subnet_id": "ab812ed5-1a4c-4b12 |
| f056d967942e | | | -859c-6c9b3df21642", "ip_address": |
| | | | "10.0.1.4"} |
| 2b7eceaf-8333-49cd-a7fe- | | fa:16:3e:59:b3:ef | {"subnet_id": "ab812ed5-1a4c-4b12 |
| aa101d5c9598 | | | -859c-6c9b3df21642", "ip_address": |
| | | | "10.0.1.1"} |
| 572ad59f- | dhcp_port_ab812ed5-1a4c-4b12-859c- | fa:16:3e:56:7f:2b | {"subnet_id": "ab812ed5-1a4c-4b12 |
| 5a15-4662-9fb8-f92a49389b28 | 6c9b3df21642 | | -859c-6c9b3df21642", "ip_address": |
| | | | "10.0.1.2"} |
| bf398883-c435-4cb2-8693-017a790825 | interface_RegionOne_ab812ed5-1a4c- | fa:16:3e:15:ef:1f | {"subnet_id": "ab812ed5-1a4c-4b12 |
| 9e | 4b12-859c-6c9b3df21642 | | -859c-6c9b3df21642", "ip_address": |
| | | | "10.0.1.7"} |
| 452b8ebf- | | fa:16:3e:1f:59:b2 | {"subnet_id": "055ec17a-5b64-4cff- |
| c9c6-4990-9048-644a3a6fde1a | | | 878c-c898427aabe3", "ip_address": |
| | | | "163.3.124.5"} |
| 8e77c6ab-2884-4779-91e2-c3a4975fdf | | fa:16:3e:3c:88:7d | {"subnet_id": "055ec17a-5b64-4cff- |
| 50 | | | 878c-c898427aabe3", "ip_address": |
| | | | "163.3.124.7"} |
+------------------------------------+------------------------------------+-------------------+--------------------------------------+
Associate the floating IP to instance1's IP in net1.
.. code-block:: console
$ neutron --os-region-name=CentralRegion floatingip-associate 0c031c3f-93ba-49bf-9c98-03bf4b0c7b2b 0b55c3b3-ae5f-4d03-899b-f056d967942e
Associated floating IP 0c031c3f-93ba-49bf-9c98-03bf4b0c7b2b
Verify floating IP is associated in RegionOne too.
.. code-block:: console
$ neutron --os-region-name=RegionOne floatingip-list
+--------------------------------------+------------------+---------------------+--------------------------------------+
| id | fixed_ip_address | floating_ip_address | port_id |
+--------------------------------------+------------------+---------------------+--------------------------------------+
| b28baa80-d798-43e7-baff-e65873bd1ec2 | 10.0.1.4 | 163.3.124.7 | 0b55c3b3-ae5f-4d03-899b-f056d967942e |
+--------------------------------------+------------------+---------------------+--------------------------------------+
You can create topology in RegionTwo like what has been done in RegionOne.

View File

@ -0,0 +1,848 @@
=====================================================
North South Networking via Multiple External Networks
=====================================================
The following figure illustrates one typical networking mode, instances have
two interfaces, one interface is connected to net3 for heartbeat or
data replication, the other interface is connected to net1 or net2 to provide
service. There is different external network in different region to support
service redundancy in case of region level failure.
.. code-block:: console
+-----------------+ +-----------------+
| RegionOne | | RegionTwo |
| | | |
| ext_net1 | | ext_net2 |
| +-----+-----+ | | +-----+-----+ |
| | | | | |
| | | | | |
| +--+--+ | | +--+--+ |
| | | | | | | |
| | R1 | | | | R2 | |
| | | | | | | |
| +--+--+ | | +--+--+ |
| | | | | |
| | | | | |
| +---+-+-+ | | +---+-+-+ |
| net1 | | | net2 | |
| | | | | |
| +--------+--+ | | +--------+--+ |
| | Instance1 | | | | Instance2 | |
| +-----------+ | | +-----------+ |
| | | | | |
| | | net3 | | |
| +------+-------------------------+----+ |
| | | |
+-----------------+ +-----------------+
How to create this network topology
===================================
Create external network ext-net1, which will be located in RegionOne.
.. code-block:: console
$ neutron --os-region-name=CentralRegion net-create --provider:network_type vlan --provider:physical_network extern --router:external --availability-zone-hint RegionOne ext-net1
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| availability_zone_hints | RegionOne |
| id | 9b3d04be-0c00-40ed-88ff-088da6fcd8bd |
| name | ext-net1 |
| project_id | 532890c765604609a8d2ef6fc8e5f6ef |
| provider:network_type | vlan |
| provider:physical_network | extern |
| provider:segmentation_id | 170 |
| router:external | True |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | 532890c765604609a8d2ef6fc8e5f6ef |
+---------------------------+--------------------------------------+
Create subnet in ext-net1.
.. code-block:: console
$ neutron --os-region-name=CentralRegion subnet-create --name ext-subnet1 --disable-dhcp ext-net1 163.3.124.0/24
+-------------------+--------------------------------------------------+
| Field | Value |
+-------------------+--------------------------------------------------+
| allocation_pools | {"start": "163.3.124.2", "end": "163.3.124.254"} |
| cidr | 163.3.124.0/24 |
| created_at | 2017-01-12T07:03:45Z |
| description | |
| dns_nameservers | |
| enable_dhcp | False |
| gateway_ip | 163.3.124.1 |
| host_routes | |
| id | a2eecc16-deb8-42a6-a41b-5058847ed20a |
| ip_version | 4 |
| ipv6_address_mode | |
| ipv6_ra_mode | |
| name | ext-subnet1 |
| network_id | 9b3d04be-0c00-40ed-88ff-088da6fcd8bd |
| project_id | 532890c765604609a8d2ef6fc8e5f6ef |
| revision_number | 2 |
| subnetpool_id | |
| tenant_id | 532890c765604609a8d2ef6fc8e5f6ef |
| updated_at | 2017-01-12T07:03:45Z |
+-------------------+--------------------------------------------------+
Create router R1.
.. code-block:: console
$ neutron --os-region-name=CentralRegion router-create R1
+-----------------------+--------------------------------------+
| Field | Value |
+-----------------------+--------------------------------------+
| admin_state_up | True |
| created_at | 2017-01-12T07:04:13Z |
| description | |
| external_gateway_info | |
| id | 063de74b-d962-4fc2-96d9-87e2cb35c082 |
| name | R1 |
| project_id | 532890c765604609a8d2ef6fc8e5f6ef |
| revision_number | 1 |
| status | ACTIVE |
| tenant_id | 532890c765604609a8d2ef6fc8e5f6ef |
| updated_at | 2017-01-12T07:04:13Z |
+-----------------------+--------------------------------------+
Set the router gateway to ext-net1 for R1.
.. code-block:: console
$ neutron --os-region-name=CentralRegion router-gateway-set R1 ext-net1
Set gateway for router R1
$ neutron --os-region-name=CentralRegion router-show R1
+-----------------------+------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-----------------------+------------------------------------------------------------------------------------------------------------+
| admin_state_up | True |
| created_at | 2017-01-12T07:04:13Z |
| description | |
| external_gateway_info | {"network_id": "9b3d04be-0c00-40ed-88ff-088da6fcd8bd", "external_fixed_ips": [{"subnet_id": |
| | "a2eecc16-deb8-42a6-a41b-5058847ed20a", "ip_address": "163.3.124.5"}]} |
| id | 063de74b-d962-4fc2-96d9-87e2cb35c082 |
| name | R1 |
| project_id | 532890c765604609a8d2ef6fc8e5f6ef |
| revision_number | 3 |
| status | ACTIVE |
| tenant_id | 532890c765604609a8d2ef6fc8e5f6ef |
| updated_at | 2017-01-12T07:04:36Z |
+-----------------------+------------------------------------------------------------------------------------------------------------+
Create local network net1 which will reside in RegionOne. You can use az1 or
RegionOne as the value of availability-zone-hint.
.. code-block:: console
$ neutron --os-region-name=CentralRegion net-create --availability-zone-hint az1 net1
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| availability_zone_hints | az1 |
| id | de4fda27-e4f7-4448-80f6-79ee5ea2478b |
| name | net1 |
| project_id | 532890c765604609a8d2ef6fc8e5f6ef |
| provider:network_type | local |
| provider:physical_network | |
| provider:segmentation_id | |
| router:external | False |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | 532890c765604609a8d2ef6fc8e5f6ef |
+---------------------------+--------------------------------------+
Create a subnet in net1.
.. code-block:: console
$ neutron --os-region-name=CentralRegion subnet-create net1 10.0.1.0/24
+-------------------+--------------------------------------------+
| Field | Value |
+-------------------+--------------------------------------------+
| allocation_pools | {"start": "10.0.1.2", "end": "10.0.1.254"} |
| cidr | 10.0.1.0/24 |
| created_at | 2017-01-12T07:05:57Z |
| description | |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 10.0.1.1 |
| host_routes | |
| id | 2c8f446f-ba02-4140-a793-913033aa3580 |
| ip_version | 4 |
| ipv6_address_mode | |
| ipv6_ra_mode | |
| name | |
| network_id | de4fda27-e4f7-4448-80f6-79ee5ea2478b |
| project_id | 532890c765604609a8d2ef6fc8e5f6ef |
| revision_number | 2 |
| subnetpool_id | |
| tenant_id | 532890c765604609a8d2ef6fc8e5f6ef |
| updated_at | 2017-01-12T07:05:57Z |
+-------------------+--------------------------------------------+
Add this subnet to router R1.
.. code-block:: console
$ neutron --os-region-name=CentralRegion router-interface-add R1 2c8f446f-ba02-4140-a793-913033aa3580
Added interface d48a8e87-61a0-494b-bc06-54f7a008ea78 to router R1.
Create net3 which will work as the L2 network across RegionOne and RegionTwo.
.. code-block:: console
$ neutron --os-region-name=CentralRegion net-create --provider:network_type vlan --provider:physical_network bridge --availability-zone-hint az1 --availability-zone-hint az2 net3
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| availability_zone_hints | az1 |
| | az2 |
| id | 68d04c60-469d-495d-bb23-0d36d56235bd |
| name | net3 |
| project_id | 532890c765604609a8d2ef6fc8e5f6ef |
| provider:network_type | vlan |
| provider:physical_network | bridge |
| provider:segmentation_id | 138 |
| router:external | False |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | 532890c765604609a8d2ef6fc8e5f6ef |
+---------------------------+--------------------------------------+
Create a subnet in net3.
.. code-block:: console
$ neutron --os-region-name=CentralRegion subnet-create net3 10.0.3.0/24
+-------------------+--------------------------------------------+
| Field | Value |
+-------------------+--------------------------------------------+
| allocation_pools | {"start": "10.0.3.2", "end": "10.0.3.254"} |
| cidr | 10.0.3.0/24 |
| created_at | 2017-01-12T07:07:42Z |
| description | |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 10.0.3.1 |
| host_routes | |
| id | 5ab92c3c-b799-451c-b5d5-b72274fb0fcc |
| ip_version | 4 |
| ipv6_address_mode | |
| ipv6_ra_mode | |
| name | |
| network_id | 68d04c60-469d-495d-bb23-0d36d56235bd |
| project_id | 532890c765604609a8d2ef6fc8e5f6ef |
| revision_number | 2 |
| subnetpool_id | |
| tenant_id | 532890c765604609a8d2ef6fc8e5f6ef |
| updated_at | 2017-01-12T07:07:42Z |
+-------------------+--------------------------------------------+
List the available images in RegionOne.
.. code-block:: console
$ glance --os-region-name=RegionOne image-list
+--------------------------------------+---------------------------------+
| ID | Name |
+--------------------------------------+---------------------------------+
| 8747fd6a-72aa-4075-b936-a24bc48ed57b | cirros-0.3.4-x86_64-uec |
| 3a54e6fd-d215-437b-9d67-eac840c97f9c | cirros-0.3.4-x86_64-uec-kernel |
| 02b06834-2a9f-4dad-8d59-2a77963af8a5 | cirros-0.3.4-x86_64-uec-ramdisk |
+--------------------------------------+---------------------------------+
List the available flavors in RegionOne.
.. code-block:: console
$ nova --os-region-name=RegionOne flavor-list
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| 1 | m1.tiny | 512 | 1 | 0 | | 1 | 1.0 | True |
| 2 | m1.small | 2048 | 20 | 0 | | 1 | 1.0 | True |
| 3 | m1.medium | 4096 | 40 | 0 | | 2 | 1.0 | True |
| 4 | m1.large | 8192 | 80 | 0 | | 4 | 1.0 | True |
| 5 | m1.xlarge | 16384 | 160 | 0 | | 8 | 1.0 | True |
| c1 | cirros256 | 256 | 0 | 0 | | 1 | 1.0 | True |
| d1 | ds512M | 512 | 5 | 0 | | 1 | 1.0 | True |
| d2 | ds1G | 1024 | 10 | 0 | | 1 | 1.0 | True |
| d3 | ds2G | 2048 | 10 | 0 | | 2 | 1.0 | True |
| d4 | ds4G | 4096 | 20 | 0 | | 4 | 1.0 | True |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
Boot instance1 in RegionOne, and connect this instance to net1 and net3.
.. code-block:: console
$ nova --os-region-name=RegionOne boot --flavor 1 --image 8747fd6a-72aa-4075-b936-a24bc48ed57b --nic net-id=68d04c60-469d-495d-bb23-0d36d56235bd --nic net-id=de4fda27-e4f7-4448-80f6-79ee5ea2478b instance1
+--------------------------------------+----------------------------------------------------------------+
| Property | Value |
+--------------------------------------+----------------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | |
| OS-EXT-SRV-ATTR:host | - |
| OS-EXT-SRV-ATTR:hostname | instance1 |
| OS-EXT-SRV-ATTR:hypervisor_hostname | - |
| OS-EXT-SRV-ATTR:instance_name | |
| OS-EXT-SRV-ATTR:kernel_id | 3a54e6fd-d215-437b-9d67-eac840c97f9c |
| OS-EXT-SRV-ATTR:launch_index | 0 |
| OS-EXT-SRV-ATTR:ramdisk_id | 02b06834-2a9f-4dad-8d59-2a77963af8a5 |
| OS-EXT-SRV-ATTR:reservation_id | r-9cnhvave |
| OS-EXT-SRV-ATTR:root_device_name | - |
| OS-EXT-SRV-ATTR:user_data | - |
| OS-EXT-STS:power_state | 0 |
| OS-EXT-STS:task_state | scheduling |
| OS-EXT-STS:vm_state | building |
| OS-SRV-USG:launched_at | - |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| adminPass | zDFR3x8pDDKi |
| config_drive | |
| created | 2017-01-12T07:09:53Z |
| description | - |
| flavor | m1.tiny (1) |
| hostId | |
| host_status | |
| id | 3d53560e-4e04-43a0-b774-cfa3deecbca4 |
| image | cirros-0.3.4-x86_64-uec (8747fd6a-72aa-4075-b936-a24bc48ed57b) |
| key_name | - |
| locked | False |
| metadata | {} |
| name | instance1 |
| os-extended-volumes:volumes_attached | [] |
| progress | 0 |
| security_groups | default |
| status | BUILD |
| tags | [] |
| tenant_id | 532890c765604609a8d2ef6fc8e5f6ef |
| updated | 2017-01-12T07:09:54Z |
| user_id | d2521e53aa8c4916b3a8e444f20cf1da |
+--------------------------------------+----------------------------------------------------------------+
Make sure the instance1 is active in RegionOne.
.. code-block:: console
$ nova --os-region-name=RegionOne list
+--------------------------------------+-----------+--------+------------+-------------+-------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+-----------+--------+------------+-------------+-------------------------------+
| 3d53560e-4e04-43a0-b774-cfa3deecbca4 | instance1 | ACTIVE | - | Running | net3=10.0.3.7; net1=10.0.1.13 |
+--------------------------------------+-----------+--------+------------+-------------+-------------------------------+
Create a floating IP for instance1.
.. code-block:: console
$ neutron --os-region-name=CentralRegion floatingip-create ext-net1
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| created_at | 2017-01-12T07:12:50Z |
| description | |
| fixed_ip_address | |
| floating_ip_address | 163.3.124.6 |
| floating_network_id | 9b3d04be-0c00-40ed-88ff-088da6fcd8bd |
| id | 645f9cd6-d8d4-427a-88fe-770240c96d09 |
| port_id | |
| project_id | 532890c765604609a8d2ef6fc8e5f6ef |
| revision_number | 1 |
| router_id | |
| status | DOWN |
| tenant_id | 532890c765604609a8d2ef6fc8e5f6ef |
| updated_at | 2017-01-12T07:12:50Z |
+---------------------+--------------------------------------+
List the port in net1 for instance1.
.. code-block:: console
$ neutron --os-region-name=CentralRegion port-list
+------------------------------------+------------------------------------+-------------------+--------------------------------------+
| id | name | mac_address | fixed_ips |
+------------------------------------+------------------------------------+-------------------+--------------------------------------+
| 185b5185-0254-486c-9d8b- | | fa:16:3e:da:ae:99 | {"subnet_id": "2c8f446f- |
| 198af4b4d40e | | | ba02-4140-a793-913033aa3580", |
| | | | "ip_address": "10.0.1.13"} |
| 248f9072-76d6-405a- | | fa:16:3e:dc:2f:b3 | {"subnet_id": "5ab92c3c-b799-451c- |
| 8eb5-f0d3475c542d | | | b5d5-b72274fb0fcc", "ip_address": |
| | | | "10.0.3.7"} |
| d48a8e87-61a0-494b- | | fa:16:3e:c6:8e:c5 | {"subnet_id": "2c8f446f- |
| bc06-54f7a008ea78 | | | ba02-4140-a793-913033aa3580", |
| | | | "ip_address": "10.0.1.1"} |
| ce3a1530-20f4-4760-a451-81e5f939aa | dhcp_port_2c8f446f- | fa:16:3e:e6:32:0f | {"subnet_id": "2c8f446f- |
| fc | ba02-4140-a793-913033aa3580 | | ba02-4140-a793-913033aa3580", |
| | | | "ip_address": "10.0.1.2"} |
| 7925a3cc- | interface_RegionOne_2c8f446f- | fa:16:3e:c5:ad:6f | {"subnet_id": "2c8f446f- |
| 6c36-4bc3-a798-a6145fed442a | ba02-4140-a793-913033aa3580 | | ba02-4140-a793-913033aa3580", |
| | | | "ip_address": "10.0.1.3"} |
| 077c63b6-0184-4bf7-b3aa- | dhcp_port_5ab92c3c-b799-451c- | fa:16:3e:d2:a3:53 | {"subnet_id": "5ab92c3c-b799-451c- |
| b071de6f39be | b5d5-b72274fb0fcc | | b5d5-b72274fb0fcc", "ip_address": |
| | | | "10.0.3.2"} |
| c90be7bc- | interface_RegionOne_5ab92c3c-b799 | fa:16:3e:b6:e4:bc | {"subnet_id": "5ab92c3c-b799-451c- |
| 31ea-4015-a432-2bef62e343d1 | -451c-b5d5-b72274fb0fcc | | b5d5-b72274fb0fcc", "ip_address": |
| | | | "10.0.3.9"} |
| 3053fcb9-b6ad-4a9c-b89e- | bridge_port_532890c765604609a8d2ef | fa:16:3e:fc:d0:fc | {"subnet_id": "53def0ac-59ef- |
| ffe6aff6523b | 6fc8e5f6ef_0c4faa42-5230-4adc- | | 4c7b-b694-3375598954da", |
| | bab5-10ee53ebf888 | | "ip_address": "100.0.0.11"} |
| ce787983-a140-4c53-96d2-71f62e1545 | | fa:16:3e:1a:62:7f | {"subnet_id": "a2eecc16-deb8-42a6 |
| 3a | | | -a41b-5058847ed20a", "ip_address": |
| | | | "163.3.124.5"} |
| 2d9fc640-1858-4c7e-b42c- | | fa:16:3e:00:7c:6e | {"subnet_id": "a2eecc16-deb8-42a6 |
| d3ed3f338b8a | | | -a41b-5058847ed20a", "ip_address": |
| | | | "163.3.124.6"} |
+------------------------------------+------------------------------------+-------------------+--------------------------------------+
Associate the floating IP to instance1's IP in net1.
.. code-block:: console
$ neutron --os-region-name=CentralRegion floatingip-associate 645f9cd6-d8d4-427a-88fe-770240c96d09 185b5185-0254-486c-9d8b-198af4b4d40e
Associated floating IP 645f9cd6-d8d4-427a-88fe-770240c96d09
Verify the floating IP was associated.
.. code-block:: console
$ neutron --os-region-name=CentralRegion floatingip-list
+--------------------------------------+------------------+---------------------+--------------------------------------+
| id | fixed_ip_address | floating_ip_address | port_id |
+--------------------------------------+------------------+---------------------+--------------------------------------+
| 645f9cd6-d8d4-427a-88fe-770240c96d09 | 10.0.1.13 | 163.3.124.6 | 185b5185-0254-486c-9d8b-198af4b4d40e |
+--------------------------------------+------------------+---------------------+--------------------------------------+
You can also check that in RegionOne.
.. code-block:: console
$ neutron --os-region-name=RegionOne floatingip-list
+--------------------------------------+------------------+---------------------+--------------------------------------+
| id | fixed_ip_address | floating_ip_address | port_id |
+--------------------------------------+------------------+---------------------+--------------------------------------+
| d59362fa-aea0-4e35-917e-8e586212c867 | 10.0.1.13 | 163.3.124.6 | 185b5185-0254-486c-9d8b-198af4b4d40e |
+--------------------------------------+------------------+---------------------+--------------------------------------+
$ neutron --os-region-name=RegionOne router-list
+------------------------------------+------------------------------------+------------------------------------+-------------+-------+
| id | name | external_gateway_info | distributed | ha |
+------------------------------------+------------------------------------+------------------------------------+-------------+-------+
| 0c4faa42-5230-4adc- | 063de74b-d962-4fc2-96d9-87e2cb35c0 | {"network_id": "6932cd71-3cd4-4560 | False | False |
| bab5-10ee53ebf888 | 82 | -88f3-2a112fff0cea", | | |
| | | "enable_snat": false, | | |
| | | "external_fixed_ips": | | |
| | | [{"subnet_id": "53def0ac-59ef- | | |
| | | 4c7b-b694-3375598954da", | | |
| | | "ip_address": "100.0.0.11"}]} | | |
| f99dcc0c-d94a- | ns_router_063de74b-d962-4fc2-96d9- | {"network_id": "9b3d04be-0c00 | False | False |
| 4b41-9236-2c0169f3ab7d | 87e2cb35c082 | -40ed-88ff-088da6fcd8bd", | | |
| | | "enable_snat": true, | | |
| | | "external_fixed_ips": | | |
| | | [{"subnet_id": "a2eecc16-deb8-42a6 | | |
| | | -a41b-5058847ed20a", "ip_address": | | |
| | | "163.3.124.5"}]} | | |
+------------------------------------+------------------------------------+------------------------------------+-------------+-------+
Create network topology in RegionTwo.
Create external network ext-net1, which will be located in RegionTwo.
.. code-block:: console
$ neutron --os-region-name=CentralRegion net-create --provider:network_type vlan --provider:physical_network extern --router:external --availability-zone-hint RegionTwo ext-net2
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| availability_zone_hints | RegionTwo |
| id | ae806ecb-fa3e-4b3c-a582-caef3d8cd9b4 |
| name | ext-net2 |
| project_id | 532890c765604609a8d2ef6fc8e5f6ef |
| provider:network_type | vlan |
| provider:physical_network | extern |
| provider:segmentation_id | 183 |
| router:external | True |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | 532890c765604609a8d2ef6fc8e5f6ef |
+---------------------------+--------------------------------------+
Create subnet in ext-net1.
.. code-block:: console
$ neutron --os-region-name=CentralRegion subnet-create --name ext-subnet2 --disable-dhcp ext-net2 163.3.125.0/24
+-------------------+--------------------------------------------------+
| Field | Value |
+-------------------+--------------------------------------------------+
| allocation_pools | {"start": "163.3.125.2", "end": "163.3.125.254"} |
| cidr | 163.3.125.0/24 |
| created_at | 2017-01-12T07:43:04Z |
| description | |
| dns_nameservers | |
| enable_dhcp | False |
| gateway_ip | 163.3.125.1 |
| host_routes | |
| id | 9fb32423-95a8-4589-b69c-e2955234ae56 |
| ip_version | 4 |
| ipv6_address_mode | |
| ipv6_ra_mode | |
| name | ext-subnet2 |
| network_id | ae806ecb-fa3e-4b3c-a582-caef3d8cd9b4 |
| project_id | 532890c765604609a8d2ef6fc8e5f6ef |
| revision_number | 2 |
| subnetpool_id | |
| tenant_id | 532890c765604609a8d2ef6fc8e5f6ef |
| updated_at | 2017-01-12T07:43:04Z |
+-------------------+--------------------------------------------------+
Create router R2 which will work in RegionTwo.
.. code-block:: console
$ neutron --os-region-name=CentralRegion router-create R2
+-----------------------+--------------------------------------+
| Field | Value |
+-----------------------+--------------------------------------+
| admin_state_up | True |
| created_at | 2017-01-12T07:19:23Z |
| description | |
| external_gateway_info | |
| id | 8a8571db-e3ba-4b78-98ca-13d4dc1a4fb0 |
| name | R2 |
| project_id | 532890c765604609a8d2ef6fc8e5f6ef |
| revision_number | 1 |
| status | ACTIVE |
| tenant_id | 532890c765604609a8d2ef6fc8e5f6ef |
| updated_at | 2017-01-12T07:19:23Z |
+-----------------------+--------------------------------------+
Set the router gateway to ext-net2 for R2.
.. code-block:: console
$ neutron --os-region-name=CentralRegion router-gateway-set R2 ext-net2
Set gateway for router R2
Check router R2.
.. code-block:: console
$ neutron --os-region-name=CentralRegion router-show R2
+-----------------------+------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-----------------------+------------------------------------------------------------------------------------------------------------+
| admin_state_up | True |
| created_at | 2017-01-12T07:19:23Z |
| description | |
| external_gateway_info | {"network_id": "ae806ecb-fa3e-4b3c-a582-caef3d8cd9b4", "external_fixed_ips": [{"subnet_id": |
| | "9fb32423-95a8-4589-b69c-e2955234ae56", "ip_address": "163.3.125.3"}]} |
| id | 8a8571db-e3ba-4b78-98ca-13d4dc1a4fb0 |
| name | R2 |
| project_id | 532890c765604609a8d2ef6fc8e5f6ef |
| revision_number | 7 |
| status | ACTIVE |
| tenant_id | 532890c765604609a8d2ef6fc8e5f6ef |
| updated_at | 2017-01-12T07:44:00Z |
+-----------------------+------------------------------------------------------------------------------------------------------------+
Create net2 in az2.
.. code-block:: console
$ neutron --os-region-name=CentralRegion net-create --availability-zone-hint az2 net2
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| availability_zone_hints | az2 |
| id | 71b06c5d-2eb8-4ef4-a978-c5c98874811b |
| name | net2 |
| project_id | 532890c765604609a8d2ef6fc8e5f6ef |
| provider:network_type | local |
| provider:physical_network | |
| provider:segmentation_id | |
| router:external | False |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | 532890c765604609a8d2ef6fc8e5f6ef |
+---------------------------+--------------------------------------+
Create subnet in net2.
.. code-block:: console
$ neutron --os-region-name=CentralRegion subnet-create net2 10.0.2.0/24
+-------------------+--------------------------------------------+
| Field | Value |
+-------------------+--------------------------------------------+
| allocation_pools | {"start": "10.0.2.2", "end": "10.0.2.254"} |
| cidr | 10.0.2.0/24 |
| created_at | 2017-01-12T07:45:55Z |
| description | |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 10.0.2.1 |
| host_routes | |
| id | 356947cf-88e2-408b-ab49-7c0e79110a25 |
| ip_version | 4 |
| ipv6_address_mode | |
| ipv6_ra_mode | |
| name | |
| network_id | 71b06c5d-2eb8-4ef4-a978-c5c98874811b |
| project_id | 532890c765604609a8d2ef6fc8e5f6ef |
| revision_number | 2 |
| subnetpool_id | |
| tenant_id | 532890c765604609a8d2ef6fc8e5f6ef |
| updated_at | 2017-01-12T07:45:55Z |
+-------------------+--------------------------------------------+
Add router interface for the subnet to R2.
.. code-block:: console
$ neutron --os-region-name=CentralRegion router-interface-add R2 356947cf-88e2-408b-ab49-7c0e79110a25
Added interface 805b16de-fbe9-4b54-b891-b39bc2f73a86 to router R2.
List available images in RegionTwo.
.. code-block:: console
$ glance --os-region-name=RegionTwo image-list
+--------------------------------------+---------------------------------+
| ID | Name |
+--------------------------------------+---------------------------------+
| 6fbad28b-d5f1-4924-a330-f9d5a6cf6c62 | cirros-0.3.4-x86_64-uec |
| cc912d30-5cbe-406d-89f2-8c09a73012c4 | cirros-0.3.4-x86_64-uec-kernel |
| 8660610d-d362-4f20-8f99-4d64c7c21284 | cirros-0.3.4-x86_64-uec-ramdisk |
+--------------------------------------+---------------------------------+
List available flavors in RegionTwo.
.. code-block:: console
$ nova --os-region-name=RegionTwo flavor-list
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| 1 | m1.tiny | 512 | 1 | 0 | | 1 | 1.0 | True |
| 2 | m1.small | 2048 | 20 | 0 | | 1 | 1.0 | True |
| 3 | m1.medium | 4096 | 40 | 0 | | 2 | 1.0 | True |
| 4 | m1.large | 8192 | 80 | 0 | | 4 | 1.0 | True |
| 5 | m1.xlarge | 16384 | 160 | 0 | | 8 | 1.0 | True |
| c1 | cirros256 | 256 | 0 | 0 | | 1 | 1.0 | True |
| d1 | ds512M | 512 | 5 | 0 | | 1 | 1.0 | True |
| d2 | ds1G | 1024 | 10 | 0 | | 1 | 1.0 | True |
| d3 | ds2G | 2048 | 10 | 0 | | 2 | 1.0 | True |
| d4 | ds4G | 4096 | 20 | 0 | | 4 | 1.0 | True |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
Boot instance2, and connect the instance2 to net2 and net3.
.. code-block:: console
$ nova --os-region-name=RegionTwo boot --flavor 1 --image 6fbad28b-d5f1-4924-a330-f9d5a6cf6c62 --nic net-id=68d04c60-469d-495d-bb23-0d36d56235bd --nic net-id=71b06c5d-2eb8-4ef4-a978-c5c98874811b instance2
+--------------------------------------+----------------------------------------------------------------+
| Property | Value |
+--------------------------------------+----------------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | |
| OS-EXT-SRV-ATTR:host | - |
| OS-EXT-SRV-ATTR:hostname | instance2 |
| OS-EXT-SRV-ATTR:hypervisor_hostname | - |
| OS-EXT-SRV-ATTR:instance_name | |
| OS-EXT-SRV-ATTR:kernel_id | cc912d30-5cbe-406d-89f2-8c09a73012c4 |
| OS-EXT-SRV-ATTR:launch_index | 0 |
| OS-EXT-SRV-ATTR:ramdisk_id | 8660610d-d362-4f20-8f99-4d64c7c21284 |
| OS-EXT-SRV-ATTR:reservation_id | r-xylwc16h |
| OS-EXT-SRV-ATTR:root_device_name | - |
| OS-EXT-SRV-ATTR:user_data | - |
| OS-EXT-STS:power_state | 0 |
| OS-EXT-STS:task_state | scheduling |
| OS-EXT-STS:vm_state | building |
| OS-SRV-USG:launched_at | - |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| adminPass | Lmanqrz9GN77 |
| config_drive | |
| created | 2017-01-13T01:41:19Z |
| description | - |
| flavor | m1.tiny (1) |
| hostId | |
| host_status | |
| id | dbcfef20-0794-4b5e-aa3f-d08dc6086eb6 |
| image | cirros-0.3.4-x86_64-uec (6fbad28b-d5f1-4924-a330-f9d5a6cf6c62) |
| key_name | - |
| locked | False |
| metadata | {} |
| name | instance2 |
| os-extended-volumes:volumes_attached | [] |
| progress | 0 |
| security_groups | default |
| status | BUILD |
| tags | [] |
| tenant_id | 532890c765604609a8d2ef6fc8e5f6ef |
| updated | 2017-01-13T01:41:19Z |
| user_id | d2521e53aa8c4916b3a8e444f20cf1da |
+--------------------------------------+----------------------------------------------------------------+
Check to see if instance2 is active.
.. code-block:: console
$ nova --os-region-name=RegionTwo list
+--------------------------------------+-----------+--------+------------+-------------+------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+-----------+--------+------------+-------------+------------------------------+
| dbcfef20-0794-4b5e-aa3f-d08dc6086eb6 | instance2 | ACTIVE | - | Running | net3=10.0.3.4; net2=10.0.2.3 |
+--------------------------------------+-----------+--------+------------+-------------+------------------------------+
Create floating IP for instance2.
.. code-block:: console
$ neutron --os-region-name=CentralRegion floatingip-create ext-net2
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| created_at | 2017-01-13T01:45:10Z |
| description | |
| fixed_ip_address | |
| floating_ip_address | 163.3.125.4 |
| floating_network_id | ae806ecb-fa3e-4b3c-a582-caef3d8cd9b4 |
| id | e0dcbe62-0023-41a8-a099-a4c4b5285e03 |
| port_id | |
| project_id | 532890c765604609a8d2ef6fc8e5f6ef |
| revision_number | 1 |
| router_id | |
| status | DOWN |
| tenant_id | 532890c765604609a8d2ef6fc8e5f6ef |
| updated_at | 2017-01-13T01:45:10Z |
+---------------------+--------------------------------------+
List port of instance2.
.. code-block:: console
$ neutron --os-region-name=CentralRegion port-list
+------------------------------------+------------------------------------+-------------------+--------------------------------------+
| id | name | mac_address | fixed_ips |
+------------------------------------+------------------------------------+-------------------+--------------------------------------+
| 185b5185-0254-486c-9d8b- | | fa:16:3e:da:ae:99 | {"subnet_id": "2c8f446f- |
| 198af4b4d40e | | | ba02-4140-a793-913033aa3580", |
| | | | "ip_address": "10.0.1.13"} |
| 248f9072-76d6-405a- | | fa:16:3e:dc:2f:b3 | {"subnet_id": "5ab92c3c-b799-451c- |
| 8eb5-f0d3475c542d | | | b5d5-b72274fb0fcc", "ip_address": |
| | | | "10.0.3.7"} |
| 6b0fe2e0-a236-40db-bcbf- | | fa:16:3e:73:21:6c | {"subnet_id": "356947cf-88e2-408b- |
| 2f31f7124d83 | | | ab49-7c0e79110a25", "ip_address": |
| | | | "10.0.2.3"} |
| ab6dd6f4-b48a-4a3e- | | fa:16:3e:67:03:73 | {"subnet_id": "5ab92c3c-b799-451c- |
| 9f43-90d0fccc181a | | | b5d5-b72274fb0fcc", "ip_address": |
| | | | "10.0.3.4"} |
| 5c0e0e7a-0faf- | | fa:16:3e:7b:11:c6 | |
| 44c4-a735-c8745faa9920 | | | |
| d48a8e87-61a0-494b- | | fa:16:3e:c6:8e:c5 | {"subnet_id": "2c8f446f- |
| bc06-54f7a008ea78 | | | ba02-4140-a793-913033aa3580", |
| | | | "ip_address": "10.0.1.1"} |
| ce3a1530-20f4-4760-a451-81e5f939aa | dhcp_port_2c8f446f- | fa:16:3e:e6:32:0f | {"subnet_id": "2c8f446f- |
| fc | ba02-4140-a793-913033aa3580 | | ba02-4140-a793-913033aa3580", |
| | | | "ip_address": "10.0.1.2"} |
| 7925a3cc- | interface_RegionOne_2c8f446f- | fa:16:3e:c5:ad:6f | {"subnet_id": "2c8f446f- |
| 6c36-4bc3-a798-a6145fed442a | ba02-4140-a793-913033aa3580 | | ba02-4140-a793-913033aa3580", |
| | | | "ip_address": "10.0.1.3"} |
| 805b16de- | | fa:16:3e:94:cd:82 | {"subnet_id": "356947cf-88e2-408b- |
| fbe9-4b54-b891-b39bc2f73a86 | | | ab49-7c0e79110a25", "ip_address": |
| | | | "10.0.2.1"} |
| 30243711-d113-42b7-b712-81ca0d7454 | dhcp_port_356947cf-88e2-408b- | fa:16:3e:83:3d:c8 | {"subnet_id": "356947cf-88e2-408b- |
| 6d | ab49-7c0e79110a25 | | ab49-7c0e79110a25", "ip_address": |
| | | | "10.0.2.2"} |
| 27fab5a2-0710-4742-a731-331f6c2150 | interface_RegionTwo_356947cf-88e2 | fa:16:3e:39:0a:f5 | {"subnet_id": "356947cf-88e2-408b- |
| fa | -408b-ab49-7c0e79110a25 | | ab49-7c0e79110a25", "ip_address": |
| | | | "10.0.2.6"} |
| a7d0bae1-51de- | interface_RegionTwo_5ab92c3c-b799 | fa:16:3e:d6:3f:ca | {"subnet_id": "5ab92c3c-b799-451c- |
| 4b47-9f81-b012e511e4a7 | -451c-b5d5-b72274fb0fcc | | b5d5-b72274fb0fcc", "ip_address": |
| | | | "10.0.3.11"} |
| 077c63b6-0184-4bf7-b3aa- | dhcp_port_5ab92c3c-b799-451c- | fa:16:3e:d2:a3:53 | {"subnet_id": "5ab92c3c-b799-451c- |
| b071de6f39be | b5d5-b72274fb0fcc | | b5d5-b72274fb0fcc", "ip_address": |
| | | | "10.0.3.2"} |
| c90be7bc- | interface_RegionOne_5ab92c3c-b799 | fa:16:3e:b6:e4:bc | {"subnet_id": "5ab92c3c-b799-451c- |
| 31ea-4015-a432-2bef62e343d1 | -451c-b5d5-b72274fb0fcc | | b5d5-b72274fb0fcc", "ip_address": |
| | | | "10.0.3.9"} |
| 3053fcb9-b6ad-4a9c-b89e- | bridge_port_532890c765604609a8d2ef | fa:16:3e:fc:d0:fc | {"subnet_id": "53def0ac-59ef- |
| ffe6aff6523b | 6fc8e5f6ef_0c4faa42-5230-4adc- | | 4c7b-b694-3375598954da", |
| | bab5-10ee53ebf888 | | "ip_address": "100.0.0.11"} |
| 5a10c53f-1f8f-43c1-a61c- | bridge_port_532890c765604609a8d2ef | fa:16:3e:dc:f7:4a | {"subnet_id": "53def0ac-59ef- |
| 6cdbd052985e | 6fc8e5f6ef_cf71a43d-6df1-491d- | | 4c7b-b694-3375598954da", |
| | 894d-bd2e6620acfc | | "ip_address": "100.0.0.8"} |
| ce787983-a140-4c53-96d2-71f62e1545 | | fa:16:3e:1a:62:7f | {"subnet_id": "a2eecc16-deb8-42a6 |
| 3a | | | -a41b-5058847ed20a", "ip_address": |
| | | | "163.3.124.5"} |
| 2d9fc640-1858-4c7e-b42c- | | fa:16:3e:00:7c:6e | {"subnet_id": "a2eecc16-deb8-42a6 |
| d3ed3f338b8a | | | -a41b-5058847ed20a", "ip_address": |
| | | | "163.3.124.6"} |
| bfd53cea-6135-4515-ae63-f346125335 | | fa:16:3e:ae:81:6f | {"subnet_id": "9fb32423-95a8-4589 |
| 27 | | | -b69c-e2955234ae56", "ip_address": |
| | | | "163.3.125.3"} |
| 12495d5b-5346-48d0-8ed2-daea6ad42a | | fa:16:3e:d4:83:cc | {"subnet_id": "9fb32423-95a8-4589 |
| 3a | | | -b69c-e2955234ae56", "ip_address": |
| | | | "163.3.125.4"} |
+------------------------------------+------------------------------------+-------------------+--------------------------------------+
Associate the floating IP to the instance2's IP address in net2.
.. code-block:: console
$ neutron --os-region-name=CentralRegion floatingip-associate e0dcbe62-0023-41a8-a099-a4c4b5285e03 6b0fe2e0-a236-40db-bcbf-2f31f7124d83
Associated floating IP e0dcbe62-0023-41a8-a099-a4c4b5285e03
Make sure the floating IP association works.
.. code-block:: console
$ neutron --os-region-name=CentralRegion floatingip-list
+--------------------------------------+------------------+---------------------+--------------------------------------+
| id | fixed_ip_address | floating_ip_address | port_id |
+--------------------------------------+------------------+---------------------+--------------------------------------+
| 645f9cd6-d8d4-427a-88fe-770240c96d09 | 10.0.1.13 | 163.3.124.6 | 185b5185-0254-486c-9d8b-198af4b4d40e |
| e0dcbe62-0023-41a8-a099-a4c4b5285e03 | 10.0.2.3 | 163.3.125.4 | 6b0fe2e0-a236-40db-bcbf-2f31f7124d83 |
+--------------------------------------+------------------+---------------------+--------------------------------------+
You can verify that in RegionTwo.
.. code-block:: console
$ neutron --os-region-name=RegionTwo floatingip-list
+--------------------------------------+------------------+---------------------+--------------------------------------+
| id | fixed_ip_address | floating_ip_address | port_id |
+--------------------------------------+------------------+---------------------+--------------------------------------+
| b8a6b83a-cc8f-4335-894c-ef71e7504ee1 | 10.0.2.3 | 163.3.125.4 | 6b0fe2e0-a236-40db-bcbf-2f31f7124d83 |
+--------------------------------------+------------------+---------------------+--------------------------------------+
Instance1 can ping intance2 through the IP address in the net3, and vice versa.
Note: Not all images will bring up the second nic, so you can ssh into
instance1 or instance2, use ifconfig -a to check whether all NICs are created,
and bring up all NICs if necessary.

View File

@ -0,0 +1,597 @@
==================================================
North South Networking via Single External Network
==================================================
The following figure illustrates one typical networking mode, the north
south networking traffic for the tenant will be centralized through
single external network. Only one virtual router is needed even if
the tenant's network are located in multiple OpenStack regions.
.. code-block:: console
+-----------------+ +-----------------+ +-----------------+ +-----------------+
| RegionOne | | RegionTwo | | RegionOne | | RegionTwo |
| | | | | | | |
| | | ext-net1 | | | | ext-net1 |
| | | +-------+---+ | | | | +-------+---+ |
| bridge net | | | bridge net | |
| -+-------+-------+---+-+ | | | -+-------+-------+-+-+-+ | |
| | | | | +--+--+ | | | | | | | +--+--+ |
| +--+--+ | | +----+ R1 | | | +--+--+ | | | +----+ R1 | |
| | R1 | | | +-----+ | ---> | | R1 | | | | +-----+ |
| +--+--+ | | | | +--+--+ | | | |
| | | | | | | | | | +-----+ |
| | | | | | | | | +---+ R1 | |
| | | | | | | | | +--+--+ |
| | | | | | | | | | |
| | net1 | | | | | net1 | | net2 | |
| +---+--+-+ | | | | +---+--+-+ | | +-+--+---+ |
| | | | | | | | | | |
| | | | | | | | | | |
| +---------+-+ | | | | +---------+-+ | | +--+--------+ |
| | Instance1 | | | | | | Instance1 | | | | Instance2 | |
| +-----------+ | | | | +-----------+ | | +-----------+ |
+-----------------+ +-----------------+ +-----------------+ +-----------------+
How to create this network topology
===================================
The first step is to create the left topology, then enhance the topology to
the right one. Different order to create this topology is also possible,
for example, create router and tenant network first, then boot instance,
set the router gateway, and associate floating IP as the last step.
Create external network ext-net1, which will be located in RegionTwo.
.. code-block:: console
$ neutron --os-region-name=CentralRegion net-create --provider:network_type vlan --provider:physical_network extern --router:external --availability-zone-hint RegionTwo ext-net1
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| availability_zone_hints | RegionTwo |
| id | 494a1d2f-9a0f-4d0d-a5e9-f926fce912ac |
| name | ext-net1 |
| project_id | 640e791e767e49939d5c600fdb3f8431 |
| provider:network_type | vlan |
| provider:physical_network | extern |
| provider:segmentation_id | 170 |
| router:external | True |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | 640e791e767e49939d5c600fdb3f8431 |
+---------------------------+--------------------------------------+
Create subnet in ext-net1.
.. code-block:: console
$ neutron --os-region-name=CentralRegion subnet-create --name ext-subnet1 --disable-dhcp ext-net1 163.3.124.0/24
+-------------------+--------------------------------------------------+
| Field | Value |
+-------------------+--------------------------------------------------+
| allocation_pools | {"start": "163.3.124.2", "end": "163.3.124.254"} |
| cidr | 163.3.124.0/24 |
| created_at | 2017-01-14T02:11:48Z |
| description | |
| dns_nameservers | |
| enable_dhcp | False |
| gateway_ip | 163.3.124.1 |
| host_routes | |
| id | 5485feab-f843-4ffe-abd5-6afe5319ad82 |
| ip_version | 4 |
| ipv6_address_mode | |
| ipv6_ra_mode | |
| name | ext-subnet1 |
| network_id | 494a1d2f-9a0f-4d0d-a5e9-f926fce912ac |
| project_id | 640e791e767e49939d5c600fdb3f8431 |
| revision_number | 2 |
| subnetpool_id | |
| tenant_id | 640e791e767e49939d5c600fdb3f8431 |
| updated_at | 2017-01-14T02:11:48Z |
+-------------------+--------------------------------------------------+
Create router R1.
.. code-block:: console
$ neutron --os-region-name=CentralRegion router-create R1
+-----------------------+--------------------------------------+
| Field | Value |
+-----------------------+--------------------------------------+
| admin_state_up | True |
| created_at | 2017-01-14T02:12:15Z |
| description | |
| external_gateway_info | |
| id | 4c4c164d-2cfa-4d2b-ba81-3711f44a6962 |
| name | R1 |
| project_id | 640e791e767e49939d5c600fdb3f8431 |
| revision_number | 1 |
| status | ACTIVE |
| tenant_id | 640e791e767e49939d5c600fdb3f8431 |
| updated_at | 2017-01-14T02:12:15Z |
+-----------------------+--------------------------------------+
Set the router gateway to ext-net1 for R1.
.. code-block:: console
$ neutron --os-region-name=CentralRegion router-gateway-set R1 ext-net1
Set gateway for router R1
Create local network net1 which will reside in RegionOne. You can use az1 or
RegionOne as the value of availability-zone-hint.
.. code-block:: console
$ neutron --os-region-name=CentralRegion net-create --availability-zone-hint RegionOne net1
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| availability_zone_hints | RegionOne |
| id | dde37c9b-7fe6-4ca9-be1a-0abb9ba1eddf |
| name | net1 |
| project_id | 640e791e767e49939d5c600fdb3f8431 |
| provider:network_type | local |
| provider:physical_network | |
| provider:segmentation_id | |
| router:external | False |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | 640e791e767e49939d5c600fdb3f8431 |
+---------------------------+--------------------------------------+
Create subnet in net1.
.. code-block:: console
$ neutron --os-region-name=CentralRegion subnet-create net1 10.0.1.0/24
+-------------------+--------------------------------------------+
| Field | Value |
+-------------------+--------------------------------------------+
| allocation_pools | {"start": "10.0.1.2", "end": "10.0.1.254"} |
| cidr | 10.0.1.0/24 |
| created_at | 2017-01-14T02:14:09Z |
| description | |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 10.0.1.1 |
| host_routes | |
| id | 409f3b9e-3b14-4147-9443-51930eb9a882 |
| ip_version | 4 |
| ipv6_address_mode | |
| ipv6_ra_mode | |
| name | |
| network_id | dde37c9b-7fe6-4ca9-be1a-0abb9ba1eddf |
| project_id | 640e791e767e49939d5c600fdb3f8431 |
| revision_number | 2 |
| subnetpool_id | |
| tenant_id | 640e791e767e49939d5c600fdb3f8431 |
| updated_at | 2017-01-14T02:14:09Z |
+-------------------+--------------------------------------------+
Add this subnet to router R1.
.. code-block:: console
$ neutron --os-region-name=CentralRegion router-interface-add R1 409f3b9e-3b14-4147-9443-51930eb9a882
Added interface 92eaf94d-e345-489a-bc91-3d3645d27f8b to router R1.
List the available images in RegionOne.
.. code-block:: console
$ glance --os-region-name=RegionOne image-list
+--------------------------------------+---------------------------------+
| ID | Name |
+--------------------------------------+---------------------------------+
| 570b5674-4d7d-4c17-9e8a-1caed6194ff1 | cirros-0.3.4-x86_64-uec |
| 548cf82c-4353-407e-9aa2-3feac027c297 | cirros-0.3.4-x86_64-uec-kernel |
| 1d40fb9f-1669-4b4d-82b8-4c3b9cde0c03 | cirros-0.3.4-x86_64-uec-ramdisk |
+--------------------------------------+---------------------------------+
List the available flavors in RegionOne.
.. code-block:: console
$ nova --os-region-name=RegionOne flavor-list
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| 1 | m1.tiny | 512 | 1 | 0 | | 1 | 1.0 | True |
| 2 | m1.small | 2048 | 20 | 0 | | 1 | 1.0 | True |
| 3 | m1.medium | 4096 | 40 | 0 | | 2 | 1.0 | True |
| 4 | m1.large | 8192 | 80 | 0 | | 4 | 1.0 | True |
| 5 | m1.xlarge | 16384 | 160 | 0 | | 8 | 1.0 | True |
| c1 | cirros256 | 256 | 0 | 0 | | 1 | 1.0 | True |
| d1 | ds512M | 512 | 5 | 0 | | 1 | 1.0 | True |
| d2 | ds1G | 1024 | 10 | 0 | | 1 | 1.0 | True |
| d3 | ds2G | 2048 | 10 | 0 | | 2 | 1.0 | True |
| d4 | ds4G | 4096 | 20 | 0 | | 4 | 1.0 | True |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
Boot instance1 in RegionOne, and connect this instance to net1.
.. code-block:: console
$ nova --os-region-name=RegionOne boot --flavor 1 --image 570b5674-4d7d-4c17-9e8a-1caed6194ff1 --nic net-id=dde37c9b-7fe6-4ca9-be1a-0abb9ba1eddf instance1
+--------------------------------------+----------------------------------------------------------------+
| Property | Value |
+--------------------------------------+----------------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | |
| OS-EXT-SRV-ATTR:host | - |
| OS-EXT-SRV-ATTR:hostname | instance1 |
| OS-EXT-SRV-ATTR:hypervisor_hostname | - |
| OS-EXT-SRV-ATTR:instance_name | |
| OS-EXT-SRV-ATTR:kernel_id | 548cf82c-4353-407e-9aa2-3feac027c297 |
| OS-EXT-SRV-ATTR:launch_index | 0 |
| OS-EXT-SRV-ATTR:ramdisk_id | 1d40fb9f-1669-4b4d-82b8-4c3b9cde0c03 |
| OS-EXT-SRV-ATTR:reservation_id | r-n0k0u15s |
| OS-EXT-SRV-ATTR:root_device_name | - |
| OS-EXT-SRV-ATTR:user_data | - |
| OS-EXT-STS:power_state | 0 |
| OS-EXT-STS:task_state | scheduling |
| OS-EXT-STS:vm_state | building |
| OS-SRV-USG:launched_at | - |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| adminPass | N9A9iArByrdt |
| config_drive | |
| created | 2017-01-14T02:17:05Z |
| description | - |
| flavor | m1.tiny (1) |
| hostId | |
| host_status | |
| id | e7206415-e497-4110-b644-a64272625cef |
| image | cirros-0.3.4-x86_64-uec (570b5674-4d7d-4c17-9e8a-1caed6194ff1) |
| key_name | - |
| locked | False |
| metadata | {} |
| name | instance1 |
| os-extended-volumes:volumes_attached | [] |
| progress | 0 |
| security_groups | default |
| status | BUILD |
| tags | [] |
| tenant_id | 640e791e767e49939d5c600fdb3f8431 |
| updated | 2017-01-14T02:17:05Z |
| user_id | 8e84fae0a5b74464b3300a4576d090a4 |
+--------------------------------------+----------------------------------------------------------------+
Make sure the instance1 is active in RegionOne.
.. code-block:: console
$ nova --os-region-name=RegionOne list
+--------------------------------------+-----------+--------+------------+-------------+---------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+-----------+--------+------------+-------------+---------------+
| e7206415-e497-4110-b644-a64272625cef | instance1 | ACTIVE | - | Running | net1=10.0.1.5 |
+--------------------------------------+-----------+--------+------------+-------------+---------------+
Create a floating IP for instance1.
.. code-block:: console
$ neutron --os-region-name=CentralRegion floatingip-create ext-net1
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| created_at | 2017-01-14T02:19:24Z |
| description | |
| fixed_ip_address | |
| floating_ip_address | 163.3.124.7 |
| floating_network_id | 494a1d2f-9a0f-4d0d-a5e9-f926fce912ac |
| id | 04c18e73-675b-4273-a73a-afaf1e4f9811 |
| port_id | |
| project_id | 640e791e767e49939d5c600fdb3f8431 |
| revision_number | 1 |
| router_id | |
| status | DOWN |
| tenant_id | 640e791e767e49939d5c600fdb3f8431 |
| updated_at | 2017-01-14T02:19:24Z |
+---------------------+--------------------------------------+
List the port in net1 for instance1.
.. code-block:: console
$ neutron --os-region-name=CentralRegion port-list
+------------------------------------+------------------------------------+-------------------+--------------------------------------+
| id | name | mac_address | fixed_ips |
+------------------------------------+------------------------------------+-------------------+--------------------------------------+
| 37e9cfe5-d410-4625-963d- | | fa:16:3e:14:47:a8 | {"subnet_id": "409f3b9e- |
| b7ea4347d72e | | | 3b14-4147-9443-51930eb9a882", |
| | | | "ip_address": "10.0.1.5"} |
| 92eaf94d-e345-489a- | | fa:16:3e:63:a9:08 | {"subnet_id": "409f3b9e- |
| bc91-3d3645d27f8b | | | 3b14-4147-9443-51930eb9a882", |
| | | | "ip_address": "10.0.1.1"} |
| d3ca5e74-470e-4953-a280-309b5e8e11 | dhcp_port_409f3b9e- | fa:16:3e:7e:72:98 | {"subnet_id": "409f3b9e- |
| 46 | 3b14-4147-9443-51930eb9a882 | | 3b14-4147-9443-51930eb9a882", |
| | | | "ip_address": "10.0.1.2"} |
| b4eef6a0-70e6-4a42-b0c5-f8f49cee25 | interface_RegionOne_409f3b9e- | fa:16:3e:00:e1:5b | {"subnet_id": "409f3b9e- |
| c0 | 3b14-4147-9443-51930eb9a882 | | 3b14-4147-9443-51930eb9a882", |
| | | | "ip_address": "10.0.1.7"} |
| 65b52fe3-f765-4124-a97f- | bridge_port_640e791e767e49939d5c60 | fa:16:3e:df:7b:97 | {"subnet_id": "d637f4e5-4b9a-4237 |
| f73a76e820e6 | 0fdb3f8431_daa08da0-c60e- | | -b3bc-ccfba45a5c37", "ip_address": |
| | 42c8-bc30-1ed887111ecb | | "100.0.0.7"} |
| e0755307-a498-473e- | | fa:16:3e:1c:70:b9 | {"subnet_id": "5485feab-f843-4ffe- |
| 99e5-30cbede36b8e | | | abd5-6afe5319ad82", "ip_address": |
| | | | "163.3.124.7"} |
| 2404eb83-f2f4-4a36-b377-dbc8befee1 | | fa:16:3e:25:80:e6 | {"subnet_id": "5485feab-f843-4ffe- |
| 93 | | | abd5-6afe5319ad82", "ip_address": |
| | | | "163.3.124.9"} |
+------------------------------------+------------------------------------+-------------------+--------------------------------------+
Associate the floating IP to instance1's IP in net1.
.. code-block:: console
$ neutron --os-region-name=CentralRegion floatingip-associate 04c18e73-675b-4273-a73a-afaf1e4f9811 37e9cfe5-d410-4625-963d-b7ea4347d72e
Associated floating IP 04c18e73-675b-4273-a73a-afaf1e4f9811
Create network topology in RegionTwo.
Create net2 in RegionTwo.
.. code-block:: console
$ neutron --os-region-name=CentralRegion net-create --availability-zone-hint RegionTwo net2
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| availability_zone_hints | RegionTwo |
| id | cfe622f9-1851-4033-a4ba-6718659a147c |
| name | net2 |
| project_id | 640e791e767e49939d5c600fdb3f8431 |
| provider:network_type | local |
| provider:physical_network | |
| provider:segmentation_id | |
| router:external | False |
| shared | False |
| status | ACTIVE |
| subnets | |
| tenant_id | 640e791e767e49939d5c600fdb3f8431 |
+---------------------------+--------------------------------------+
Create subnet in net2.
.. code-block:: console
$ neutron --os-region-name=CentralRegion subnet-create net2 10.0.2.0/24
+-------------------+--------------------------------------------+
| Field | Value |
+-------------------+--------------------------------------------+
| allocation_pools | {"start": "10.0.2.2", "end": "10.0.2.254"} |
| cidr | 10.0.2.0/24 |
| created_at | 2017-01-14T02:36:03Z |
| description | |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 10.0.2.1 |
| host_routes | |
| id | 4e3376f8-0bda-450d-b4fb-9eb77c4ef919 |
| ip_version | 4 |
| ipv6_address_mode | |
| ipv6_ra_mode | |
| name | |
| network_id | cfe622f9-1851-4033-a4ba-6718659a147c |
| project_id | 640e791e767e49939d5c600fdb3f8431 |
| revision_number | 2 |
| subnetpool_id | |
| tenant_id | 640e791e767e49939d5c600fdb3f8431 |
| updated_at | 2017-01-14T02:36:03Z |
+-------------------+--------------------------------------------+
Add router interface for the subnet to R2.
.. code-block:: console
$ neutron --os-region-name=CentralRegion router-interface-add R1 4e3376f8-0bda-450d-b4fb-9eb77c4ef919
Added interface d4b0e6d9-8bfb-4cd6-8824-92731c0226da to router R1.
List available images in RegionTwo.
.. code-block:: console
$ glance --os-region-name=RegionTwo image-list
+--------------------------------------+---------------------------------+
| ID | Name |
+--------------------------------------+---------------------------------+
| 392aa24f-a1a8-4897-bced-70301e1c7e3b | cirros-0.3.4-x86_64-uec |
| 41ac5372-764a-4e31-8c3a-66cdc5a6529e | cirros-0.3.4-x86_64-uec-kernel |
| 55523513-719d-4949-b697-db98ab3e938e | cirros-0.3.4-x86_64-uec-ramdisk |
+--------------------------------------+---------------------------------+
List available flavors in RegionTwo.
.. code-block:: console
$ nova --os-region-name=RegionTwo flavor-list
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| 1 | m1.tiny | 512 | 1 | 0 | | 1 | 1.0 | True |
| 2 | m1.small | 2048 | 20 | 0 | | 1 | 1.0 | True |
| 3 | m1.medium | 4096 | 40 | 0 | | 2 | 1.0 | True |
| 4 | m1.large | 8192 | 80 | 0 | | 4 | 1.0 | True |
| 5 | m1.xlarge | 16384 | 160 | 0 | | 8 | 1.0 | True |
| c1 | cirros256 | 256 | 0 | 0 | | 1 | 1.0 | True |
| d1 | ds512M | 512 | 5 | 0 | | 1 | 1.0 | True |
| d2 | ds1G | 1024 | 10 | 0 | | 1 | 1.0 | True |
| d3 | ds2G | 2048 | 10 | 0 | | 2 | 1.0 | True |
| d4 | ds4G | 4096 | 20 | 0 | | 4 | 1.0 | True |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
Boot instance2, and connect the instance2 to net2.
.. code-block:: console
$ nova --os-region-name=RegionTwo boot --flavor 1 --image 392aa24f-a1a8-4897-bced-70301e1c7e3b --nic net-id=cfe622f9-1851-4033-a4ba-6718659a147c instance2
+--------------------------------------+----------------------------------------------------------------+
| Property | Value |
+--------------------------------------+----------------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | |
| OS-EXT-SRV-ATTR:host | - |
| OS-EXT-SRV-ATTR:hostname | instance2 |
| OS-EXT-SRV-ATTR:hypervisor_hostname | - |
| OS-EXT-SRV-ATTR:instance_name | |
| OS-EXT-SRV-ATTR:kernel_id | 41ac5372-764a-4e31-8c3a-66cdc5a6529e |
| OS-EXT-SRV-ATTR:launch_index | 0 |
| OS-EXT-SRV-ATTR:ramdisk_id | 55523513-719d-4949-b697-db98ab3e938e |
| OS-EXT-SRV-ATTR:reservation_id | r-3v42ltzp |
| OS-EXT-SRV-ATTR:root_device_name | - |
| OS-EXT-SRV-ATTR:user_data | - |
| OS-EXT-STS:power_state | 0 |
| OS-EXT-STS:task_state | scheduling |
| OS-EXT-STS:vm_state | building |
| OS-SRV-USG:launched_at | - |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| adminPass | o62QufgY2JAF |
| config_drive | |
| created | 2017-01-14T02:39:42Z |
| description | - |
| flavor | m1.tiny (1) |
| hostId | |
| host_status | |
| id | e489ab4e-957d-4537-9870-fff87406aac5 |
| image | cirros-0.3.4-x86_64-uec (392aa24f-a1a8-4897-bced-70301e1c7e3b) |
| key_name | - |
| locked | False |
| metadata | {} |
| name | instance2 |
| os-extended-volumes:volumes_attached | [] |
| progress | 0 |
| security_groups | default |
| status | BUILD |
| tags | [] |
| tenant_id | 640e791e767e49939d5c600fdb3f8431 |
| updated | 2017-01-14T02:39:42Z |
| user_id | 8e84fae0a5b74464b3300a4576d090a4 |
+--------------------------------------+----------------------------------------------------------------+
Check to see if instance2 is active.
.. code-block:: console
$ nova --os-region-name=RegionTwo list
+--------------------------------------+-----------+--------+------------+-------------+----------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+-----------+--------+------------+-------------+----------------+
| e489ab4e-957d-4537-9870-fff87406aac5 | instance2 | ACTIVE | - | Running | net2=10.0.2.10 |
+--------------------------------------+-----------+--------+------------+-------------+----------------+
You can ping instance2 from instance1, or vice versa now.
Create floating IP for instance2.
.. code-block:: console
$ neutron --os-region-name=CentralRegion floatingip-create ext-net1
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| created_at | 2017-01-14T02:40:55Z |
| description | |
| fixed_ip_address | |
| floating_ip_address | 163.3.124.13 |
| floating_network_id | 494a1d2f-9a0f-4d0d-a5e9-f926fce912ac |
| id | f917dede-6e0d-4c5a-8d02-7d5774d094ba |
| port_id | |
| project_id | 640e791e767e49939d5c600fdb3f8431 |
| revision_number | 1 |
| router_id | |
| status | DOWN |
| tenant_id | 640e791e767e49939d5c600fdb3f8431 |
| updated_at | 2017-01-14T02:40:55Z |
+---------------------+--------------------------------------+
List port of instance2.
.. code-block:: console
$ neutron --os-region-name=CentralRegion port-list
+------------------------------------+------------------------------------+-------------------+--------------------------------------+
| id | name | mac_address | fixed_ips |
+------------------------------------+------------------------------------+-------------------+--------------------------------------+
| 37e9cfe5-d410-4625-963d- | | fa:16:3e:14:47:a8 | {"subnet_id": "409f3b9e- |
| b7ea4347d72e | | | 3b14-4147-9443-51930eb9a882", |
| | | | "ip_address": "10.0.1.5"} |
| ed9bdc02-0f0d-4763-a993-e0972c6563 | | fa:16:3e:c1:10:a3 | {"subnet_id": "4e3376f8-0bda-450d- |
| fa | | | b4fb-9eb77c4ef919", "ip_address": |
| | | | "10.0.2.10"} |
| 92eaf94d-e345-489a- | | fa:16:3e:63:a9:08 | {"subnet_id": "409f3b9e- |
| bc91-3d3645d27f8b | | | 3b14-4147-9443-51930eb9a882", |
| | | | "ip_address": "10.0.1.1"} |
| f98ceee7-777b-4cff- | interface_RegionTwo_409f3b9e- | fa:16:3e:aa:cf:e2 | {"subnet_id": "409f3b9e- |
| b5b9-c27b4277bb7f | 3b14-4147-9443-51930eb9a882 | | 3b14-4147-9443-51930eb9a882", |
| | | | "ip_address": "10.0.1.12"} |
| d3ca5e74-470e-4953-a280-309b5e8e11 | dhcp_port_409f3b9e- | fa:16:3e:7e:72:98 | {"subnet_id": "409f3b9e- |
| 46 | 3b14-4147-9443-51930eb9a882 | | 3b14-4147-9443-51930eb9a882", |
| | | | "ip_address": "10.0.1.2"} |
| b4eef6a0-70e6-4a42-b0c5-f8f49cee25 | interface_RegionOne_409f3b9e- | fa:16:3e:00:e1:5b | {"subnet_id": "409f3b9e- |
| c0 | 3b14-4147-9443-51930eb9a882 | | 3b14-4147-9443-51930eb9a882", |
| | | | "ip_address": "10.0.1.7"} |
| d4b0e6d9-8bfb- | | fa:16:3e:f9:5f:4e | {"subnet_id": "4e3376f8-0bda-450d- |
| 4cd6-8824-92731c0226da | | | b4fb-9eb77c4ef919", "ip_address": |
| | | | "10.0.2.1"} |
| e54f0a40-837f- | interface_RegionTwo_4e3376f8-0bda- | fa:16:3e:fa:84:da | {"subnet_id": "4e3376f8-0bda-450d- |
| 48e7-9397-55170300d06e | 450d-b4fb-9eb77c4ef919 | | b4fb-9eb77c4ef919", "ip_address": |
| | | | "10.0.2.11"} |
| d458644d-a401-4d98-bec3-9468fdd56d | dhcp_port_4e3376f8-0bda-450d-b4fb- | fa:16:3e:b2:a6:03 | {"subnet_id": "4e3376f8-0bda-450d- |
| 1c | 9eb77c4ef919 | | b4fb-9eb77c4ef919", "ip_address": |
| | | | "10.0.2.2"} |
| 65b52fe3-f765-4124-a97f- | bridge_port_640e791e767e49939d5c60 | fa:16:3e:df:7b:97 | {"subnet_id": "d637f4e5-4b9a-4237 |
| f73a76e820e6 | 0fdb3f8431_daa08da0-c60e- | | -b3bc-ccfba45a5c37", "ip_address": |
| | 42c8-bc30-1ed887111ecb | | "100.0.0.7"} |
| cee45aac- | bridge_port_640e791e767e49939d5c60 | fa:16:3e:d0:50:0d | {"subnet_id": "d637f4e5-4b9a-4237 |
| fd07-4a2f-8008-02757875d1fe | 0fdb3f8431_b072000e-3cd1-4a1a- | | -b3bc-ccfba45a5c37", "ip_address": |
| | aa60-9ffbca119b1a | | "100.0.0.8"} |
| dd4707cc-fe2d-429c-8c2f- | | fa:16:3e:9e:85:62 | {"subnet_id": "5485feab-f843-4ffe- |
| 084b525e1789 | | | abd5-6afe5319ad82", "ip_address": |
| | | | "163.3.124.13"} |
| e0755307-a498-473e- | | fa:16:3e:1c:70:b9 | {"subnet_id": "5485feab-f843-4ffe- |
| 99e5-30cbede36b8e | | | abd5-6afe5319ad82", "ip_address": |
| | | | "163.3.124.7"} |
| 2404eb83-f2f4-4a36-b377-dbc8befee1 | | fa:16:3e:25:80:e6 | {"subnet_id": "5485feab-f843-4ffe- |
| 93 | | | abd5-6afe5319ad82", "ip_address": |
| | | | "163.3.124.9"} |
+------------------------------------+------------------------------------+-------------------+--------------------------------------+
Associate the floating IP to the instance2's IP address in net2.
.. code-block:: console
$ neutron --os-region-name=CentralRegion floatingip-associate f917dede-6e0d-4c5a-8d02-7d5774d094ba ed9bdc02-0f0d-4763-a993-e0972c6563fa
Associated floating IP f917dede-6e0d-4c5a-8d02-7d5774d094ba
Make sure the floating IP association works.
.. code-block:: console
$ neutron --os-region-name=CentralRegion floatingip-list
+--------------------------------------+------------------+---------------------+--------------------------------------+
| id | fixed_ip_address | floating_ip_address | port_id |
+--------------------------------------+------------------+---------------------+--------------------------------------+
| 04c18e73-675b-4273-a73a-afaf1e4f9811 | 10.0.1.5 | 163.3.124.7 | 37e9cfe5-d410-4625-963d-b7ea4347d72e |
| f917dede-6e0d-4c5a-8d02-7d5774d094ba | 10.0.2.10 | 163.3.124.13 | ed9bdc02-0f0d-4763-a993-e0972c6563fa |
+--------------------------------------+------------------+---------------------+--------------------------------------+
$ neutron --os-region-name=RegionTwo floatingip-list
+--------------------------------------+------------------+---------------------+--------------------------------------+
| id | fixed_ip_address | floating_ip_address | port_id |
+--------------------------------------+------------------+---------------------+--------------------------------------+
| 3a220f53-fdfe-44e3-847a-b00464135416 | 10.0.1.5 | 163.3.124.7 | 37e9cfe5-d410-4625-963d-b7ea4347d72e |
| fe15192f-04cb-48c8-8a90-7a7c016f40ae | 10.0.2.10 | 163.3.124.13 | ed9bdc02-0f0d-4763-a993-e0972c6563fa |
+--------------------------------------+------------------+---------------------+--------------------------------------+

View File

@ -0,0 +1,12 @@
Networking Guide
----------------
The Tricircle is to provide networking automation across Neutron
servers in multi-region OpenStack clouds deployment, many cross Neutron
networking mode are supported. In this guide, how to use CLI to setup
typical networking mode will be described.
.. include:: ./networking-prerequisites.rst
.. include:: ./networking-guide-direct-provider-networks.rst
.. include:: ./networking-guide-multiple-external-networks.rst
.. include:: ./networking-guide-single-external-network.rst
.. include:: ./networking-guide-local-networking.rst

View File

@ -0,0 +1,92 @@
=============
Prerequisites
=============
One CentralRegion in which central Neutron and Tricircle services
are started, and central Neutron is configured with Tricircle Central Neutron
plugin properly. And at least two regions(RegionOne, RegionTwo) in which
Tricircle Local Neutron plugin is configured properly in local Neutron.
RegionOne is mapped to az1, and RegionTwo is mapped to az2 by pod management
through Tricircle Admin API.
You can use az1 or RegionOne as the value of availability-zone-hint when
creating a network. Although in this document only one region in one
availability zone, one availability zone can include more than one region in
Tricircle pod management, so if you specify az1 as the value, then it means
the network will reside in az1, and az1 is mapped to RegionOne, if you add
more regions into az1, then the network can spread into these regions too.
Please refer to the installation guide and configuration guide how to setup
multi-region environment with Tricircle service enabled.
If you setup the environment through devstack, you can get these settings
which are used in this document as follows:
Suppose that each node has 3 interfaces, and eth1 for tenant vlan network,
eth2 for external vlan network. If you want to verify the data plane
connectivity, please make sure the bridges "br-vlan" and "br-ext" are
connected to regarding interface. Using following command to connect
the bridge to physical ethernet interface, as shown below, "br-vlan" is
wired to eth1, and "br-etx" to eth2::
sudo ovs-vsctl add-br br-vlan
sudo ovs-vsctl add-port br-vlan eth1
sudo ovs-vsctl add-br br-ext
sudo ovs-vsctl add-port br-ext eth2
Suppose the vlan range for tenant network is 101~150, external network is
151~200, in the node which will run central Neutron and Tricircle services,
configure the local.conf like this::
Q_ML2_PLUGIN_VLAN_TYPE_OPTIONS=(network_vlan_ranges=bridge:101:150,extern:151:200)
OVS_BRIDGE_MAPPINGS=bridge:br-vlan,extern:br-ext
TRICIRCLE_START_SERVICES=True
enable_plugin tricircle https://github.com/openstack/tricircle/
In the node which will run local Neutron without Tricircle services, configure
the local.conf like this::
Q_ML2_PLUGIN_VLAN_TYPE_OPTIONS=(network_vlan_ranges=bridge:101:150,extern:151:200)
OVS_BRIDGE_MAPPINGS=bridge:br-vlan,extern:br-ext
TRICIRCLE_START_SERVICES=False
enable_plugin tricircle https://github.com/openstack/tricircle/
You may have noticed that the only difference is TRICIRCLE_START_SERVICES
is True or False. All examples given in this document will be based on these
settings.
In both RegionOne and RegionTwo, external network is able to be provisioned,
the settings will look like this in /etc/neutron/plugins/ml2/ml2_conf.ini::
network_vlan_ranges = bridge:101:150,extern:151:200
vni_ranges = 1:1000
bridge_mappings = bridge:br-vlan,extern:br-ext
Please be aware that the physical network name for tenant VLAN network is
"bridge", and the external network physical network name is "extern".
In central Neutron's configuration file, the default settings look like as
follows::
bridge_network_type = vlan
network_vlan_ranges = bridge:101:150
tenant_network_types = local,vlan
type_drivers = local,vlan
The default network type in central Neutron is local network, i.e, one
network can only be presented in one local Neutron. In which region the
local network will be located, it's up to in which region the first instance
will be booted in this network. After that, it'll fail if you want to boot
instance in another region to this network. The local network could be VLAN
or VxLAN or GRE network by default, it's up to your local Neutron's
configuration.
If you want to create a L2 network across multiple Neutron, then you
have to speficy --provider-network-type vlan in network creation
command for vlan network type. Currently only vlan network
type could work as the bridge network. VxLAN network to support L2 networking
across Neutron will be introduced later.