CentOS 6
Sponsored Link

OpenStack Grizzly - Use Quantum2013/09/12

 
Create a network to use OpenStack Network Service (Quantum).
This example shows to configure Quantum on the environment below.
                                |
+------------------+            |            +------------------------+
| [ Control Node ] |10.0.0.30   |   10.0.0.31|    [ Network Node ]    |
|     Keystone     |------------+------------|        DHCP Agent      |
|  Quantum Server  |            |            |        L3 Agent        |
+------------------+            |            |        L2 Agent        |
                                |            +------------------------+
                                |
                                |10.0.0.51
                      +--------------------+
                      |  [ Compute Node ]  |
                      |       L2 Agent     |
                      +--------------------+
[1] For example, Configure flat network settings.
It's OK to work on any Node if it's installed quantumclient and novaclient. (This example shows to work on ControleNode)
# confirm tenant ID

[root@dlp ~(keystone)]#
keystone tenant-list

+----------------------------------+---------+---------+
|                id                |   name  | enabled |
+----------------------------------+---------+---------+
| 4fc0e91962e24923bfe50db73d6930ef |  admin  |   True  |
| a8940116012e4a76af6ead65c7782917 | service |   True  |
+----------------------------------+---------+---------+

# create a network named "sharednet0"

[root@dlp ~(keystone)]#
quantum net-create --tenant-id a8940116012e4a76af6ead65c7782917 sharednet0 --shared --provider:network_type flat --provider:physical_network physnet0

Created a new network:
+---------------------------+--------------------------------------+
| Field                     | Value                                |
+---------------------------+--------------------------------------+
| admin_state_up            | True                                 |
| id                        | 3664aaca-e066-418a-b70c-160310424a17 |
| name                      | sharednet0                           |
| provider:network_type     | flat                                 |
| provider:physical_network | physnet0                             |
| provider:segmentation_id  |                                      |
| router:external           | False                                |
| shared                    | True                                 |
| status                    | ACTIVE                               |
| subnets                   |                                      |
| tenant_id                 | a8940116012e4a76af6ead65c7782917     |
+---------------------------+--------------------------------------+

# create a subnet in "sharednet0" ( use the range 10.0.0.100-10.0.0.199 )

[root@dlp ~(keystone)]#
quantum subnet-create --tenant-id a8940116012e4a76af6ead65c7782917 --allocation-pool start=10.0.0.100,end=10.0.0.199 sharednet0 10.0.0.0/24

Created a new subnet:
+------------------+----------------------------------------------+
| Field            | Value                                        |
+------------------+----------------------------------------------+
| allocation_pools | {"start": "10.0.0.100", "end": "10.0.0.199"} |
| cidr             | 10.0.0.0/24                                  |
| dns_nameservers  |                                              |
| enable_dhcp      | True                                         |
| gateway_ip       | 10.0.0.1                                     |
| host_routes      |                                              |
| id               | a6bca676-4a40-41a0-886d-49cba86d510e         |
| ip_version       | 4                                            |
| name             |                                              |
| network_id       | 3664aaca-e066-418a-b70c-160310424a17         |
| tenant_id        | a8940116012e4a76af6ead65c7782917             |
+------------------+----------------------------------------------+

# confirm settings

[root@dlp ~(keystone)]#
quantum net-list

+--------------------------------------+------------+--------------------------------------------------+
| id                                   | name       | subnets                                          |
+--------------------------------------+------------+--------------------------------------------------+
| 3664aaca-e066-418a-b70c-160310424a17 | sharednet0 | a6bca676-4a40-41a0-886d-49cba86d510e 10.0.0.0/24 |
+--------------------------------------+------------+--------------------------------------------------+

# create and boot a Instance with "sharednet0"

[root@dlp ~(keystone)]#
nova boot --flavor 2 --image d41846d5-c67c-49f2-a616-6c9a136bed3a --security_group default --nic net-id=3664aaca-e066-418a-b70c-160310424a17 CetnOS64
[root@dlp ~(keystone)]#
nova list

+--------------------------------------+----------+---------+-----------------------+
| ID                                   | Name     | Status  | Networks              |
+--------------------------------------+----------+---------+-----------------------+
| 7e4dc8e8-e320-4938-96ba-7d50530b1d3b | CetnOS64 | ACTIVE  | sharednet0=10.0.0.100 |
+--------------------------------------+----------+---------+-----------------------+

[root@dlp ~(keystone)]#
ssh 10.0.0.100

root@10.0.0.100's password:
Last login: Tue Aug 13 04:30:37 2013
[root@centos6 ~]#
# just logined on Instance
Matched Content