8. Configuring <ServerDHCP>

This section describes the configuration parameters of <ServerDHCP>. <ServerDHCP> handles DHCP (Dynamic Host Configuration Protocol) requests by converting them to RADIUS requests. The converted RADIUS requests can be used for authentication and dynamic address allocation.
To serve DHCP requests, Radiator must be able to bind to DHCP server port 67. This typically requires that Radiator is run as root. Because DHCP uses fixed port numbers 67 and 68, there cannot be other DHCP services or Radiator instances configured with <AddressAllocator DHCP> or <ServerDHCP> on the same host, unless separate bind IP addresses are available.
DHCP options in Radiator configuration use the names defined by IANA. For example, DHCP option 51 that is typically known as "lease time" or "IP Address Lease Time" is called "Address Time" in Radiator configuration. For a configuration example, see goodies/server-dhcp.cfg.

8.1. UsernameOption

This string parameter defines the name of the DHCP option that is used as a value for User-Name in the request dispatched to Handler. The default value is Hostname.

8.2. DefaultUsername

This string parameter defines the User-Name that is used in requests dispatched to Handler if UsernameOption does not define this option in the DHCP request. The default value is Unknown-DHCP-User.

8.3. DHCPyiaddrAttr

This string defines the attribute name in RADIUS reply for yiaddr in DHCP replies. The default value is Framed-IP-Address.

8.4. DHCPSubnetMaskAttr

This string defines the attribute name in RADIUS reply for Subnet Mask option in DHCP replies. If this is left empty, DefaultDHCPSubnetMask is used instead. The default value is Framed-IP-Netmask.

8.5. DefaultDHCPSubnetMask

This is a string parameter. If DHCPSubnetMask has no value, this is used instead. Special formatting characters are supported. This has no default value.

8.6. DHCPRouterAttr

This string defines the attribute name in RADIUS reply for Router option in DHCP replies. All instances in the reply are added. This has no default value.

8.7. DHCPDomainServerAttr

This string defines the attribute name in RADIUS reply for Domain Server option in DHCP replies. All instances in the reply are added. This has no default value.

8.8. DHCPAddressTimeAttr

This string defines the attribute name in RADIUS reply for Address Time, also known as lease time, option in DHCP replies. The default value is Session-Timeout.

8.9. DefaultDHCPAddressTime

This is an integer parameter. If DHCPAddressTime has no value, this parameter is used instead. Special formatting characters are supported. The default value is 86400.

8.10. DHCPClientIdentifier

This string defines the value used for Client Id option in DHCP replies. Special formatting characters are supported. The default value is %{User-Name}.