3.1.5.8.2 subnets

The subnets resource consists of a subnet/VLAN pair. The vlanId resource is required; however, it MAY contain a value of zero if the subnet is not associated with a VLAN.

An IP subnet MUST NOT overlap with any other IP subnet in same logical network. An IP subnet MUST NOT span across multiple VLANs within a logical network. All nextHops resources that are associated with the routes resource for this logicalSubnets resource MUST be contained within the logical subnet.

The URI for the resource is as follows.

 https://<url>/networking/v1/logicalNetworks/{parentResourceId}/subnets/{resourceId}

url: The address or name of the REST server of the Network Controller.

parentResourceId: the identifier for the specific ancestor resource within the resource type. See section 2.2.3.3 for more details.

resourceId: the identifier for the specific descendant resource within the resource type. See section 2.2.3.4 for more details.

Note  The server MAY support additional versions, besides v1 in the URI.

The following HTTP methods can be performed on this resource.

HTTP method

Section

Description

PUT

3.1.5.8.2.1.1

Create a new subnets resource or update an existing subnets resource.

GET

3.1.5.8.2.1.2

Get one subnets resource.

GET ALL

3.1.5.8.2.1.3

List all subnets resources in the Network Controller.

DELETE

3.1.5.8.2.1.4

Deletes a subnets resource.

The following property elements are valid.

Element name

Type

Description

etag

Read-only

Specified in Common JSON Elements, section 2.2.2.

provisioningState

Read-only

Specified in Common JSON Elements, section 2.2.2.

addressPrefix

Read/write

Identifies the subnet ID in form of ipAddress/prefixlength. The address prefix can be either IPV4 or IPv6.

vlanId

Read/write
Required

Indicates the VLAN ID associated with the logical subnet.  Valid values range from 0 through 4095.  The value can be shared across multiple subnets.

routes

Optional Read/write

Indicates the routes that are contained in the logical subnet.  See section 3.1.5.8.2.3 for full details on this element. 

ipPools

Optional Read/write

Indicates the ipPools that are contained in the logical subnet.  See section 3.1.5.8.2.2 for full details on this element. 

dnsServers

Optional Read/write

Indicates one or more DNS servers that are used for resolving DNS queries by devices or host connected to this logical subnet.

networkInterfaces

Read-only

Indicates an array of references to networkInterfaces resources that are attached to the logical subnet.

isPublic

Read/write

Boolean flag specifying whether the logical subnet is a public subnet.

defaultGateways

Read/write

A collection of one or more gateways for the subnet.