summaryrefslogtreecommitdiff
path: root/docs/services/dhcp.rst
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-01-04 16:19:19 +0100
committerChristian Poessinger <christian@poessinger.com>2020-01-04 16:25:54 +0100
commit389f5fb8e5e4824e6f6be144d08f537540d8b1dc (patch)
tree82ac1791e7a1046c0430da2503eb18da4ea1c91f /docs/services/dhcp.rst
parent3bc405eaa0e6dc5b6eb411a060ebb79325b409fa (diff)
downloadvyos-documentation-389f5fb8e5e4824e6f6be144d08f537540d8b1dc.tar.gz
vyos-documentation-389f5fb8e5e4824e6f6be144d08f537540d8b1dc.zip
dhcp: add dedicated failover example
Diffstat (limited to 'docs/services/dhcp.rst')
-rw-r--r--docs/services/dhcp.rst39
1 files changed, 39 insertions, 0 deletions
diff --git a/docs/services/dhcp.rst b/docs/services/dhcp.rst
index 36ca3e17..166f24a8 100644
--- a/docs/services/dhcp.rst
+++ b/docs/services/dhcp.rst
@@ -102,6 +102,45 @@ explicitly by the following statements.
that the failover partnership is immune to disruption (accidental or
otherwise) via third parties.
+Example
+^^^^^^^
+
+* Setup DHCP failover for network 192.0.2.0/24
+* Default gateway and DNS server is at `192.0.2.254`
+* The primary DHCP server uses address `192.168.189.252`
+* The secondary DHCP server uses address `192.168.189.253`
+* DHCP range spans from `192.168.189.10` - `192.168.189.250`
+
+Primary
+"""""""
+
+.. code-block:: none
+
+ set service dhcp-server shared-network-name NET-VYOS subnet 192.0.2.0/24 default-router '192.0.2.254'
+ set service dhcp-server shared-network-name NET-VYOS subnet 192.0.2.0/24 dns-server '192.0.2.254'
+ set service dhcp-server shared-network-name NET-VYOS subnet 192.0.2.0/24 domain-name 'vyos.net'
+ set service dhcp-server shared-network-name NET-VYOS subnet 192.0.2.0/24 failover local-address '192.168.189.252'
+ set service dhcp-server shared-network-name NET-VYOS subnet 192.0.2.0/24 failover name 'NET-VYOS'
+ set service dhcp-server shared-network-name NET-VYOS subnet 192.0.2.0/24 failover peer-address '192.168.189.253'
+ set service dhcp-server shared-network-name NET-VYOS subnet 192.0.2.0/24 failover status 'primary'
+ set service dhcp-server shared-network-name NET-VYOS subnet 192.0.2.0/24 range 0 start '192.168.189.10'
+ set service dhcp-server shared-network-name NET-VYOS subnet 192.0.2.0/24 range 0 stop '192.168.189.250'
+
+Secondary
+"""""""""
+
+.. code-block:: none
+
+ set service dhcp-server shared-network-name NET-VYOS subnet 192.0.2.0/24 default-router '192.0.2.254'
+ set service dhcp-server shared-network-name NET-VYOS subnet 192.0.2.0/24 dns-server '192.0.2.254'
+ set service dhcp-server shared-network-name NET-VYOS subnet 192.0.2.0/24 domain-name 'vyos.net'
+ set service dhcp-server shared-network-name NET-VYOS subnet 192.0.2.0/24 failover local-address '192.168.189.253'
+ set service dhcp-server shared-network-name NET-VYOS subnet 192.0.2.0/24 failover name 'NET-VYOS'
+ set service dhcp-server shared-network-name NET-VYOS subnet 192.0.2.0/24 failover peer-address '192.168.189.252'
+ set service dhcp-server shared-network-name NET-VYOS subnet 192.0.2.0/24 failover status 'primary'
+ set service dhcp-server shared-network-name NET-VYOS subnet 192.0.2.0/24 range 0 start '192.168.189.10'
+ set service dhcp-server shared-network-name NET-VYOS subnet 192.0.2.0/24 range 0 stop '192.168.189.250'
+
Static mappings
---------------