Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dhcp-server: update docs for op-mode command <show dhcp server leases> #1207

Merged
merged 1 commit into from
Dec 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/configuration/firewall/global-options.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
:lastproofread: 2023-12-026
:lastproofread: 2023-12-26

.. _firewall-global-options-configuration:

Expand Down
34 changes: 29 additions & 5 deletions docs/configuration/service/dhcp-server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
Will drop `<shared-network-name>_` from client DNS record, using only the
host declaration name and domain: `<hostname>.<domain-name>`

.. cfgcmd:: set service dhcp-server shared-network-name <name> domain-name <domain-name>

Check warning on line 34 in docs/configuration/service/dhcp-server.rst

View workflow job for this annotation

GitHub Actions / lint

Line too long: len=88

The domain-name parameter should be the domain name that will be appended to
the client's hostname to form a fully-qualified domain-name (FQDN) (DHCP
Expand All @@ -40,7 +40,7 @@
This is the configuration parameter for the entire shared network definition.
All subnets will inherit this configuration item if not specified locally.

.. cfgcmd:: set service dhcp-server shared-network-name <name> domain-search <domain-name>

Check warning on line 43 in docs/configuration/service/dhcp-server.rst

View workflow job for this annotation

GitHub Actions / lint

Line too long: len=90

The domain-name parameter should be the domain name used when completing DNS
request where no full FQDN is passed. This option can be given multiple times
Expand All @@ -49,7 +49,7 @@
This is the configuration parameter for the entire shared network definition.
All subnets will inherit this configuration item if not specified locally.

.. cfgcmd:: set service dhcp-server shared-network-name <name> name-server <address>

Check warning on line 52 in docs/configuration/service/dhcp-server.rst

View workflow job for this annotation

GitHub Actions / lint

Line too long: len=84

Inform client that the DNS server can be found at `<address>`.

Expand Down Expand Up @@ -234,7 +234,7 @@

**Example:**

* IP address ``192.168.1.100`` shall be statically mapped to client named ``client1``

Check warning on line 237 in docs/configuration/service/dhcp-server.rst

View workflow job for this annotation

GitHub Actions / lint

Line too long: len=85

.. code-block:: none

Expand Down Expand Up @@ -549,18 +549,43 @@
.. 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 00:53:01: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 00:53:01:ae:af:bf active 2019/12/05 18:02:37 2019/12/06 06:02:37 9:43:49 dhcpexample test2
IP Address MAC address State Lease start Lease expiration Remaining Pool Hostname Origin
-------------- ----------------- ------- ------------------- ------------------- ----------- -------- ---------- --------
192.168.11.134 00:50:79:66:68:09 active 2023/11/29 09:51:05 2023/11/29 10:21:05 0:24:10 LAN VPCS1 local
192.168.11.133 50:00:00:06:00:00 active 2023/11/29 09:51:38 2023/11/29 10:21:38 0:24:43 LAN VYOS-6 local
10.11.11.108 50:00:00:05:00:00 active 2023/11/29 09:51:43 2023/11/29 10:21:43 0:24:48 VIF-1001 VYOS5 local
192.168.11.135 00:50:79:66:68:07 active 2023/11/29 09:55:16 2023/11/29 09:59:16 0:02:21 remote
vyos@vyos:~$

.. hint:: Static mappings aren't shown. To show all states, use
``show dhcp server leases state all``.

.. opcmd:: show dhcp server leases origin [local | remote]

Show statuses of all active leases granted by local (this server) or
remote (failover server):

.. code-block:: none

vyos@vyos:~$ show dhcp server leases origin remote
IP Address MAC address State Lease start Lease expiration Remaining Pool Hostname Origin
-------------- ----------------- ------- ------------------- ------------------- ----------- -------- ---------- --------
192.168.11.135 00:50:79:66:68:07 active 2023/11/29 09:55:16 2023/11/29 09:59:16 0:02:21 remote
vyos@vyos:~$

.. opcmd:: show dhcp server leases pool <pool>

Show only leases in the specified pool.

.. code-block:: none

vyos@vyos:~$ show dhcp server leases pool LAN
IP Address MAC address State Lease start Lease expiration Remaining Pool Hostname Origin
-------------- ----------------- ------- ------------------- ------------------- ----------- ------ ---------- --------
192.168.11.134 00:50:79:66:68:09 active 2023/11/29 09:51:05 2023/11/29 10:21:05 0:23:55 LAN VPCS1 local
192.168.11.133 50:00:00:06:00:00 active 2023/11/29 09:51:38 2023/11/29 10:21:38 0:24:28 LAN VYOS-6 local
vyos@vyos:~$

.. opcmd:: show dhcp server leases sort <key>

Sort the output by the specified key. Possible keys: ip, hardware_address,
Expand All @@ -572,7 +597,6 @@
free, expired, released, abandoned, reset, backup (default = active)



***********
IPv6 server
***********
Expand Down
Loading