summaryrefslogtreecommitdiff
path: root/docs/services/dhcp.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/services/dhcp.rst')
-rw-r--r--docs/services/dhcp.rst36
1 files changed, 17 insertions, 19 deletions
diff --git a/docs/services/dhcp.rst b/docs/services/dhcp.rst
index eb343fb1..e2c8a05e 100644
--- a/docs/services/dhcp.rst
+++ b/docs/services/dhcp.rst
@@ -28,20 +28,18 @@ Prerequisites:
Multiple DHCP ranges can be defined and may contain holes.
-.. code-block:: sh
+.. code-block:: console
- edit service dhcp-server shared-network-name '<name>'
- set authoritative
- set subnet 192.0.2.0/24 default-router 192.0.2.1
- set subnet 192.0.2.0/24 dns-server 192.0.2.1
- set subnet 192.0.2.0/24 lease 86400
- set subnet 192.0.2.0/24 range 0 start 192.0.2.100
- set subnet 192.0.2.0/24 range 0 stop 192.0.2.199
- exit
+ set service dhcp-server shared-network-name '<name>' authoritative
+ set service dhcp-server shared-network-name '<name>' subnet 192.0.2.0/24 default-router 192.0.2.1
+ set service dhcp-server shared-network-name '<name>' subnet 192.0.2.0/24 dns-server 192.0.2.1
+ set service dhcp-server shared-network-name '<name>' subnet 192.0.2.0/24 lease 86400
+ set service dhcp-server shared-network-name '<name>' subnet 192.0.2.0/24 range 0 start 192.0.2.100
+ set service dhcp-server shared-network-name '<name>' subnet 192.0.2.0/24 range 0 stop 192.0.2.199
The generated config will look like:
-.. code-block:: sh
+.. code-block:: console
vyos@vyos# show service dhcp-server shared-network-name '<name>'
authoritative
@@ -99,7 +97,7 @@ Failover
VyOS provides support for DHCP failover:
-.. code-block:: sh
+.. code-block:: console
set service dhcp-server shared-network-name 'LAN' subnet '192.0.2.0/24' \
failover local-address '192.0.2.1'
@@ -113,14 +111,14 @@ VyOS provides support for DHCP failover:
The primary and secondary statements determines whether the server is
primary or secondary
-.. code-block:: sh
+.. code-block:: console
set service dhcp-server shared-network-name 'LAN' subnet '192.0.2.0/24' \
failover status 'primary'
or
-.. code-block:: sh
+.. code-block:: console
set service dhcp-server shared-network-name 'LAN' subnet '192.0.2.0/24' \
failover status 'secondary'
@@ -239,7 +237,7 @@ server. The following example describes a common scenario.
* Address pool shall be ``2001:db8::100`` through ``2001:db8::199``.
* Lease time will be left at the default value which is 24 hours
-.. code-block:: sh
+.. code-block:: console
set service dhcpv6-server shared-network-name 'NET1' subnet 2001:db8::/64 \
address-range start 2001:db8::100 stop 2001:db8::199
@@ -248,7 +246,7 @@ server. The following example describes a common scenario.
The configuration will look as follows:
-.. code-block:: sh
+.. code-block:: console
show service dhcpv6-server
shared-network-name NET1 {
@@ -277,7 +275,7 @@ be created. The following example explains the process.
.. hint:: The MAC address identifier is defined by the last 4 byte of the
MAC address.
-.. code-block:: sh
+.. code-block:: console
set service dhcpv6-server shared-network-name 'NET1' subnet 2001:db8::/64 \
static-mapping client1 ipv6-address 2001:db8::101
@@ -286,7 +284,7 @@ be created. The following example explains the process.
The configuration will look as follows:
-.. code-block:: sh
+.. code-block:: console
show service dhcp-server shared-network-name NET1
shared-network-name NET1 {
@@ -364,7 +362,7 @@ Example
The generated configuration will look like:
-.. code-block:: sh
+.. code-block:: console
show service dhcp-relay
interface eth1
@@ -442,7 +440,7 @@ Example
The generated configuration will look like:
-.. code-block:: sh
+.. code-block:: console
commit
show service dhcpv6-relay