Create a new named subnet
- PDF of this doc site
Collection of separate PDF docs
Creating your file...
POST /network/ip/subnets
Introduced In: 9.11
Creates a new named subnet.
Required properties
-
name
- Name of the subnet to create. -
broadcast_domain
- Broadcast domain containing the subnet. -
ipspace
- IPspace containing the subnet. Required only ifbroadcast_domain.uuid
is not provided. -
subnet.address
- IP address for the subnet. -
subnet.netmask
- IP netmask of the subnet.
Recommended property values
Default property values
If not specified in POST, the following default property values are assigned:
-
gateway
- no gateway -
ip_ranges
- empty -
fail_if_lifs_conflict
- true
Related ONTAP commands
-
network subnet create
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
return_records |
boolean |
query |
False |
The default is false. If set to true, the records are returned.
|
Request Body
Name | Type | Description |
---|---|---|
_links |
||
available_count |
integer |
|
available_ip_ranges |
array[ip_address_range] |
|
broadcast_domain |
The broadcast domain that the subnet is associated with. Either the UUID or name must be supplied on POST. |
|
fail_if_lifs_conflict |
boolean |
This action will fail if any existing interface is using an IP address in the ranges provided. Set this to false to associate any manually addressed interfaces with the subnet and allow the action to succeed. |
gateway |
string |
The IP address of the gateway for this subnet. |
ip_ranges |
array[ip_address_range] |
|
ipspace |
The IPspace that the subnet is associated with. Either the UUID or name must be supplied on POST. |
|
name |
string |
Subnet name |
subnet |
IP information |
|
total_count |
integer |
|
used_count |
integer |
|
uuid |
string |
The UUID that uniquely identifies the subnet. |
Example request
{
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"available_count": 0,
"available_ip_ranges": [
{
"end": "10.10.10.7",
"family": "string",
"start": "10.10.10.7"
}
],
"broadcast_domain": {
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"name": "bd1",
"uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
},
"gateway": "10.1.1.1",
"ip_ranges": [
{
"end": "10.10.10.7",
"family": "string",
"start": "10.10.10.7"
}
],
"ipspace": {
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"name": "exchange",
"uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
},
"name": "subnet1",
"subnet": {
"address": "10.10.10.7",
"family": "string",
"netmask": "24"
},
"total_count": 0,
"used_count": 0,
"uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
}
Response
Status: 201, Created
Headers
Name | Description | Type |
---|---|---|
Location |
Useful for tracking the resource location |
string |
Error
Status: Default
ONTAP Error Response Codes
Error Code | Description |
---|---|
1377660 |
A subnet with the name already exists in the IPspace. |
1377661 |
Subnet in IPspace cannot use subnet address because that address is already used by another subnet in the same IPspace. |
1377662 |
The IP range address is not within the subnet in IPspace. |
1377663 |
The specified IP address range of subnet in IPspace contains an address already in use by a LIF. |
1377664 |
The specified IP address range of subnet in IPspace contains an address already in use by the Service Processor. |
1377673 |
The addresses provided must have the same address family. |
1377681 |
Cannot update LIF associations for LIF. The broadcast domain of the LIF does not match the broadcast domain of the subnet. |
1967082 |
The specified ipspace.name does not match the IPspace name of specified ipspace.uuid |
53282568 |
The subnet.address must be specified together with subnet.netmask. |
53282569 |
The specified subnet.netmask is not valid. |
53282570 |
Each pair of ranges must have ip_ranges.start less than or equal to ip_ranges.end. |
53282571 |
The ip_ranges.start and ip_ranges.end fields must have the same number of items. |
53282573 |
Broadcast domain is a required parameter. The broadcast_domain.name and/or the broadcast_domain.uuid must be specified. |
53282574 |
The specified broadcast_domain and ipspace parameters do not match. |
53282575 |
Operation might have left configuration in an inconsistent state. Unable to set UUID for created entry. |
53282576 |
The specified ipspace.uuid is invalid. |
53282577 |
The specified broadcast_domain.uuid is invalid. |
53282578 |
The specified broadcast_domain.name does not match the IPspace name of specified broadcast_domain.uuid |
53282579 |
Missing the ipspace.name or ipspace.uuid parameter. |
Name | Type | Description |
---|---|---|
error |
Example error
{
"error": {
"arguments": [
{
"code": "string",
"message": "string"
}
],
"code": "4",
"message": "entry doesn't exist",
"target": "uuid"
}
}
Definitions
See Definitions
href
Name | Type | Description |
---|---|---|
href |
string |
_links
Name | Type | Description |
---|---|---|
self |
ip_address_range
IP address range
Name | Type | Description |
---|---|---|
end |
string |
IPv4 or IPv6 address |
family |
string |
IPv4 or IPv6 |
start |
string |
IPv4 or IPv6 address |
broadcast_domain
The broadcast domain that the subnet is associated with. Either the UUID or name must be supplied on POST.
Name | Type | Description |
---|---|---|
_links |
||
name |
string |
Name of the broadcast domain, scoped to its IPspace |
uuid |
string |
Broadcast domain UUID |
ipspace
The IPspace that the subnet is associated with. Either the UUID or name must be supplied on POST.
Name | Type | Description |
---|---|---|
_links |
||
name |
string |
IPspace name |
uuid |
string |
IPspace UUID |
ip_info
IP information
Name | Type | Description |
---|---|---|
address |
string |
IPv4 or IPv6 address |
family |
string |
IPv4 or IPv6 |
netmask |
string |
Input as netmask length (16) or IPv4 mask (255.255.0.0). For IPv6, the default value is 64 with a valid range of 1 to 127. Output is always netmask length. |
ip_subnet
Name | Type | Description |
---|---|---|
_links |
||
available_count |
integer |
|
available_ip_ranges |
array[ip_address_range] |
|
broadcast_domain |
The broadcast domain that the subnet is associated with. Either the UUID or name must be supplied on POST. |
|
fail_if_lifs_conflict |
boolean |
This action will fail if any existing interface is using an IP address in the ranges provided. Set this to false to associate any manually addressed interfaces with the subnet and allow the action to succeed. |
gateway |
string |
The IP address of the gateway for this subnet. |
ip_ranges |
array[ip_address_range] |
|
ipspace |
The IPspace that the subnet is associated with. Either the UUID or name must be supplied on POST. |
|
name |
string |
Subnet name |
subnet |
IP information |
|
total_count |
integer |
|
used_count |
integer |
|
uuid |
string |
The UUID that uniquely identifies the subnet. |
error_arguments
Name | Type | Description |
---|---|---|
code |
string |
Argument code |
message |
string |
Message argument |
error
Name | Type | Description |
---|---|---|
arguments |
array[error_arguments] |
Message arguments |
code |
string |
Error code |
message |
string |
Error message |
target |
string |
The target parameter that caused the error. |