Skip to main content

UPDATE A PORT IN NEUTRON

 

-To update a port in neutron you can do the following:

neutron port-update --fixed-ip subnet_id=SubNetID,ip_address=X.X.X.X --fixed-ip subnet_id=SubNetID,ip_address=X.X.X.X <PORT_ID>

* Don't forget to input the already present IPs in the command or they will be overwritten

 

-To update a port with alot of IPs (shortcut):

neutron port-update PORT_UUID \  (Line1)
--fixed-ip=subnet_id=SUBNETID,ip_address=192.168.1.{164,165,{167..190}}\  (Line 2)       
--fixed-ip=subnet_id=SUBNETID,ip_address=1.1.1.{164..190} \  (Line 3)
--fixed-ip=subnet_id=SUBNETID,ip_address=10.0.0.{4..30} \  (Line 4)
--fixed-ip=subnet_id=SUBNETID,ip_address=172.16.1.{68..94}  (Line 5)

Explanation:

Line 1. replace PORT_UUID by the port ID

Line 2. Will add 192.168.1.164, 192.168.1.165, 192.168.1.167 - 192.168.1.190 (We are basically skipping 192.168.1.166)

Line 3. Will add 1.1.1.164 - 1.1.1.190

Line 4. Will add 10.0.0..4 - 10.0.0.30

Line 5. Will add 172.16.1.68 - 172.16.1.94