From 8f71162fb28cb3d73bb5b0c5003d338972134f5c Mon Sep 17 00:00:00 2001 From: Jernej Jakob Date: Fri, 6 Dec 2019 18:17:57 +0100 Subject: dhcp: add op-mode commands description --- docs/services/dhcp.rst | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/docs/services/dhcp.rst b/docs/services/dhcp.rst index 62e45644..87ff11ba 100644 --- a/docs/services/dhcp.rst +++ b/docs/services/dhcp.rst @@ -321,6 +321,54 @@ Example Override the static-mapping's dns-server with a custom one that will be sent only to this host. +Operation Mode +-------------- + +.. opcmd:: restart dhcp server + +Restart the DHCP server + +.. opcmd:: show dhcp server statistics + +Show the DHCP server statistics: + +.. code-block:: none + + vyos@vyos:~$ show dhcp server statistics + Pool Size Leases Available Usage + ----------- ------ -------- ----------- ------- + dhcpexample 99 2 97 2% + +.. opcmd:: show dhcp server statistics pool + +Show the DHCP server statistics for the specified pool. + +.. opcmd:: show dhcp server leases + +Show statuses of all active leases: + +.. code-block:: none + + vyos@vyos:~$ show dhcp server leases + IP address Hardware address State Lease start Lease expiration Remaining Pool Hostname + -------------- ------------------ ------- ------------------- ------------------- ---------- ----------- --------- + 192.0.2.104 aa:bb:cc:dd:ee:ff active 2019/12/05 14:24:23 2019/12/06 02:24:23 6:05:35 dhcpexample test1 + 192.0.2.115 ab:ac:ad:ae:af:bf active 2019/12/05 18:02:37 2019/12/06 06:02:37 9:43:49 dhcpexample test2 + +.. hint:: Static mappings aren't shown. To show all states, use ``show dhcp server leases state all``. + +.. opcmd:: show dhcp server leases pool + +Show only leases in the specified pool. + +.. opcmd:: show dhcp server leases sort + +Sort the output by the specified key. Possible keys: ip, hardware_address, state, start, end, remaining, pool, hostname (default = ip) + +.. opcmd:: show dhcp server leases state + +Show only leases with the specified state. Possible states: all, active, free, expired, released, abandoned, reset, backup (default = active) + DHCPv6 Server ============= -- cgit v1.2.3