diff options
author | Robert Göhler <github@ghlr.de> | 2022-08-16 15:24:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-16 15:24:16 +0200 |
commit | 0599c6cb41d113e4d71706470ea1414c9349bf7b (patch) | |
tree | 814d7288550f7c1074881e295520b69b31c5b363 /docs | |
parent | 61ce38a4828ecfb3dc526a68b1c64318f3288bc9 (diff) | |
parent | e3c911777f89d5710e9c303579efd6645252ef55 (diff) | |
download | vyos-documentation-0599c6cb41d113e4d71706470ea1414c9349bf7b.tar.gz vyos-documentation-0599c6cb41d113e4d71706470ea1414c9349bf7b.zip |
Merge pull request #834 from evie404/static-mapping
Add ipv4 DHCP static mapping example and fix ipv6 DHCP static mapping show output
Diffstat (limited to 'docs')
-rw-r--r-- | docs/configuration/service/dhcp-server.rst | 44 |
1 files changed, 29 insertions, 15 deletions
diff --git a/docs/configuration/service/dhcp-server.rst b/docs/configuration/service/dhcp-server.rst index 63f47a35..3f4b7b89 100644 --- a/docs/configuration/service/dhcp-server.rst +++ b/docs/configuration/service/dhcp-server.rst @@ -232,6 +232,27 @@ inside the subnet definition but can be outside of the range statement. .. hint:: This is the equivalent of the host block in dhcpd.conf of isc-dhcpd. +**Example:** + +* IP address ``192.168.1.100`` shall be statically mapped to client named ``client100`` + +.. code-block:: none + + set service dhcp-server shared-network-name 'NET1' subnet 192.168.1.0/24 static-mapping client1 ip-address 192.168.1.100 + set service dhcp-server shared-network-name 'NET1' subnet 192.168.1.0/24 static-mapping client1 mac-address aa:bb:11:22:33:00 + +The configuration will look as follows: + +.. code-block:: none + + show service dhcp-server shared-network-name NET1 + subnet 192.168.1.0/24 { + static-mapping client1 { + ip-address 192.168.1.100 + mac-address aa:bb:11:22:33:00 + } + } + Options ======= @@ -694,21 +715,14 @@ The configuration will look as follows: .. code-block:: none - show service dhcp-server shared-network-name NET1 - shared-network-name NET1 { - subnet 2001:db8::/64 { - name-server 2001:db8:111::111 - address-range { - start 2001:db8::100 { - stop 2001:db8::199 { - } - } - static-mapping client1 { - ipv6-address 2001:db8::101 - identifier 00:01:00:01:12:34:56:78:aa:bb:cc:dd:ee:ff - } - } - } + show service dhcpv6-server shared-network-name NET1 + subnet 2001:db8::/64 { + static-mapping client1 { + identifier 00:01:00:01:12:34:56:78:aa:bb:cc:dd:ee:ff + ipv6-address 2001:db8::101 + ipv6-prefix 2001:db8:0:101::/64 + } + } .. start_vyoslinter |