dhcp¶
ibox.dhcp in the library, ibox dhcp in the CLI.
DHCPv4 and DHCPv6 server settings and leases.
static_leases ¶
Get the fixed IP addresses reserved for devices (static DHCP leases).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pool
|
str
|
"default" for the home network, "guest" for the guest Wi-Fi. Default is "default". |
'default'
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
response content |
add_static_lease ¶
Reserve an IP address for a device (static DHCP lease).
The device gets the address the next time it renews its lease, e.g. when it reconnects. In the guest pool, the router refuses an address outside its network (10.128.0.0/16) and the router's own. A reservation for a device the router doesn't know yet adds the device to the device list (devices.get()).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mac
|
str
|
device MAC address, e.g. "AA:BB:CC:DD:EE:FF". |
required |
ip
|
str
|
IPv4 address in the pool's network, e.g. "192.168.1.20", or "10.128.0.20" for the guest Wi-Fi (see server_pool()). |
required |
pool
|
str
|
"default" for the home network, "guest" for the guest Wi-Fi. Default is "default". |
'default'
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
response content |
delete_static_lease ¶
Remove a device's IP address reservation (static DHCP lease).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mac
|
str
|
device MAC address. |
required |
pool
|
str
|
"default" for the home network, "guest" for the guest Wi-Fi. Default is "default". |
'default'
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
response content |
ipv6_server_status ¶
Get whether the router's DHCPv6 server, which gives devices their IPv6 settings, runs: "Enabled" or "Disabled".