DHCP Server
URLs Summary
URL | GET | POST | PATCH | PUT | DELETE |
|---|---|---|---|---|---|
/rest/v1/running/dhcp-server | Y | N | N | N | N |
/rest/v1/running/dhcp-server/class/{name} | Y | Y | Y | N | Y |
/rest/v1/running/dhcp-server/class/{name}/rule/{id} | Y | Y | Y | N | Y |
/rest/v1/running/dhcp-server/failover/{name} | Y | Y | Y | N | Y |
/rest/v1/running/dhcp-server/interfaces/{name} | Y | N | Y | N | N |
/rest/v1/running/dhcp-server/option-group/{id} | Y | Y | Y | N | Y |
/rest/v1/running/dhcp-server/v4-pool/{name} | Y | Y | Y | N | Y |
/rest/v1/running/dhcp-server/v4-pool/{name}/class/{class-name} | Y | Y | Y | N | Y |
/rest/v1/running/dhcp-server/v6-pool/{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 |
Examples
Show dhcp pool expired
POST HTTPS://{switch IP}/rest/v1/rpc/show-dhcp-pool-expiredShow dhcp pool information
POST HTTPS://{switch IP}/rest/v1/rpc/show-dhcp-pool-infoShow dhcp pool ip in use
POST HTTPS://{switch IP}/rest/v1/rpc/show-dhcp-pool-ip-in-useGet DHCP Server information.
GET HTTPS://{switch IP}/rest/v1/running/dhcp-serverCreate a DHCP server class.
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"},
]
}Create a rule for DHCP server class.
POST HTTPS://{switch IP}/rest/v1/running/dhcp-server/class/{name}/rule/3
{
"option": "circuit-id",
"option-value": "123fs"
}Create a failover for DHCP server.
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
}Modify DHCP Server configuration on an interface.
PATCH HTTPS://{switch IP}/rest/v1/running/dhcp-server/interfaces
{
"name": "Ethernet1",
"enabled": "true"
}Create a DHCP server option group.
POST HTTPS://{switch IP}/rest/v1/running/dhcp-server/option-group
{
"id": 1,
"vendor-specific-information": "0x123"
}Create a DHCP server IPv4 address pool.
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",
}
]
}Create a DHCP server class for an IPv4 address pool.
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"
}Create a DHCP server IPv6 address pool.
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"
}Properties Descriptions
DHCP server class instance
Tree Diagrams
+--rw dhcp-server
+--rw class* [name]
| +--rw name
| +--rw rule* [id]
| +--rw id
| +--rw option
| +--rw option-valueTable of Properties
Name | Required | Type/Range | Description |
|---|---|---|---|
dhcp-server | M | | Path-only node, has no configurable value. |
class | M | | (sub-property of dhcp-server) Path-only node, has no configurable value. class of dhcp server |
name | M | string | (sub-property of class) |
rule | M | | (sub-property of class) Path-only node, has no configurable value. |
id | M | 1..16 | (sub-property of rule) DHCP server class rule id. |
option | M | "circuit-id" "remote-id" "pxe-system-type" | (sub-property of rule) Some option fields in the DHCP protocol. |
option-value | M | string | (sub-property of rule) The value of option in the DHCP protocol. |
DHCP server failover instance
Tree Diagrams
+--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) Path-only node, has no configurable value. The list of dhcp failover. |
name | M | string | (sub-property of failover) DHCP failover name. |
peer-down-wait-time | O | 1..3600 | (sub-property of failover) Waiting time to mark the peer as down after the communication is disconnected. |
max-response-delay-time | O | 30..3600 | (sub-property of failover) The maximum time the current server waits for a response from the peer server Default value: 60 |
local-address | O | "A.B.C.D" "Loopback0" | (sub-property of failover) The address of local. |
peer-address | O | A.B.C.D | (sub-property of failover) The IP address of peer. |
role | O | "primary" "secondary" | (sub-property of failover) The current server role |
address-pool-allocation-percentage | O | 1..100 | (sub-property of failover) 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. Default value: 50 |
DHCP server option-group instance
Tree Diagrams
+--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) Path-only node, has no configurable value. |
id | M | 1..65535 | (sub-property of option-group) ID of DHCP option group |
bootfile-name | M | | (sub-property of option-group) Path-only node, has no configurable value. The location of the boot file used by the client to start the system. |
bootfile-name | O | string | (sub-property of bootfile-name) The location of the boot file used by the client to start the system. |
force | O | "true" "false" | (sub-property of bootfile-name) Force send this option to client. Default value: "false" |
capwap-ac-address | O | A.B.C.D | (sub-property of option-group) IP address of ac. |
vendor-specific-information | M | | (sub-property of option-group) Path-only node, has no configurable value. Set option43. |
vendor-specific-information | O | a hexadecimal number string | (sub-property of vendor-specific-information) The value of option43 is usually in hexadecimal. eg."0x5636" |
force | O | "true" "false" | (sub-property of vendor-specific-information) Force send this option to client. Default value: "false" |
default-gateway | O | A.B.C.D | (sub-property of option-group) Specify the IP address of the default gateway. |
tftp-server | O | string | (sub-property of option-group) Specify the IP address or domain name of the tftp server. |
DHCP server IPv4 pool
Tree Diagrams
+--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) Path-only node, has no configurable value. |
name | M | string | (sub-property of v4-pool) dhcp pool name |
network | O | A.B.C.D/M | (sub-property of v4-pool) Specify the network segment of the DHCP pool. |
start-ip | O | A.B.C.D | (sub-property of v4-pool) Specify the starting IP address of the DHCP pool. |
end-ip | O | A.B.C.D | (sub-property of v4-pool) Specify the end IP address of the DHCP pool. |
domain-name-server | O | A.B.C.D | (sub-property of v4-pool) IP address of DNS server. |
bootfile-name | M | | (sub-property of v4-pool) Path-only node, has no configurable value. The location of the boot file used by the client to start the system. |
bootfile-name | O | string | (sub-property of bootfile-name) The location of the boot file used by the client to start the system. |
force | O | "true" "false" | (sub-property of bootfile-name) Force send this option to client. Default value: "false" |
capwap-ac-address | O | A.B.C.D | (sub-property of v4-pool) IP address of ac. |
vendor-specific-information | M | | (sub-property of v4-pool) Path-only node, has no configurable value. Set option43. |
vendor-specific-information | O | a hexadecimal number string | (sub-property of vendor-specific-information) The value of option43 is usually in hexadecimal. eg. "0x1f" |
force | O | "true" "false" | (sub-property of vendor-specific-information) Force send this option to client. Default value: "false" |
default-gateway | O | A.B.C.D | (sub-property of v4-pool) Specify the IP address of the default gateway. |
tftp-server | O | string | (sub-property of v4-pool) Specify the IP address or domain name of the tftp server. |
default-lease-time | O | 300..100000000 | (sub-property of v4-pool) Default lease time. Default value: 604800 |
max-lease-time | O | 300..100000000 | (sub-property of v4-pool) Maximum lease time. Default value: 2592000 |
vlan | O | Vlan1..4094 | (sub-property of v4-pool) |
next-server | O | A.B.C.D | (sub-property of v4-pool) IP address of tftp server |
failover | O | string | (sub-property of v4-pool) Class-bound failover. |
class | M | | (sub-property of v4-pool) Path-only node, has no configurable value. Class bound to dhcp pool |
class-name | M | string | (sub-property of class) The bound class name. |
start-ip | O | A.B.C.D | (sub-property of class) 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) Set the rules in this class to apply to the end IP address of the IP segment. |
failover | O | string | (sub-property of class) Class-bound failover. |
option-group | O | 0..65535 | (sub-property of class) Class-bound option-group. |
DHCP server IPv6 pool
Tree Diagrams
+--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) Path-only node, has no configurable value. |
name | M | string | (sub-property of v6-pool) dhcp pool name |
network | O | XX:XX:XX:XX:XX:XX:XX:XX/M | (sub-property of v6-pool) 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) 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) 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) IP address of DNS server. |
default-lease-time | O | 300..100000000 | (sub-property of v6-pool) Default lease time. Default value: 604800 |
max-lease-time | O | 300..100000000 | (sub-property of v6-pool) Maximum lease time. Default value: 2592000 |
vlan | O | Vlan1..4094 | (sub-property of v6-pool) |
DHCP server interfaces
Tree Diagrams
+--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) Path-only node, has no configurable value. List of interfaces enabled to the DHCP pool |
name | M | Ethernet name Vlan1..4094 | (sub-property of interfaces) |
enabled | O | "true" "false" | (sub-property of interfaces) |
Show-dhcp-pool-expired
Tree Diagrams
+---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. Show DHCP server expired lease. |
version | O | "v4" "v6" | (sub-property of input) The family of the pool. |
data | RO | <anydata> | (sub-property of output) |
Show-dhcp-pool-info
Tree Diagrams
+---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. Show DHCP server pool info. |
version | O | "v4" "v6" | (sub-property of input) The family of the pool. |
data | RO | <anydata> | (sub-property of output) |
show-dhcp-pool-ip-in-use
Tree Diagrams
+---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. Show DHCP server lease. |
version | O | "v4" "v6" | (sub-property of input) The family of the pool. |
address | O | A.B.C.D XX:XX:XX:XX:XX:XX:XX:XX | (sub-property of input) |
data | RO | <anydata> | (sub-property of output) |