Openstack

subnet ip pool 수정

zzerog 2021. 7. 6. 10:00
728x90
  • 인스턴스가 생성되어 있어도 ip pool 수정 가능
  • unset 후 set 하는게 중요
  • horizon으로는 바로 수정 가능

[수정 전]

(overcloud) [stack@rhosp-zzero-director ~]$ openstack subnet show public
+-------------------+--------------------------------------+
| Field             | Value                                |
+-------------------+--------------------------------------+
| allocation_pools  | 100.100.105.2-100.100.105.254        |
| cidr              | 100.100.105.0/24                     |
| created_at        | 2021-06-16T08:49:14Z                 |
| description       |                                      |
| dns_nameservers   |                                      |
| enable_dhcp       | True                                 |
| gateway_ip        | 100.100.105.1                        |
| host_routes       |                                      |
| id                | 4ab71d5c-56ec-4ced-9b53-0b28a08e5ffb |
| ip_version        | 4                                    |
| ipv6_address_mode | None                                 |
| ipv6_ra_mode      | None                                 |
| name              | public                               |
| network_id        | 82513efb-0880-407a-972e-f9c950f33d84 |
| project_id        | e27ebee07c0f4215a12d5b0655c95cc6     |
| revision_number   | 0                                    |
| segment_id        | None                                 |
| service_types     |                                      |
| subnetpool_id     | None                                 |
| tags              |                                      |
| updated_at        | 2021-06-16T08:49:14Z                 |
+-------------------+--------------------------------------+

 

[수정 후]

(overcloud) [stack@rhosp-zzero-director ~]$ openstack subnet unset --allocation-pool start=100.100.105.2,end=100.100.105.254 public
(overcloud) [stack@rhosp-zzero-director ~]$ openstack subnet set --allocation-pool start=100.100.105.10,end=100.100.105.250 public   
(overcloud) [stack@rhosp-zzero-director ~]$ openstack subnet show public
+-------------------+--------------------------------------+
| Field             | Value                                |
+-------------------+--------------------------------------+
| allocation_pools  | 100.100.105.10-100.100.105.250       |
| cidr              | 100.100.105.0/24                     |
| created_at        | 2021-06-16T08:49:14Z                 |
| description       |                                      |
| dns_nameservers   |                                      |
| enable_dhcp       | True                                 |
| gateway_ip        | 100.100.105.1                        |
| host_routes       |                                      |
| id                | 4ab71d5c-56ec-4ced-9b53-0b28a08e5ffb |
| ip_version        | 4                                    |
| ipv6_address_mode | None                                 |
| ipv6_ra_mode      | None                                 |
| name              | public                               |
| network_id        | 82513efb-0880-407a-972e-f9c950f33d84 |
| project_id        | e27ebee07c0f4215a12d5b0655c95cc6     |
| revision_number   | 2                                    |
| segment_id        | None                                 |
| service_types     |                                      |
| subnetpool_id     | None                                 |
| tags              |                                      |
| updated_at        | 2021-07-06T00:51:00Z                 |
+-------------------+--------------------------------------+
반응형