summaryrefslogtreecommitdiffstats
path: root/raddb/mods-config/files/dhcp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:49:46 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:49:46 +0000
commit50b37d4a27d3295a29afca2286f1a5a086142cec (patch)
tree9212f763934ee090ef72d823f559f52ce387f268 /raddb/mods-config/files/dhcp
parentInitial commit. (diff)
downloadfreeradius-upstream.tar.xz
freeradius-upstream.zip
Adding upstream version 3.2.1+dfsg.upstream/3.2.1+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'raddb/mods-config/files/dhcp')
-rw-r--r--raddb/mods-config/files/dhcp153
1 files changed, 153 insertions, 0 deletions
diff --git a/raddb/mods-config/files/dhcp b/raddb/mods-config/files/dhcp
new file mode 100644
index 0000000..04f37b5
--- /dev/null
+++ b/raddb/mods-config/files/dhcp
@@ -0,0 +1,153 @@
+#
+# This configuration file that may be used by multiple instances of rlm_files
+# to set reply and control options for defining DHCP replies.
+#
+# The content of this file is all made up and needs to be set appropriate to
+# the network being served.
+#
+
+############################################
+# Global and network-specific parameters #
+############################################
+
+#
+# Note: This section is matched by calling the dhcp_network instance of the
+# files module.
+#
+
+
+#
+# Default options that can be overridden by subsequent matches.
+#
+network
+ DHCP-Domain-Name-Server := 192.0.1.100,
+ DHCP-Domain-Name-Server += 192.0.1.101,
+ DHCP-Time-Server := 192.0.1.200,
+ DHCP-Domain-Name := "example.org",
+ DHCP-IP-Address-Lease-Time := 7200,
+ Fall-Through := yes
+
+
+#
+# The following examples set options specific to the Layer 2 network, matched
+# on whether the internal attribute DHCP-Network-Subnet (that acts as a
+# network identifier) is within the indicated range. This is equivalent to a
+# "shared-network" or "multinet" configuration (i.e. one that is possibly
+# composed of multiple subnets) as defined by some other DHCP servers.
+#
+
+#
+# Here is an example for a network containing a single IP subnet. We can set
+# the network-specific options *and* we directly set the DHCP-Subnet-Mask,
+# DHCP-Router-Address and DHCP-Broadcast-Address since it is a common reply
+# parameter for all DHCP requests originating from this network.
+#
+# The use of the ^= "prepend" operator for setting DHCP-Domain-Name-Server
+# results in this new value being inserted at the start of the list, meaning
+# this will become the first DNS server presented in the reply.
+#
+# Note: If the architecture has only a single subnet for each Layer 2 network
+# then by placing all subnet-related options here we can avoid calling the
+# dhcp_subnet policy after IP allocation.
+#
+network DHCP-Network-Subnet < 10.20.0.0/16, Pool-Name := "smalldept"
+ DHCP-IP-Address-Lease-Time := 3600,
+ DHCP-Domain-Name := "smalldept.example.org",
+ DHCP-Subnet-Mask := 255.255.0.0,
+ DHCP-Router-Address := 10.20.0.1,
+ DHCP-Domain-Name-Server ^= 10.20.0.2,
+ DHCP-Broadcast-Address := 10.20.255.255
+
+#
+# Here is an example for a network that consists of multiple IP subnets, each
+# of which is valid for a DHCP request originating from the network. We set
+# the Pool-Name parameter to identify a single pool that contains the IP
+# address within each subnet, any of which is suitable.
+#
+# We set the options that are common to the network but we defer the setting
+# of DHCP-Subnet-Mask, DHCP-Router-Address and DHCP-Broadcast-Address until an
+# address has been allocated. Only then do we know which subnet parameters are
+# required. See the next section.
+#
+network DHCP-Network-Subnet < 10.30.0.0/16, Pool-Name := "bigdept"
+ DHCP-Domain-Name := "bigdept.example.org"
+
+
+#
+# Here is an example for a network that has a dedicated pool for admin staff
+# and a seperate pool for everything else.
+#
+network DHCP-Network-Subnet < 192.0.2.0/24, DHCP-Group-Name == "admin", Pool-Name := "admin-only"
+network DHCP-Network-Subnet < 192.0.2.0/24, Pool-Name := "general"
+
+
+################################
+# Subnet-specific parameters #
+################################
+
+#
+# Note: This section is matched by calling the dhcp_subnet policy which sets
+# DHCP-Network-Subnet to the allocated IP address of the device and then
+# calls the dhcp_subnet instance of the files module.
+#
+# Layer 2 networks many contain multiple subnets, each with their own gateway.
+# We call this section *after* the allocation of an IP address (e.g. from a
+# single pool containing addresses within multiple equally-valid subnets for
+# the network) so that we then know which subnet-specific parameters to
+# return.
+#
+
+#
+# Subnet-specific options, matched on whether the allocated IP address is
+# within the indicated range.
+#
+subnet DHCP-Network-Subnet < 10.30.10.0/24
+ DHCP-Subnet-Mask := 255.255.255.0,
+ DHCP-Router-Address := 10.30.10.1,
+ DHCP-Broadcast-Address := 10.30.10.255
+
+subnet DHCP-Network-Subnet < 10.30.20.0/24
+ DHCP-Subnet-Mask := 255.255.255.0,
+ DHCP-Router-Address := 10.30.20.1,
+ DHCP-Broadcast-Address := 10.30.20.255
+
+
+###############################
+# Group-specific parameters #
+###############################
+
+#
+# Note: This section is matched by calling the dhcp_group_options policy.
+#
+# It should be called *after* defining the device's group memberships in
+# DHCP-Group-Name request attributes. In the default dhcp virtual server this
+# is demonstrated with the help of the dhcp_group_membership instance of the
+# passwd module.
+#
+
+#
+# Group-specific options, keyed by DHCP-Group-Name
+#
+group1
+ DHCP-Server-Host-Name := "terminal-booter.example.org",
+ DHCP-Boot-Filename := "bootfile.pxe"
+
+
+##############################
+# Host-specific parameters #
+##############################
+
+#
+# Note: This section is matched by calling the dhcp_hosts instance of the
+# files module.
+#
+
+#
+# Host-specific options, keyed by DHCP-Client-Hardware-Address
+#
+host-00:10:20:30:40:50
+ DHCP-Boot-Filename := "customboot.pxe"
+
+host-10:90:80:70:aa:bb
+ DHCP-X-Window-Font-Server := 10.20.1.10,
+ DHCP-Impress-Server := 10.20.1.20