From 1b65bcf2f7aae8d3501528d879f1bd00524553c8 Mon Sep 17 00:00:00 2001 From: Ricky Pai Date: Fri, 12 Aug 2022 10:08:35 -0700 Subject: ipv4 static mapping example --- docs/configuration/service/dhcp-server.rst | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/configuration/service/dhcp-server.rst b/docs/configuration/service/dhcp-server.rst index 75f8b8f0..45fe63fb 100644 --- a/docs/configuration/service/dhcp-server.rst +++ b/docs/configuration/service/dhcp-server.rst @@ -225,6 +225,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 ======= -- cgit v1.2.3 From e3c911777f89d5710e9c303579efd6645252ef55 Mon Sep 17 00:00:00 2001 From: Ricky Pai Date: Fri, 12 Aug 2022 10:09:07 -0700 Subject: fix ipv6 dhcp mapping codeblock --- docs/configuration/service/dhcp-server.rst | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/docs/configuration/service/dhcp-server.rst b/docs/configuration/service/dhcp-server.rst index 45fe63fb..46604dfd 100644 --- a/docs/configuration/service/dhcp-server.rst +++ b/docs/configuration/service/dhcp-server.rst @@ -720,21 +720,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 -- cgit v1.2.3