---
title: DHCP Server
slug: aidc/dhcp-server
createdAt: 2025-12-29T10:28:23.099Z
---

## <font color="#1d50a2">URLs Summary</font>

| **URL**                                                                  | **GET** | **POST** | **PATCH** | **PUT** | **DELETE** |
| ------------------------------------------------------------------------ | ------- | -------- | --------- | ------- | ---------- |
| /rest/v1/running/dhcp-server                                             | Y       | N        | N         | N       | N          |
| /rest/v1/running/dhcp-server/class/&#x7B;name}                           | Y       | Y        | Y         | N       | Y          |
| /rest/v1/running/dhcp-server/class/&#x7B;name}/rule/&#x7B;id}            | Y       | Y        | Y         | N       | Y          |
| /rest/v1/running/dhcp-server/failover/&#x7B;name}                        | Y       | Y        | Y         | N       | Y          |
| /rest/v1/running/dhcp-server/interfaces/&#x7B;name}                      | Y       | N        | Y         | N       | N          |
| /rest/v1/running/dhcp-server/option-group/&#x7B;id}                      | Y       | Y        | Y         | N       | Y          |
| /rest/v1/running/dhcp-server/v4-pool/&#x7B;name}                         | Y       | Y        | Y         | N       | Y          |
| /rest/v1/running/dhcp-server/v4-pool/&#x7B;name}/class/&#x7B;class-name} | Y       | Y        | Y         | N       | Y          |
| /rest/v1/running/dhcp-server/v6-pool/&#x7B;name}                         | Y       | Y        | Y         | N       | Y          |
| /rest/v1/rpc/show-dhcp-pool-expired                                      | N       | Y        | N         | N       | N          |
| /rest/v1/rpc/show-dhcp-pool-info                                         | N       | Y        | N         | N       | N          |
| /rest/v1/rpc/show-dhcp-pool-ip-in-use                                    | N       | Y        | N         | N       | N          |

## <font color="#1d50a2">Examples</font>

### <font color="#1d50a2">Show dhcp pool expired</font>

```json
POST HTTPS://{switch IP}/rest/v1/rpc/show-dhcp-pool-expired
```

### <font color="#1d50a2">Show dhcp pool information</font>

```json
POST HTTPS://{switch IP}/rest/v1/rpc/show-dhcp-pool-info
```

### <font color="#1d50a2">Show dhcp pool ip in use</font>

```json
POST HTTPS://{switch IP}/rest/v1/rpc/show-dhcp-pool-ip-in-use
```

### <font color="#1d50a2">Get DHCP Server information.</font>

```json
GET HTTPS://{switch IP}/rest/v1/running/dhcp-server
```

### <font color="#1d50a2">Create a DHCP server class.</font>

```json
POST HTTPS://{switch IP}/rest/v1/running/dhcp-server/class
{
    "name": "class2",
    "rule": [
        {"id": 1, "option": "circuit-id", "option-value": "123"},
        {"id": 2, "option": "remote-id", "option-value": "456"},
        {"id": 3, "option": "pxe-system-type", "option-value": "0x4569"},
    ]
}
```

### <font color="#1d50a2">Create a rule for DHCP server class.</font>

```json
POST HTTPS://{switch IP}/rest/v1/running/dhcp-server/class/{name}/rule/3
{
    "option": "circuit-id",
    "option-value": "123fs"
}
```

### <font color="#1d50a2">Create a failover for DHCP server.</font>

```json
POST HTTPS://{switch IP}/rest/v1/running/dhcp-server/failover
{
    "name": "failover2",
    "peer-down-wait-time": 650,
    "max-response-delay-time": 630,
    "local-address": "6.66.9.5",
    "peer-address": "6.66.2.3",
    "role": "primary",
    "address-pool-allocation-percentage": 10
}
```

### <font color="#1d50a2">Modify DHCP Server configuration on an interface.</font>

```json
PATCH HTTPS://{switch IP}/rest/v1/running/dhcp-server/interfaces
{
    "name": "Ethernet1",
    "enabled": "true"
}
```

### <font color="#1d50a2">Create a DHCP server option group.</font>

```json
POST HTTPS://{switch IP}/rest/v1/running/dhcp-server/option-group
{
    "id": 1,
    "vendor-specific-information": "0x123"
}
```

### <font color="#1d50a2">Create a DHCP server IPv4 address pool.</font>

```json
POST HTTPS://{switch IP}/rest/v1/running/dhcp-server/v4-pool
{
    "name": "pool1",
    "network": "2.2.2.2/24",
    "start-ip": "2.2.2.10",
    "end-ip": "2.2.2.20",
    "next-server": "3.3.3.3",
    "failover": "failover1",
    "bootfile-name": "file1",
    "capwap-ac-address": "6.6.5.5",
    "vendor-specific-information": "0x5636",
    "default-gateway": "6.5.4.5",
    "tftp-server": "www.com",
    "default-lease-time": 305,
    "max-lease-time": 405,
    "domain-name-server": "8.8.8.8",
    "class": [
        {
            "class-name": "class1",
            "start-ip": "2.2.2.30",
            "end-ip": "2.2.2.40",
            "failover": "failover2",
            "option-group": "2",
        }
    ]
}
```

### <font color="#1d50a2">Create a DHCP server class for an IPv4 address pool.</font>

```json
POST HTTPS://{switch IP}/rest/v1/running/dhcp-server/v4-pool/pool1/class
{
    "class-name": "pool_class1",
    "start-ip": "2.2.2.60",
    "end-ip": "2.2.2.70"
}
```

### <font color="#1d50a2">Create a DHCP server IPv6 address pool.</font>

```json
POST HTTPS://{switch IP}/rest/v1/running/dhcp-server/v6-pool
{
    "name": "pool2",
    "network": "2001::3/64",
    "start-ip": "2001::30",
    "end-ip": "2001::40",
    "default-lease-time": 305,
    "max-lease-time": 405,
    "domain-name-server": "2003::4",
    "vlan": "Vlan100"
}
```

## <font color="#1d50a2">Properties Descriptions</font>

### <font color="#1d50a2">DHCP server class instance</font>

**Tree Diagrams**

```plaintext
  +--rw dhcp-server
     +--rw class* [name]
     |  +--rw name
     |  +--rw rule* [id]
     |     +--rw id
     |     +--rw option
     |     +--rw option-value
```

**Table of Properties**

| **Name**     | **Required** | **Type/Range**                                       | **Description**                                                                                         |
| ------------ | ------------ | ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| dhcp-server  | M            |                                                      | Path-only node, has no configurable value.                                                              |
| class        | M            |                                                      | (sub-property of dhcp-server)<br />Path-only node, has no configurable value.<br />class of dhcp server |
| name         | M            | string                                               | (sub-property of class)                                                                                 |
| rule         | M            |                                                      | (sub-property of class)<br />Path-only node, has no configurable value.                                 |
| id           | M            | 1..16                                                | (sub-property of rule)<br />DHCP server class rule id.                                                  |
| option       | M            | "circuit-id"<br />"remote-id"<br />"pxe-system-type" | (sub-property of rule)<br />Some option fields in the DHCP protocol.                                    |
| option-value | M            | string                                               | (sub-property of rule)<br />The value of option in the DHCP protocol.                                   |

### <font color="#1d50a2">DHCP server failover instance</font>

**Tree Diagrams**

```plaintext
  +--rw dhcp-server
     +--rw failover* [name]
     |  +--rw name
     |  +--rw peer-down-wait-time?
     |  +--rw max-response-delay-time?
     |  +--rw local-address?
     |  +--rw peer-address?
     |  +--rw role?
     |  +--rw address-pool-allocation-percentage?
```

**Table of Properties**

| **Name**                           | **Required** | **Type/Range**             | **Description**                                                                                                                                                                                          |
| ---------------------------------- | ------------ | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| dhcp-server                        | M            |                            | Path-only node, has no configurable value.                                                                                                                                                               |
| failover                           | M            |                            | (sub-property of dhcp-server)<br />Path-only node, has no configurable value.<br />The list of dhcp failover.                                                                                            |
| name                               | M            | string                     | (sub-property of failover)<br />DHCP failover name.                                                                                                                                                      |
| peer-down-wait-time                | O            | 1..3600                    | (sub-property of failover)<br />Waiting time to mark the peer as down after the communication is disconnected.                                                                                           |
| max-response-delay-time            | O            | 30..3600                   | (sub-property of failover)<br />The maximum time the current server waits for a response from the peer server<br />Default value: 60                                                                     |
| local-address                      | O            | "A.B.C.D"<br />"Loopback0" | (sub-property of failover)<br />The address of local.                                                                                                                                                    |
| peer-address                       | O            | A.B.C.D                    | (sub-property of failover)<br />The IP address of peer.                                                                                                                                                  |
| role                               | O            | "primary"<br />"secondary" | (sub-property of failover)<br />The current server role                                                                                                                                                  |
| address-pool-allocation-percentage | O            | 1..100                     | (sub-property of failover)<br />The ratio of the address pool allocated to the primary server and the backup server. This parameter can only be configured on the primary server.<br />Default value: 50 |

### <font color="#1d50a2">DHCP server option-group instance</font>

**Tree Diagrams**

```plaintext
  +--rw dhcp-server
     +--rw option-group* [id]
     |  +--rw id
     |  +--rw bootfile-name
     |  |  +--rw bootfile-name?
     |  |  +--rw force?
     |  +--rw capwap-ac-address?
     |  +--rw vendor-specific-information
     |  |  +--rw vendor-specific-information?
     |  |  +--rw force?
     |  +--rw default-gateway?
     |  +--rw tftp-server?
```

**Table of Properties**

| **Name**                    | **Required** | **Type/Range**              | **Description**                                                                                                                                           |
| --------------------------- | ------------ | --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| dhcp-server                 | M            |                             | Path-only node, has no configurable value.                                                                                                                |
| option-group                | M            |                             | (sub-property of dhcp-server)<br />Path-only node, has no configurable value.                                                                             |
| id                          | M            | 1..65535                    | (sub-property of option-group)<br />ID of DHCP option group                                                                                               |
| bootfile-name               | M            |                             | (sub-property of option-group)<br />Path-only node, has no configurable value.<br />The location of the boot file used by the client to start the system. |
| bootfile-name               | O            | string                      | (sub-property of bootfile-name)<br />The location of the boot file used by the client to start the system.                                                |
| force                       | O            | "true"<br />"false"         | (sub-property of bootfile-name)<br />Force send this option to client.<br />Default value: "false"                                                        |
| capwap-ac-address           | O            | A.B.C.D                     | (sub-property of option-group)<br />IP address of ac.                                                                                                     |
| vendor-specific-information | M            |                             | (sub-property of option-group)<br />Path-only node, has no configurable value.<br />Set option43.                                                         |
| vendor-specific-information | O            | a hexadecimal number string | (sub-property of vendor-specific-information)<br />The value of option43 is usually in hexadecimal.<br />eg."0x5636"                                      |
| force                       | O            | "true"<br />"false"         | (sub-property of vendor-specific-information)<br />Force send this option to client.<br />Default value: "false"                                          |
| default-gateway             | O            | A.B.C.D                     | (sub-property of option-group)<br />Specify the IP address of the default gateway.                                                                        |
| tftp-server                 | O            | string                      | (sub-property of option-group)<br />Specify the IP address or domain name of the tftp server.                                                             |

### <font color="#1d50a2">DHCP server IPv4 pool</font>

**Tree Diagrams**

```plaintext
  +--rw dhcp-server
     +--rw v4-pool* [name]
     |  +--rw name
     |  +--rw network?
     |  +--rw start-ip?
     |  +--rw end-ip?
     |  +--rw domain-name-server?
     |  +--rw bootfile-name
     |  |  +--rw bootfile-name?
     |  |  +--rw force?
     |  +--rw capwap-ac-address?
     |  +--rw vendor-specific-information
     |  |  +--rw vendor-specific-information?
     |  |  +--rw force?
     |  +--rw default-gateway?
     |  +--rw tftp-server?
     |  +--rw default-lease-time?
     |  +--rw max-lease-time?
     |  +--rw vlan?
     |  +--rw next-server?
     |  +--rw failover?
     |  +--rw class* [class-name]
     |     +--rw class-name
     |     +--rw start-ip?
     |     +--rw end-ip?
     |     +--rw failover?
     |     +--rw option-group?
```

**Table of Properties**

| **Name**                    | **Required** | **Type/Range**              | **Description**                                                                                                                                      |
| --------------------------- | ------------ | --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| dhcp-server                 | M            |                             | Path-only node, has no configurable value.                                                                                                           |
| v4-pool                     | M            |                             | (sub-property of dhcp-server)<br />Path-only node, has no configurable value.                                                                        |
| name                        | M            | string                      | (sub-property of v4-pool)<br />dhcp pool name                                                                                                        |
| network                     | O            | A.B.C.D/M                   | (sub-property of v4-pool)<br />Specify the network segment of the DHCP pool.                                                                         |
| start-ip                    | O            | A.B.C.D                     | (sub-property of v4-pool)<br />Specify the starting IP address of the DHCP pool.                                                                     |
| end-ip                      | O            | A.B.C.D                     | (sub-property of v4-pool)<br />Specify the end IP address of the DHCP pool.                                                                          |
| domain-name-server          | O            | A.B.C.D                     | (sub-property of v4-pool)<br />IP address of DNS server.                                                                                             |
| bootfile-name               | M            |                             | (sub-property of v4-pool)<br />Path-only node, has no configurable value.<br />The location of the boot file used by the client to start the system. |
| bootfile-name               | O            | string                      | (sub-property of bootfile-name)<br />The location of the boot file used by the client to start the system.                                           |
| force                       | O            | "true"<br />"false"         | (sub-property of bootfile-name)<br />Force send this option to client.<br />Default value: "false"                                                   |
| capwap-ac-address           | O            | A.B.C.D                     | (sub-property of v4-pool)<br />IP address of ac.                                                                                                     |
| vendor-specific-information | M            |                             | (sub-property of v4-pool)<br />Path-only node, has no configurable value.<br />Set option43.                                                         |
| vendor-specific-information | O            | a hexadecimal number string | (sub-property of vendor-specific-information)<br />The value of option43 is usually in hexadecimal.<br />eg. "0x1f"                                  |
| force                       | O            | "true"<br />"false"         | (sub-property of vendor-specific-information)<br />Force send this option to client.<br />Default value: "false"                                     |
| default-gateway             | O            | A.B.C.D                     | (sub-property of v4-pool)<br />Specify the IP address of the default gateway.                                                                        |
| tftp-server                 | O            | string                      | (sub-property of v4-pool)<br />Specify the IP address or domain name of the tftp server.                                                             |
| default-lease-time          | O            | 300..100000000              | (sub-property of v4-pool)<br />Default lease time.<br />Default value: 604800                                                                        |
| max-lease-time              | O            | 300..100000000              | (sub-property of v4-pool)<br />Maximum lease time.<br />Default value: 2592000                                                                       |
| vlan                        | O            | Vlan1..4094                 | (sub-property of v4-pool)                                                                                                                            |
| next-server                 | O            | A.B.C.D                     | (sub-property of v4-pool)<br />IP address of tftp server                                                                                             |
| failover                    | O            | string                      | (sub-property of v4-pool)<br />Class-bound failover.                                                                                                 |
| class                       | M            |                             | (sub-property of v4-pool)<br />Path-only node, has no configurable value.<br />Class bound to dhcp pool                                              |
| class-name                  | M            | string                      | (sub-property of class)<br />The bound class name.                                                                                                   |
| start-ip                    | O            | A.B.C.D                     | (sub-property of class)<br />Set the rules in this class to apply to the starting IP address of the IP segment.                                      |
| end-ip                      | O            | A.B.C.D                     | (sub-property of class)<br />Set the rules in this class to apply to the end IP address of the IP segment.                                           |
| failover                    | O            | string                      | (sub-property of class)<br />Class-bound failover.                                                                                                   |
| option-group                | O            | 0..65535                    | (sub-property of class)<br />Class-bound option-group.                                                                                               |

### <font color="#1d50a2">DHCP server IPv6 pool</font>

**Tree Diagrams**

```plaintext
  +--rw dhcp-server
     +--rw v6-pool* [name]
     |  +--rw name
     |  +--rw network?
     |  +--rw start-ip?
     |  +--rw end-ip?
     |  +--rw domain-name-server?
     |  +--rw default-lease-time?
     |  +--rw max-lease-time?
     |  +--rw vlan?
```

**Table of Properties**

| **Name**           | **Required** | **Type/Range**                   | **Description**                                                                       |
| ------------------ | ------------ | -------------------------------- | ------------------------------------------------------------------------------------- |
| dhcp-server        | M            |                                  | Path-only node, has no configurable value.                                            |
| v6-pool            | M            |                                  | (sub-property of dhcp-server)<br />Path-only node, has no configurable value.         |
| name               | M            | string                           | (sub-property of v6-pool)<br />dhcp pool name                                         |
| network            | O            | XX\:XX\:XX\:XX\:XX\:XX\:XX\:XX/M | (sub-property of v6-pool)<br />Specify the network segment of the DHCP pool v6.       |
| start-ip           | O            | XX\:XX\:XX\:XX\:XX\:XX\:XX\:XX   | (sub-property of v6-pool)<br />Specify the starting IPv6 address of the DHCP pool v6. |
| end-ip             | O            | XX\:XX\:XX\:XX\:XX\:XX\:XX\:XX   | (sub-property of v6-pool)<br />Specify the end IPv6 address of the DHCP pool v6.      |
| domain-name-server | O            | XX\:XX\:XX\:XX\:XX\:XX\:XX\:XX   | (sub-property of v6-pool)<br />IP address of DNS server.                              |
| default-lease-time | O            | 300..100000000                   | (sub-property of v6-pool)<br />Default lease time.<br />Default value: 604800         |
| max-lease-time     | O            | 300..100000000                   | (sub-property of v6-pool)<br />Maximum lease time.<br />Default value: 2592000        |
| vlan               | O            | Vlan1..4094                      | (sub-property of v6-pool)                                                             |

### <font color="#1d50a2">DHCP server interfaces</font>

**Tree Diagrams**

```plaintext
  +--rw dhcp-server
     +--rw interfaces* [name]
        +--rw name
        +--rw enabled?
```

**Table of Properties**

| **Name**    | **Required** | **Type/Range**                 | **Description**                                                                                                                |
| ----------- | ------------ | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
| dhcp-server | M            |                                | Path-only node, has no configurable value.                                                                                     |
| interfaces  | M            |                                | (sub-property of dhcp-server)<br />Path-only node, has no configurable value.<br />List of interfaces enabled to the DHCP pool |
| name        | M            | Ethernet name<br />Vlan1..4094 | (sub-property of interfaces)                                                                                                   |
| enabled     | O            | "true"<br />"false"            | (sub-property of interfaces)                                                                                                   |

### <font color="#1d50a2">Show-dhcp-pool-expired</font>

**Tree Diagrams**

```plaintext
    +---x show-dhcp-pool-expired
    |  +---w input
    |  |  +---w version?
    |  +--ro output
    |     +--ro data?
```

**Table of Properties**

| **Name**               | **Required** | **Type/Range** | **Description**                                                                 |
| ---------------------- | ------------ | -------------- | ------------------------------------------------------------------------------- |
| show-dhcp-pool-expired | M            |                | Path-only node, has no configurable value.<br />Show DHCP server expired lease. |
| version                | O            | "v4"<br />"v6" | (sub-property of input)<br />The family of the pool.                            |
| data                   | RO           | \<anydata>     | (sub-property of output)                                                        |

### <font color="#1d50a2">Show-dhcp-pool-info</font>

**Tree Diagrams**

```plaintext
    +---x show-dhcp-pool-info
    |  +---w input
    |  |  +---w version?
    |  +--ro output
    |     +--ro data?
```

**Table of Properties**

| **Name**            | **Required** | **Type/Range** | **Description**                                                             |
| ------------------- | ------------ | -------------- | --------------------------------------------------------------------------- |
| show-dhcp-pool-info | M            |                | Path-only node, has no configurable value.<br />Show DHCP server pool info. |
| version             | O            | "v4"<br />"v6" | (sub-property of input)<br />The family of the pool.                        |
| data                | RO           | \<anydata>     | (sub-property of output)                                                    |

### <font color="#1d50a2">show-dhcp-pool-ip-in-use</font>

**Tree Diagrams**

```plaintext
    +---x show-dhcp-pool-ip-in-use
       +---w input
       |  +---w version?
       |  +---w address?
       +--ro output
          +--ro data?
```

**Table of Properties**

| **Name**                 | **Required** | **Type/Range**                              | **Description**                                                         |
| ------------------------ | ------------ | ------------------------------------------- | ----------------------------------------------------------------------- |
| show-dhcp-pool-ip-in-use | M            |                                             | Path-only node, has no configurable value.<br />Show DHCP server lease. |
| version                  | O            | "v4"<br />"v6"                              | (sub-property of input)<br />The family of the pool.                    |
| address                  | O            | A.B.C.D<br />XX\:XX\:XX\:XX\:XX\:XX\:XX\:XX | (sub-property of input)<br />                                           |
| data                     | RO           | \<anydata>                                  | (sub-property of output)                                                |

