POST - Create an IPv6 Subnet

Purpose

This API call enables administrators to create an IPv6 DHCP subnet within a specified cluster. It defines the subnet's prefix, address pools, prefix delegation ranges, and DHCP server assignment. It ensures efficient address allocation and supports hierarchical prefix delegation for optimized IPv6 network management..

Request URL

Method: POST

https://{appconsole_IP}:{9443}/api/dhcp/subnet_data/

Request Headers

The following headers must be included in the API request for successful authentication and data submission:

Authorization: DDI Central's OAuth implementation uses the Bearer authentication scheme. Hence, while making API calls, access_token obtained via the OAuth 2.0 Client Credentials Grant must be included in the Authorization header of API requests. This token verifies the client’s identity and ensures appropriate permissions for accessing resources.

The Authorization Header follows the format below:

headers = { "Authorization": "Bearer {bearer_tk}" }


Content-Type: Required in the header to indicate the media type of the resource being sent. It helps the server at the receiving end understand how to process the transmitted request body.

The Content-Type Header follows the format below:

headers ={ "Content-Type": "application/json" }

Request Body

  • cluster_name* string
    • The name of the cluster where the IPv6 subnet is being created.
    • Example: "linux".
  • network_address* string
    • The base network address of the IPv6 subnet.
    • Example: "2607:f0d0:1002:0054::0".
  • prefix* integer
    • The prefix length defining the subnet mask.
    • Example: 64 (equivalent to subnet mask ffff:ffff:ffff:ffff::/64).
  • description string
    • An optional description for the subnet.
    • Example: "dataset".
  • dhcp_server_address* string
    • IP address of the DHCP server that manages this subnet.
    • Example: "192.168.122.1".
    • Note: At any point, either dhcp_server_address or failover_server_name should be mapped to the subnet, but not both. One must be set to null:
      • If failover setup is NOT configured, failover_server_name is set to null, and dhcp_server_address holds the DHCP server's IP.
  • failover_server_name string
    • Name of the failover server for DHCP redundancy.
    • Example: "fail2".
    • Note: At any point, either dhcp_server_address or failover_server_name should be mapped to the subnet, but not both. One must be set to null.
      • If failover setup is configured, dhcp_server_address is set to null, and failover_server_name holds the failover server's name.
  • dhcp_type* string
    • Specifies the type of DHCP service governing the subnet.
    • Accepted values:
      • It should be set to "dhcpd6" to create an IPv6 subnet.
  • pool_data* string
    • Defines the range(s) of available IPv6 addresses for lease.
    • Each object contains:
      • start: First IP in the range.
      • end: Last IP in the range.
    • Example:
      • [{"start": "2607:f0d0:1002:0054::100", "end": "2607:f0d0:1002:0054::1fff"}].
  • prefix6_range* string
    • Defines IPv6 prefix delegation ranges within the subnet.
    • Each set contains:
      • start: First address in the delegated prefix range.
      • end: Last address in the delegated prefix range.
      • prefix: Length of the prefix being delegated.
    • Example:
      • [{"start": "2607:f0d0:1002:0054:1234::", "end": "2607:f0d0:1002:0054:ffff::", "prefix": 96}].

 

- Mandatory parameter.

 

Sample Request

Copied
{
  "cluster_name": "linux",
  "network_address": "2607:f0d0:1002:0054::0",
  "prefix": 64,
  "description": "dataset",
  "dhcp_server_address": "192.168.56.1",
  "dhcp_type": "dhcpd6",
  "pool_data": [
    {
      "start": "2607:f0d0:1002:0054::100",
      "end": "2607:f0d0:1002:0054::1fff"
    }
  ],
  "prefix6_range": [
    {
      "start": "2607:f0d0:1002:0054:1234::",
      "end": "2607:f0d0:1002:0054:ffff::",
      "prefix": 96
    },
    {
      "start": "2607:f0d0:1002:0054:2000::",
      "end": "2607:f0d0:1002:0054:2fff::",
      "prefix": 96
    }
  ]
}

                                  

Sample Response

Copied

{
  "id": 5995,
  "network_address": "2001:da8:87b9::",
  "dhcp_type": "dhcpd6",
  "prefix": 64,
  "lease_duration": "8.00:00:00",
  "cluster_name": "chennai2",
  "dhcp_server_address": "10.16.58.32",
  "pool_data": [
    {
      "start": "2001:da8:87b9::6001",
      "end": "2001:da8:87b9::8001"
    }
  ],
  "prefix6_range": [
    {
      "start": "2001:da8:87b9::4001",
      "end": "2001:da8:87b9::5002",
      "prefix": 96
    },
    {
      "start": "2001:da8:87b9::2001",
      "end": "2001:da8:87b9::3002",
      "prefix": 96
    }
  ]
}