Add or remove IP addresses from a subnet
You can add IP addresses when initially creating a subnet, or you can add IP addresses to a subnet that already exists. You can also remove IP addresses from an existing subnet. This enables you to allocate only the required IP addresses for SVMs.
About this task
When adding IP addresses, you will receive an error if any service processor or network interfaces are using the IP addresses in the range being added. If you want to associate any manually addressed interfaces with the current subnet, you can set the "-force-update-lif-associations" option to true.
When removing IP addresses, you will receive an error if any service processor or network interfaces are using the IP addresses being removed. If you want the interfaces to continue to use the IP addresses after they are removed from the subnet, you can set the "-force-update-lif-associations" option to true.
Add or remove IP addresses from a subnet:
|If you want to…||Use this command…|
Add IP addresses to a subnet
network subnet add-ranges
Remove IP addresses from a subnet
network subnet remove-ranges
For more information about these commands, see the man pages.
The following command adds IP addresses 192.0.2.82 through 192.0.2.85 to subnet sub1:
network subnet add-ranges -subnet-name <sub1> -ip-ranges <192.0.2.82-192.0.2.85>
The following command removes IP address 198.51.100.9 from subnet sub3:
network subnet remove-ranges -subnet-name <sub3> -ip-ranges <198.51.100.9>
If the current range includes 1 through 10 and 20 through 40, and you want to add 11 through 19 and 41 through 50 (basically allowing 1 through 50), you can overlap the existing range of addresses by using the following command. This command adds only the new addresses and does not affect the existing addresses:
network subnet add-ranges -subnet-name <sub3> -ip-ranges <188.8.131.52-184.108.40.206>