+ doc: DHCP static leases
This commit is contained in:
parent
fa47fa3f9c
commit
49b91b4fc9
|
@ -19,9 +19,11 @@ Contents:
|
||||||
* Update client
|
* Update client
|
||||||
* Delete client
|
* Delete client
|
||||||
* Enable DHCP server
|
* Enable DHCP server
|
||||||
|
* "Show DHCP status" command
|
||||||
* "Check DHCP" command
|
* "Check DHCP" command
|
||||||
* "Enable DHCP" command
|
* "Enable DHCP" command
|
||||||
* Static IP check/set
|
* Static IP check/set
|
||||||
|
* Add a static lease
|
||||||
|
|
||||||
|
|
||||||
## First startup
|
## First startup
|
||||||
|
@ -302,6 +304,38 @@ Algorithm:
|
||||||
* UI shows the status
|
* UI shows the status
|
||||||
|
|
||||||
|
|
||||||
|
### "Show DHCP status" command
|
||||||
|
|
||||||
|
Request:
|
||||||
|
|
||||||
|
GET /control/dhcp/status
|
||||||
|
|
||||||
|
Response:
|
||||||
|
|
||||||
|
200 OK
|
||||||
|
|
||||||
|
{
|
||||||
|
"config":{
|
||||||
|
"enabled":false,
|
||||||
|
"interface_name":"...",
|
||||||
|
"gateway_ip":"...",
|
||||||
|
"subnet_mask":"...",
|
||||||
|
"range_start":"...",
|
||||||
|
"range_end":"...",
|
||||||
|
"lease_duration":60,
|
||||||
|
"icmp_timeout_msec":0
|
||||||
|
},
|
||||||
|
"leases":[
|
||||||
|
{"ip":"...","mac":"...","hostname":"...","expires":"..."}
|
||||||
|
...
|
||||||
|
],
|
||||||
|
"static_leases":[
|
||||||
|
{"ip":"...","mac":"...","hostname":"..."}
|
||||||
|
...
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
### "Check DHCP" command
|
### "Check DHCP" command
|
||||||
|
|
||||||
Request:
|
Request:
|
||||||
|
@ -428,6 +462,40 @@ If we would set a different IP address, we'd need to replace the IP address for
|
||||||
ip addr replace dev eth0 192.168.0.1/24
|
ip addr replace dev eth0 192.168.0.1/24
|
||||||
|
|
||||||
|
|
||||||
|
### Add a static lease
|
||||||
|
|
||||||
|
Request:
|
||||||
|
|
||||||
|
POST /control/dhcp/add_static_lease
|
||||||
|
|
||||||
|
{
|
||||||
|
"mac":"...",
|
||||||
|
"ip":"...",
|
||||||
|
"hostname":"..."
|
||||||
|
}
|
||||||
|
|
||||||
|
Response:
|
||||||
|
|
||||||
|
200 OK
|
||||||
|
|
||||||
|
|
||||||
|
### Remove a static lease
|
||||||
|
|
||||||
|
Request:
|
||||||
|
|
||||||
|
POST /control/dhcp/remove_static_lease
|
||||||
|
|
||||||
|
{
|
||||||
|
"mac":"...",
|
||||||
|
"ip":"...",
|
||||||
|
"hostname":"..."
|
||||||
|
}
|
||||||
|
|
||||||
|
Response:
|
||||||
|
|
||||||
|
200 OK
|
||||||
|
|
||||||
|
|
||||||
## Device Names and Per-client Settings
|
## Device Names and Per-client Settings
|
||||||
|
|
||||||
When a client requests information from DNS server, he's identified by IP address.
|
When a client requests information from DNS server, he's identified by IP address.
|
||||||
|
|
Loading…
Reference in New Issue