next up previous contents
Next: Router Up: Virtual Network Previous: Proivder Network   Contents

Self-service Network

  1. Self-service network 為私有內網,以一般用戶產生,載入一般用戶 demo 環境變變數。
    [root@controller ~]# . demo.token
    
  2. 新增網路 selfservice。
    [root@controller ~]# openstack network create selfservice
    +---------------------------+--------------------------------------+
    | Field                     | Value                                |
    +---------------------------+--------------------------------------+
    | admin_state_up            | UP                                   |
    | availability_zone_hints   |                                      |
    | availability_zones        |                                      |
    | created_at                | 2018-05-26T07:45:07Z                 |
    | description               |                                      |
    | dns_domain                | None                                 |
    | id                        | 37d0dee7-d573-4f3b-863d-c92c05b6dbbb |
    | ipv4_address_scope        | None                                 |
    | ipv6_address_scope        | None                                 |
    | is_default                | False                                |
    | is_vlan_transparent       | None                                 |
    | mtu                       | 1450                                 |
    | name                      | selfservice                          |
    | port_security_enabled     | True                                 |
    | project_id                | 92d1ec3e04384ad599c1a8f5aed73663     |
    | provider:network_type     | None                                 |
    | provider:physical_network | None                                 |
    | provider:segmentation_id  | None                                 |
    | qos_policy_id             | None                                 |
    | revision_number           | 2                                    |
    | router:external           | Internal                             |
    | segments                  | None                                 |
    | shared                    | False                                |
    | status                    | ACTIVE                               |
    | subnets                   |                                      |
    | tags                      |                                      |
    | updated_at                | 2018-05-26T07:45:07Z                 |
    +---------------------------+--------------------------------------+
    
  3. 查詢網路,出現 selfservice,但其還沒有 subnet。
    [root@controller ~]# openstack network list
    +--------------------------------------+-------------+--------------------------------------+
    | ID                                   | Name        | Subnets                              |
    +--------------------------------------+-------------+--------------------------------------+
    | 0b0ebcee-057b-4798-bf73-5dd449e7879a | provider    | 2a7287d7-4a4f-43cc-beb2-bc9c023af929 |
    | 37d0dee7-d573-4f3b-863d-c92c05b6dbbb | selfservice |                                      |
    +--------------------------------------+-------------+--------------------------------------+
    
  4. 網路 selfservice 新增 subnet,網段為 192.168.10.0/24,gateway 為 192.168.10.1。
    [root@controller ~]# openstack subnet create --network selfservice \
    --dns-nameserver 8.8.8.8 --gateway 192.168.10.1 \
    --subnet-range 192.168.10.0/24 selfservice
    +-------------------+--------------------------------------+
    | Field             | Value                                |
    +-------------------+--------------------------------------+
    | allocation_pools  | 192.168.10.2-192.168.10.254          |
    | cidr              | 192.168.10.0/24                      |
    | created_at        | 2018-05-26T07:48:45Z                 |
    | description       |                                      |
    | dns_nameservers   | 8.8.8.8                              |
    | enable_dhcp       | True                                 |
    | gateway_ip        | 192.168.10.1                         |
    | host_routes       |                                      |
    | id                | 36c70394-9a28-4cdf-bfee-9c65f4512027 |
    | ip_version        | 4                                    |
    | ipv6_address_mode | None                                 |
    | ipv6_ra_mode      | None                                 |
    | name              | selfservice                          |
    | network_id        | 37d0dee7-d573-4f3b-863d-c92c05b6dbbb |
    | project_id        | 92d1ec3e04384ad599c1a8f5aed73663     |
    | revision_number   | 0                                    |
    | segment_id        | None                                 |
    | service_types     |                                      |
    | subnetpool_id     | None                                 |
    | tags              |                                      |
    | updated_at        | 2018-05-26T07:48:45Z                 |
    +-------------------+--------------------------------------+
    
  5. 查詢 subnet,selfservice 出現網段為 192.168.10.0/24 的 subnet。
    [root@controller ~]# openstack subnet list
    +--------------------------------------+-------------+--------------------------------------+-----------------+
    | ID                                   | Name        | Network                              | Subnet          |
    +--------------------------------------+-------------+--------------------------------------+-----------------+
    | 2a7287d7-4a4f-43cc-beb2-bc9c023af929 | provider    | 0b0ebcee-057b-4798-bf73-5dd449e7879a | 163.17.10.0/24  |
    | 36c70394-9a28-4cdf-bfee-9c65f4512027 | selfservice | 37d0dee7-d573-4f3b-863d-c92c05b6dbbb | 192.168.10.0/24 |
    +--------------------------------------+-------------+--------------------------------------+-----------------+
    



2018-09-19