summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJernej Jakob <jernej.jakob@gmail.com>2019-12-06 18:17:57 +0100
committerJernej Jakob <jernej.jakob@gmail.com>2019-12-13 08:49:40 +0100
commit8f71162fb28cb3d73bb5b0c5003d338972134f5c (patch)
tree50d00c389f0aa3de54625bbc2508b75637e0933f
parenta5259aefccdcac71c4b193cd16afda68e4a40c5c (diff)
downloadvyos-documentation-8f71162fb28cb3d73bb5b0c5003d338972134f5c.tar.gz
vyos-documentation-8f71162fb28cb3d73bb5b0c5003d338972134f5c.zip
dhcp: add op-mode commands description
-rw-r--r--docs/services/dhcp.rst48
1 files changed, 48 insertions, 0 deletions
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 <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 <pool>
+
+Show only leases in the specified pool.
+
+.. opcmd:: show dhcp server leases sort <key>
+
+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 <state>
+
+Show only leases with the specified state. Possible states: all, active, free, expired, released, abandoned, reset, backup (default = active)
+
DHCPv6 Server
=============