summaryrefslogtreecommitdiffstats
path: root/raddb/mods-config/files/dhcp
blob: 04f37b58316ab9d26ef448ee55e84c0e8e89e118 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
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