Skip to content
Ask AI

DHCP Server

URLGETPOSTPATCHPUTDELETE
/rest/v1/running/dhcp-serverYNNNN
/rest/v1/running/dhcp-server/class/{name}YYYNY
/rest/v1/running/dhcp-server/class/{name}/rule/{id}YYYNY
/rest/v1/running/dhcp-server/failover/{name}YYYNY
/rest/v1/running/dhcp-server/interfaces/{name}YNYNN
/rest/v1/running/dhcp-server/option-group/{id}YYYNY
/rest/v1/running/dhcp-server/v4-pool/{name}YYYNY
/rest/v1/running/dhcp-server/v4-pool/{name}/class/{class-name}YYYNY
/rest/v1/running/dhcp-server/v6-pool/{name}YYYNY
/rest/v1/rpc/show-dhcp-pool-expiredNYNNN
/rest/v1/rpc/show-dhcp-pool-infoNYNNN
/rest/v1/rpc/show-dhcp-pool-ip-in-useNYNNN
POST HTTPS://{switch IP}/rest/v1/rpc/show-dhcp-pool-expired
POST HTTPS://{switch IP}/rest/v1/rpc/show-dhcp-pool-info
POST HTTPS://{switch IP}/rest/v1/rpc/show-dhcp-pool-ip-in-use
GET HTTPS://{switch IP}/rest/v1/running/dhcp-server
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"},
]
}
POST HTTPS://{switch IP}/rest/v1/running/dhcp-server/class/{name}/rule/3
{
"option": "circuit-id",
"option-value": "123fs"
}
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.

Section titled “Modify DHCP Server configuration on an interface.”
PATCH HTTPS://{switch IP}/rest/v1/running/dhcp-server/interfaces
{
"name": "Ethernet1",
"enabled": "true"
}
POST HTTPS://{switch IP}/rest/v1/running/dhcp-server/option-group
{
"id": 1,
"vendor-specific-information": "0x123"
}
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.

Section titled “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"
}
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"
}

Tree Diagrams

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

Table of Properties

NameRequiredType/RangeDescription
dhcp-serverMPath-only node, has no configurable value.
classM(sub-property of dhcp-server) Path-only node, has no configurable value. class of dhcp server
nameMstring(sub-property of class)
ruleM(sub-property of class) Path-only node, has no configurable value.
idM1..16(sub-property of rule) DHCP server class rule id.
optionM”circuit-id""remote-id""pxe-system-type”(sub-property of rule) Some option fields in the DHCP protocol.
option-valueMstring(sub-property of rule) The value of option in the DHCP protocol.

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

NameRequiredType/RangeDescription
dhcp-serverMPath-only node, has no configurable value.
failoverM(sub-property of dhcp-server) Path-only node, has no configurable value. The list of dhcp failover.
nameMstring(sub-property of failover) DHCP failover name.
peer-down-wait-timeO1..3600(sub-property of failover) Waiting time to mark the peer as down after the communication is disconnected.
max-response-delay-timeO30..3600(sub-property of failover) The maximum time the current server waits for a response from the peer server. Default value: 60
local-addressO”A.B.C.D""Loopback0”(sub-property of failover) The address of local.
peer-addressOA.B.C.D(sub-property of failover) The IP address of peer.
roleO”primary""secondary”(sub-property of failover) The current server
address-pool-allocation-percentageO1..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

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

NameRequiredType/RangeDescription
dhcp-serverMPath-only node, has no configurable value.
option-groupM(sub-property of dhcp-server) Path-only node, has no configurable value.
idM1..65535(sub-property of option-group) ID of DHCP option group
bootfile-nameM(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-nameOstring(sub-property of bootfile-name) The location of the boot file used by the client to start the system.
forceO”true""false”(sub-property of bootfile-name) Force send this option to client. Default value: “false”
capwap-ac-addressOA.B.C.D(sub-property of option-group) IP address of ac.
vendor-specific-informationM(sub-property of option-group) Path-only node, has no configurable value. Set option43.
vendor-specific-informationOa hexadecimal number string(sub-property of vendor-specific-information) The value of option43 is usually in hexadecimal.eg.”0x5636”
forceO”true""false”(sub-property of vendor-specific-information) Force send this option to client. Default value: “false”
default-gatewayOA.B.C.D(sub-property of option-group) Specify the IP address of the default gateway.
tftp-serverOstring(sub-property of option-group) Specify the IP address or domain name of the tftp server.

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

NameRequiredType/RangeDescription
dhcp-serverMPath-only node, has no configurable value.
v4-poolM(sub-property of dhcp-server) Path-only node, has no configurable value.
nameMstring(sub-property of v4-pool) dhcp pool name
networkOA.B.C.D/M(sub-property of v4-pool) Specify the network segment of the DHCP pool.
start-ipOA.B.C.D(sub-property of v4-pool) Specify the starting IP address of the DHCP pool.
end-ipOA.B.C.D(sub-property of v4-pool) Specify the end IP address of the DHCP pool.
domain-name-serverOA.B.C.D(sub-property of v4-pool) IP address of DNS server.
bootfile-nameM(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-nameOstring(sub-property of bootfile-name) The location of the boot file used by the client to start the system.
forceO”true""false”(sub-property of bootfile-name) Force send this option to client. Default value: “false”
capwap-ac-addressOA.B.C.D(sub-property of v4-pool) IP address of ac.
vendor-specific-informationM(sub-property of v4-pool) Path-only node, has no configurable value. Set option43.
vendor-specific-informationOa hexadecimal number string(sub-property of vendor-specific-information) The value of option43 is usually in hexadecimal.eg. “0x1f”
forceO”true""false”(sub-property of vendor-specific-information) Force send this option to client. Default value: “false”
default-gatewayOA.B.C.D(sub-property of v4-pool) Specify the IP address of the default gateway.
tftp-serverOstring(sub-property of v4-pool) Specify the IP address or domain name of the tftp server.
default-lease-timeO300..100000000(sub-property of v4-pool) Default lease time. Default value: 604800
max-lease-timeO300..100000000(sub-property of v4-pool) Maximum lease time. Default value: 2592000
vlanOVlan1..4094(sub-property of v4-pool)
next-serverOA.B.C.D(sub-property of v4-pool) IP address of tftp server
failoverOstring(sub-property of v4-pool) Class-bound failover.
classM(sub-property of v4-pool) Path-only node, has no configurable value. Class bound to dhcp pool
class-nameMstring(sub-property of class) The bound class name.
start-ipOA.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-ipOA.B.C.D(sub-property of class) Set the rules in this class to apply to the end IP address of the IP segment.
failoverOstring(sub-property of class) Class-bound failover.
option-groupO0..65535(sub-property of class) Class-bound option-group.

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

NameRequiredType/RangeDescription
dhcp-serverMPath-only node, has no configurable value.
v6-poolM(sub-property of dhcp-server) Path-only node, has no configurable value.
nameMstring(sub-property of v6-pool) dhcp pool name
networkOXX:XX:XX:XX:XX:XX:XX:XX/M(sub-property of v6-pool) Specify the network segment of the DHCP pool v6.
start-ipOXX:XX:XX:XX:XX:XX:XX:XX(sub-property of v6-pool) Specify the starting IPv6 address of the DHCP pool v6.
end-ipOXX:XX:XX:XX:XX:XX:XX:XX(sub-property of v6-pool) Specify the end IPv6 address of the DHCP pool v6.
domain-name-serverOXX:XX:XX:XX:XX:XX:XX:XX(sub-property of v6-pool) IP address of DNS server.
default-lease-timeO300..100000000(sub-property of v6-pool) Default lease time. Default value: 604800
max-lease-timeO300..100000000(sub-property of v6-pool) Maximum lease time. Default value: 2592000
vlanOVlan1..4094(sub-property of v6-pool)

Tree Diagrams

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

Table of Properties

NameRequiredType/RangeDescription
dhcp-serverMPath-only node, has no configurable value.
interfacesM(sub-property of dhcp-server) Path-only node, has no configurable value. List of interfaces enabled to the DHCP pool
nameMEthernet name Vlan1..4094(sub-property of interfaces)
enabledO”true""false”(sub-property of interfaces)

Tree Diagrams

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

Table of Properties

NameRequiredType/RangeDescription
show-dhcp-pool-expiredMPath-only node, has no configurable value. Show DHCP server expired lease.
versionO”v4""v6”(sub-property of input) The family of the pool.
dataRO(sub-property of output)

Tree Diagrams

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

Table of Properties

NameRequiredType/RangeDescription
show-dhcp-pool-infoMPath-only node, has no configurable value. Show DHCP server pool info.
versionO”v4""v6”(sub-property of input) The family of the pool.
dataRO(sub-property of output)

Tree Diagrams

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

Table of Properties

NameRequiredType/RangeDescription
show-dhcp-pool-ip-in-useMPath-only node, has no configurable value. Show DHCP server lease.
versionO”v4""v6”(sub-property of input) The family of the pool.
addressOA.B.C.D XX:XX:XX:XX:XX:XX:XX:XX(sub-property of input)
dataRO(sub-property of output)