Management Plane API > Networking > Services > DHCP

Associated URIs:

API Description API Path

Get a paginated list of DHCP server profiles


Get a paginated list of DHCP server profiles.
GET /api/v1/dhcp/server-profiles

Create a DHCP server profile


Create a DHCP server profile. If no edge member is specified, edge members
to run the dhcp servers will be auto-allocated from the edge cluster.
POST /api/v1/dhcp/server-profiles

Delete a DHCP server profile


Delete a DHCP server profile specified by the profile id.
DELETE /api/v1/dhcp/server-profiles/<profile-id>

Get a DHCP server profile


Return the DHCP profile specified by the profile id.
GET /api/v1/dhcp/server-profiles/<profile-id>

Update a DHCP server profile


If both the edge_cluster_member_indexes in the DhcpProfile are changed in
a same PUT API, e.g. change from [a,b] to [x,y], the current DHCP server
leases will be lost, which could cause the network crash due to ip conflicts.
Hence the suggestion is to change only one member index in one single update,
e.g. from [a, b] to [a,y].

Please note, the edge_cluster_id in DhcpProfile can NOT be changed by this
PUT operation because all existing DHCP leases will lost. If losing leases
is not a problem, a dedicated re-allocation API is suggested to modify the
edge-cluster-id, i.e. "POST /api/v1/dhcp/dhcp-profiles/?action=reallocate".

Meanwhile, if the edge_cluster_member_indexes was specified currently but
now is changed to none (not specified) via a PUT operation, the edge nodes
will not be auto-selected from edge cluster. Instead, the previously-allocated
edge nodes will continue to be used by the DHCP server. This is because
changing both edge nodes of a DHCP server will lose all existing leases.
In case re-allocation is required and leases lost is not a problem (or can
be recovered), please invoke the reallocate API mentioned above with new
DhcpProfile to accomplish the intent.
PUT /api/v1/dhcp/server-profiles/<profile-id>

Reallocate edge cluster and members of given DHCP profile.


As changing edge-cluster-id of a DhcpProfile by a PUT is disallowed,
this re-allocate API is used to modify the edge-cluster-id and members
of a given DhcpProfile.

Only the edge-cluster-id and the edge-cluster-member-indexes fields will
be picked up by this re-allication API. The othere fields in the payload
will be ignored.

If the edge-cluster-id in the payload DhcpProfile is different from the
current edge-cluster-id of the profile, the referencing DHCP server(s) will
be re-allocated to the new edge cluster. If the edge-cluster-id is not
changed, the referencing DHCP server(s) will be re-allocated to the
given edge members in the edge cluster. In this case, this REST API will
act same as that of updating a DhcpProfile.

If the edge cluster member indexes are provided, they should exist in the
given edge cluster. If the indexes are not specified in the DhcpProfile,
edge members will be auto-allocated from the given edge cluster.

Please note that re-allocating edge-cluster will cause lose of all exisitng
DHCP lease information. This API is used only when loosing DHCP leases is
not a real problem, e.g. cross-site migration or failover and all client
hosts will be reboot and get new IP addresses.
POST /api/v1/dhcp/server-profiles/<server-profile-id>?action=reallocate

Get a paginated list of DHCP servers


List logical DHCP servers with pagination support.
GET /api/v1/dhcp/servers

Create a DHCP server


Create a logical DHCP server with v4 and/or v6 servers.
POST /api/v1/dhcp/servers

Delete a DHCP server


Delete a logical DHCP server specified by server id.
DELETE /api/v1/dhcp/servers/<server-id>

Get a DHCP server with v4 and/or v6 servers


Retrieve a logical DHCP server specified by server id.
GET /api/v1/dhcp/servers/<server-id>

Update a DHCP server with v4 and/or v6 servers


Update a logical DHCP server with new configurations.
PUT /api/v1/dhcp/servers/<server-id>

Get a paginated list of a DHCP server's IP pools


List the ip pools of a logical DHCP server with pagination support.
GET /api/v1/dhcp/servers/<server-id>/ip-pools

Create an ip pool for a DHCP server


Create an ip pool for a local DHCP server
POST /api/v1/dhcp/servers/<server-id>/ip-pools

Delete a DHCP server's IP pool


Delete a specific ip pool of a given logical DHCP server.
DELETE /api/v1/dhcp/servers/<server-id>/ip-pools/<pool-id>

Get a DHCP server's IP pool with the specified pool ID


Return a specific ip pool of a given logical DHCP server.
GET /api/v1/dhcp/servers/<server-id>/ip-pools/<pool-id>

Update a DHCP server's IP pool


Update a specific ip pool of a given logical DHCP server.
PUT /api/v1/dhcp/servers/<server-id>/ip-pools/<pool-id>

Get the realized state of a dhcp ip pool


Return realized state information of a dhcp ip pool.
After a dhcp ip pool is created or updated, you can invoke this API to get
the realization information of the ip pool.
GET /api/v1/dhcp/servers/<server-id>/ip-pools/<pool-id>/state

Get a paginated list of a DHCP IPv6 server's IP pools


List the ip pools of a logical DHCP IPv6 server with pagination support.
GET /api/v1/dhcp/servers/<server-id>/ipv6-ip-pools

Create an ip pool for a DHCP IPv6 server


Create an ip pool for a local DHCP IPv6 server
POST /api/v1/dhcp/servers/<server-id>/ipv6-ip-pools

Delete a DHCP IPv6 server's IP pool


Delete a specific ip pool of a given logical DHCP IPv6 server.
DELETE /api/v1/dhcp/servers/<server-id>/ipv6-ip-pools/<pool-id>

Get a DHCP IPv6 server's IP pool with the specified pool ID


Return a specific ip pool of a given logical DHCP IPv6 server.
GET /api/v1/dhcp/servers/<server-id>/ipv6-ip-pools/<pool-id>

Update a DHCP IPv6 server's IP pool


Update a specific ip pool of a given logical DHCP IPv6 server.
PUT /api/v1/dhcp/servers/<server-id>/ipv6-ip-pools/<pool-id>

Get a paginated list of a DHCP IPv6 server's static bindings


Return a paginated list of a static bindings of a given logical DHCP IPv6 server.
GET /api/v1/dhcp/servers/<server-id>/ipv6-static-bindings

Create a static binding for a DHCP IPv6 server


Create a static binding for a logical DHCP IPv6 server.
POST /api/v1/dhcp/servers/<server-id>/ipv6-static-bindings

Delete a static binding for DHCP IPv6 server


Delete a specific static binding of a given logical DHCP IPv6 server.
DELETE /api/v1/dhcp/servers/<server-id>/ipv6-static-bindings/<binding-id>

Get a DHCP IPv6 server's static binding with the specified binding ID


Return a specific static binding of a given logical DHCP IPv6 server.
GET /api/v1/dhcp/servers/<server-id>/ipv6-static-bindings/<binding-id>

Update a DHCP IPv6 server's static binding


Update a specific static binding of a given local DHCP IPv6 server.
PUT /api/v1/dhcp/servers/<server-id>/ipv6-static-bindings/<binding-id>

Delete a single DHCP lease entry specified by ip and mac.


Delete a single DHCP lease entry specified by ip and mac.

The DHCP server matches the DHCP lease with the given ip address and
the mac address. The matched lease entry will be deleted. If no lease
matches, the request is ignored.

The DHCP lease to be deleted will be removed by the system from both active
and standby node. The system will report error if the DHCP lease could not
be removed from both nodes. If the DHCP lease could not be removed on either
node, please check the DHCP server status. Once the DHCP server status is
UP, please invoke the deletion API again to ensure the lease gets deleted
from both nodes.
DELETE /api/v1/dhcp/servers/<server-id>/leases

Get the realized state of a dhcp server


Return realized state information of a dhcp server.
After a dhcp server is created or updated, you can invoke this API to get
the realization information of the server.
GET /api/v1/dhcp/servers/<server-id>/state

Get a paginated list of a DHCP server's static bindings


Return a paginated list of a static bindings of a given logical DHCP server.
GET /api/v1/dhcp/servers/<server-id>/static-bindings

Create a static binding for a DHCP server


Create a static binding for a logical DHCP server.
POST /api/v1/dhcp/servers/<server-id>/static-bindings

Delete a static binding


Delete a specific static binding of a given logical DHCP server.
DELETE /api/v1/dhcp/servers/<server-id>/static-bindings/<binding-id>

Get a DHCP server's static binding with the specified binding ID


Return a specific static binding of a given logical DHCP server.
GET /api/v1/dhcp/servers/<server-id>/static-bindings/<binding-id>

Update a DHCP server's static binding


Update a specific static binding of a given local DHCP server.
PUT /api/v1/dhcp/servers/<server-id>/static-bindings/<binding-id>

Get the realized state of a dhcp static binding


Return realized state information of a dhcp static binding.
After a dhcp static binding is created or updated, you can invoke this API to get
the realization information of the static binding.
GET /api/v1/dhcp/servers/<server-id>/static-bindings/<binding-id>/state

Get DHCP service status with given dhcp server id


Returns the service status of the given dhcp server.
GET /api/v1/dhcp/servers/<server-id>/status