Search

Instace static IP 할당

네트워크 생성
openstack network create [네트워크명] +-------------------------+--------------------------------------+ Field | Value | +-------------------------+--------------------------------------+ | admin_state_up | UP | | availability_zone_hints | | | availability_zones | | | created_at | xxx | | description | | | headers | | | id | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | | ipv4_address_scope | None | | ipv6_address_scope | None | | mtu | 1446 | | name | 네트워크명 | | port_security_enabled | True | | project_id | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | | project_id | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | | qos_policy_id | None | | revision_number | 3 | | router:external | Internal | | shared | False | | status | ACTIVE | | subnets | | | tags | [] | | updated_at | xxx | +-------------------------+--------------------------------------+
Shell
복사
서브넷 생성 및 네트워크 연경
openstack subnet create --network [네트워크명] --subnet-range 10.1.1.0/24 [서브넷명] +-------------------+--------------------------------------+ | Field | Value | +-------------------+--------------------------------------+ | allocation_pools | 10.1.1.2-10.1.1.254 | | cidr | 10.1.1.0/24 | | created_at | xxx | | description | | | dns_nameservers | | | enable_dhcp | True | | gateway_ip | 10.1.1.1 | | headers | | | host_routes | | | id | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | | ip_version | 4 | | ipv6_address_mode | None | | ipv6_ra_mode | None | | name | 서브넷명 | | network_id | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | | project_id | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | | project_id | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | | revision_number | 2 | | service_types | [] | | subnetpool_id | None | | updated_at | xxx | +-------------------+--------------------------------------+
Shell
복사
포트 생성 및 네트워크 , 서브넷 연결
openstack port create --network [네트워크명] --fixed-ip subnet=[서브넷명],ip-address=[고정 IP] [고정 IP명] +-----------------------+--------------------------------------------------------------------------+ | Field | Value | +-----------------------+--------------------------------------------------------------------------+ | admin_state_up | UP | | allowed_address_pairs | | | binding_vnic_type | normal | | created_at | xxx | | description | | | device_id | | | device_owner | | | extra_dhcp_opts | | | fixed_ips | ip_address='10.1.1.10', subnet_id='xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' | | headers | | | id | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | | mac_address | xx:xx:xx:xx:xx:xx | | name | 고정 IP명 | | network_id | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | | port_security_enabled | True | | project_id | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | | project_id | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | | qos_policy_id | None | | revision_number | 5 | | security_groups | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | | status | DOWN | | updated_at | xxx | +-----------------------+--------------------------------------------------------------------------+
Shell
복사
인스턴스 생성
openstack server create --flavor [FLAVOR 명] --nic port-id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --image [이미지명] --wait [인스턴스명] port-id 검색 command : openstack port list +--------------------------------------+----------------------------------------------------------+ | Field | Value | +--------------------------------------+----------------------------------------------------------+ | OS-DCF:diskConfig | MANUAL | | OS-EXT-AZ:availability_zone | 0000c-2 | | OS-EXT-STS:power_state | Running | | OS-EXT-STS:task_state | None | | OS-EXT-STS:vm_state | active | | OS-SRV-USG:launched_at | xxx | | OS-SRV-USG:terminated_at | None | | accessIPv4 | | | accessIPv6 | | | addresses | 네트워크명=10.1.1.10 | | adminPass | == | | config_drive | | | created | xxx | | flavor | FLAVOR 명 (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | | hostId | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | | id | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | | image | 이미지명 (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) | | key_name | None | | name | 인스턴스명 | | os-extended-volumes:volumes_attached | [] | | progress | 0 | | project_id | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | | properties | | | security_groups | [{u'name': u'default'}] | | status | ACTIVE | | updated | xxx | | user_id | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | +--------------------------------------+----------------------------------------------------------+
Shell
복사