*Openstack(miake)内ネットワーク作成 [#ad802b39]

RIGHT:更新日 &lastmod();

**構成 [#pcb8556c]


    ------------------------
    |                      |                       Opensatck-Router
    | 自宅Net           --------------------     ------------------
    | (192.168.10.0/24) |Openstack         |     |192.168.10.110  |
    |                   | public           |-----|                |
    |                   | 192.168.10.110   |     |                |
    |                   |            --117 |     ------------------
    |                   --------------------              |192.168.110.1
    |                      |                              |
    |                      |                              |
    ------------------------                      ---------------------
                                                  | Private (Network) |
                                                  |  192.168.110.0/24 |
                                                  |                   |
                                                  ---------------------




***Openstack ルーター、ネットワークの作成 [#k0ff423f]

 # source keystonerc_admin
 [root@openstack-kilo ~(keystone_admin)]#
 
-Ruter1のtenant_id の作成

 [root@openstack-kilo ~(keystone_admin)]# neutron router-create Router1
 Created a new router:
 

-Ruter1のtenant_id の確認
 
 [root@openstack-mitaka ~(keystone_admin)]# neutron router-show Router1
 +-------------------------+--------------------------------------+
 | Field                   | Value                                |
 +-------------------------+--------------------------------------+
 | admin_state_up          | True                                 |
 | availability_zone_hints |                                      |
 | availability_zones      | nova                                 |
 | description             |                                      |
 | distributed             | False                                |
 | external_gateway_info   |                                      |
 | ha                      | False                                |
 | id                      | da592fa9-7af3-437c-b4bc-4192af072253 |
 | name                    | Router1                              |
 | routes                  |                                      |
 | status                  | ACTIVE                               |
 | tenant_id               | e3ca6100bb5a4172bf51f809595d879c     |
 +-------------------------+--------------------------------------+

-ネットワーク「Private」の作成
--Dashboradから作成

&ref("./mknetwork1.png");

-ネットワーク「Private」の情報表示

 [root@openstack-mitaka ~(keystone_admin)]#  neutron net-show Private
 +---------------------------+--------------------------------------+
 | Field                     | Value                                |
 +---------------------------+--------------------------------------+
 | admin_state_up            | True                                 |
 | availability_zone_hints   |                                      |
 | availability_zones        | nova                                 |
 | created_at                | 2016-07-29T23:28:35                  |
 | description               |                                      |
 | id                        | b7025c4a-0fe1-49a0-9338-d19df4f22e8a |
 | ipv4_address_scope        |                                      |
 | ipv6_address_scope        |                                      |
 | mtu                       | 1450                                 |
 | name                      | Private                              |
 | provider:network_type     | vxlan                                |
 | provider:physical_network |                                      |
 | provider:segmentation_id  | 14                                   |
 | router:external           | False                                |
 | shared                    | False                                |
 | status                    | ACTIVE                               |
 | subnets                   | 0ade5036-a55f-4588-9778-50c059a528a6 |
 | tags                      |                                      |
 | tenant_id                 | e3ca6100bb5a4172bf51f809595d879c     |
 | updated_at                | 2016-07-29T23:28:35                  |
 +---------------------------+--------------------------------------+

-ネットワーク 「public」を外部に接続で作成

 [root@openstack-mitaka ~(keystone_admin)]# neutron net-create public --tenant-id e3ca6100bb5a4172bf51f809595d879c --router:external
 Created a new network:
 +---------------------------+--------------------------------------+
 | Field                     | Value                                |
 +---------------------------+--------------------------------------+
 | admin_state_up            | True                                 |
 | availability_zone_hints   |                                      |
 | availability_zones        |                                      |
 | created_at                | 2016-07-30T07:27:37                  |
 | description               |                                      |
 | id                        | cab789fb-0a38-476b-98eb-028dc0f8dc10 |
 | ipv4_address_scope        |                                      |
 | ipv6_address_scope        |                                      |
 | is_default                | False                                |
 | mtu                       | 1450                                 |
 | name                      | public                               |
 | provider:network_type     | vxlan                                |
 | provider:physical_network |                                      |
 | provider:segmentation_id  | 100                                  |
 | router:external           | True                                 |
 | shared                    | False                                |
 | status                    | ACTIVE                               |
 | subnets                   |                                      |
 | tags                      |                                      |
 | tenant_id                 | e3ca6100bb5a4172bf51f809595d879c     |
 | updated_at                | 2016-07-30T07:27:37                  |
 +---------------------------+--------------------------------------+


-ネットワーク名「public」にサブネット名public_subnet(配布アドレス192.168.10.110-192.168.10.117)を割り当てる
&color(red){(この範囲がなぜネットワーク名「public」になるか不明?)};

 [root@openstack-mitaka ~(keystone_admin)]#  neutron subnet-create --name public_subnet --enable_dhcp=False \
 --allocation-pool=start=192.168.10.111,end=192.168.10.117  --gateway=192.168.10.245 public 192.168.10.0/24
 Created a new subnet:
 +-------------------+------------------------------------------------------+
 | Field             | Value                                                |
 +-------------------+------------------------------------------------------+
 | allocation_pools  | {"start": "192.168.10.111", "end": "192.168.10.117"} |
 | cidr              | 192.168.10.0/24                                      |
 | created_at        | 2016-07-30T07:29:56                                  |
 | description       |                                                      |
 | dns_nameservers   |                                                      |
 | enable_dhcp       | False                                                |
 | gateway_ip        | 192.168.10.245                                       |
 | host_routes       |                                                      |
 | id                | 041593a1-1a11-4aff-b872-24e3c2fd1831                 |
 | ip_version        | 4                                                    |
 | ipv6_address_mode |                                                      |
 | ipv6_ra_mode      |                                                      |
 | name              | public_subnet                                        |
 | network_id        | cab789fb-0a38-476b-98eb-028dc0f8dc10                 |
 | subnetpool_id     |                                                      |
 | tenant_id         | e3ca6100bb5a4172bf51f809595d879c                     |
 | updated_at        | 2016-07-30T07:29:56                                  |
 +-------------------+------------------------------------------------------+

-Router1のGWをネットワークpublicにセット

IPが192.168.10.110でルータにインターフェイスをpublic側に作成
IPが192.168.10.110でルータにインターフェイスをネットワークpublic側に作成

 [root@openstack-mitaka ~(keystone_admin)]# neutron router-gateway-set --fixed-ip ip_address=192.168.10.110 Router1 public
 Set gateway for router Router1

&ref("./GW.png");


-ネットワークpublicの確認

 [root@openstack-mitaka ~(keystone_admin)]#  neutron net-show public
 +---------------------------+--------------------------------------+
 | Field                     | Value                                |
 +---------------------------+--------------------------------------+
 | admin_state_up            | True                                 |
 | availability_zone_hints   |                                      |
 | availability_zones        | nova                                 |
 | created_at                | 2016-07-30T07:27:37                  |
 | description               |                                      |
 | id                        | cab789fb-0a38-476b-98eb-028dc0f8dc10 |
 | ipv4_address_scope        |                                      |
 | ipv6_address_scope        |                                      |
 | is_default                | False                                |
 | mtu                       | 1450                                 |
 | name                      | public                               |
 | provider:network_type     | vxlan                                |
 | provider:physical_network |                                      |
 | provider:segmentation_id  | 100                                  |
 | router:external           | True                                 |
 | shared                    | False                                |
 | status                    | ACTIVE                               |
 | subnets                   | 041593a1-1a11-4aff-b872-24e3c2fd1831 |
 | tags                      |                                      |
 | tenant_id                 | e3ca6100bb5a4172bf51f809595d879c     |
 | updated_at                | 2016-07-30T07:27:37                  |
 +---------------------------+--------------------------------------+

***完成したネットワーク [#v32b5d2c]

&ref("./Network1.png");



-外部ネットワーク

&ref("./外部接続ルータ.png");

**Floating IP [#rb264e62]

Floating IPをインスタンスに割りあてるとそのIPでOpenStock外からアクセスできる。~
Privateネットワーク内のPC(IP192.168.110.103)にFloating IP(192.168.10.111)を割り振るとルータを介さないでアクセスできる.

-利用できるFloating IPはpubicネットワークでIPアドレス割り当てプールのIP範囲

&ref("./FloatingIPの範囲.png");

-割り当てるには上記のIPの範囲から確保する必要がある。

&ref("./FloatingIPの確保.png");

-インスタンスに確保したIPを割り当てる

&ref("./FloatingIPの割当.png");

&ref("./FloatingIPの割当2.png");




-

トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS