Policy > Networking > IP Management > DHCP > DHCP Server Configs

Create or update DHCP server configuration

If DHCP server config with the dhcp-server-config-id is not already
present, create a new DHCP server config instance. If it already exists,
replace the DHCP server config instance with this object.

Realized entities of this API can be found using the path of Tier-0, Tier1,
or Segment where this config is applied on.

Modification of edge_cluster_path in DhcpServerConfig will lose all
existing DHCP leases.

If both the preferred_edge_paths in the DhcpServerConfig 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 network connectivity
issues. It is recommended to change only one member index in an update
call, e.g. from [a, b] to [a,y].

Clearing preferred_edge_paths will not reassign edge nodes from the
edge cluster. Instead, the previously-allocated edge nodes will be
retained to avoid loss of leases.
This API is available when using VMware Cloud (AWS, Dell-EMC, Outpost, Hyperscalers) or VMware NSX-T.

Request:

Method:
PUT
URI Path(s):
/policy/api/v1/infra/dhcp-server-configs/<dhcp-server-config-id>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
DhcpServerConfig+

Example Request:

PUT https://<policy-mgr>/policy/api/v1/infra/dhcp-server-configs/dhcp-srv1 { "server_address": "10.1.1.1/30", "lease_time": 10000, "_revision": 0 }

Successful Response:

Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
DhcpServerConfig+

Example Response:

{ "resource_type": "DhcpServerConfig", "id": "dhcp-srv1", "display_name": "dhcp-srv1", "path": "/infra/dhcp-server-configs/dhcp-srv1", "parent_path": "/infra", "relative_path": "dhcp-srv1", "server_address": "10.1.1.1/30", "lease_time": 10000, "_create_user": "admin", "_create_time": 1516668826912, "_last_modified_user": "admin", "_last_modified_time": 1516668826912, "_system_owned": false, "_protection": "NOT_PROTECTED", "_revision": 0 }

Required Permissions:

crud

Feature:

policy_dhcp

Additional Errors: