DHCP Server on SLES


To alleviate the need to enter various IP settings on all of your network computers and devices, you can take advantage of Suse Linux Enterprise Server's included DHCP Server. This server allows you to centrally control all of your workstations IP settings, as well as give you the ability to automatically update your DNS Server's records if desired.

Stepping Through the Wizard

Thankfully, Suse Linux Enterprise Server provides a Yast module to configure the DHCP Server. When you first launch this module you are presented with the DHCP Wizard to guide you through the initial steps to setup the DHCP server.

The first screen simply allows you to select the network interface to use when providing IP settings to computers, this screen also provides an easy way to open the appropriate ports on the Firewall to allow the DHCP server to function properly.

DHCP Card Selection

DHCP Wizard - Global Settings

DHCP Server Wizard: Card Selection and Global Settings

The second screen of the DHCP Wizard allows you to enter the relevant information you want to serve to the clients. This includes all the needed IP Address information, as well as additional info such as print, time and WINS servers.

Also on this screen you will set the "Default Lease Time" for the DHCP server. This specifies the amount of time an IP "lease" will be active for before the IP Address is once again available to be given to another computer. This option is specified here at the server level, as well as within other areas. If it is specified in other areas, that one will take precedence.

This screen also gives you the option to store the DHCP information within the LDAP server (if available).

DHCP Server - Dynamic DHCP

DHCP Wizard Start-up

DHCP Server Wizard: Dynamic DHCP and Server Startup

The Dynamic DHCP Screen allows you to specify the range of IP Addresses that you want the Server to "lease" out. You should note that if you want to control what IP Address each computer/device gets (shown in the next section) those IP Addresses should not be in the pool to lease out. More on this later.

Again, this screen gives you the option of fine tuning the Lease Time for these Addresses, this will override what was entered in the previous screen.

At the bottom of this screen, you have the ability to "Synchronize DNS Server". This allows you to either "Create New DNS Zone from Scratch" or "Edit Current DNS Zone". The Create New Zone option will automatically create a DNS Zone (and it's reverse zone) if you haven't already done so. Normally, you should create the zone yourself with the Yast DNS Module.

The "Edit Current DNS Zone" option allows you to manually enter "A"ddress Records into your DNS Zone, among other options. This feature was added with SP1 and I will add more about it after further testing.

The final screen of the Wizard allows you to control whether or not you want the DHCP Server to start at startup or not.

Manually Assigning DHCP Addresses

Once you restart the DHCP Yast Module after you complete the wizard, most of the screens will be exactly the same as the ones with the Wizard (the only real difference is that the "Start-Up" tab allows you to enter Startup Arguments to the DHCP command). You also get 2 additional "tabs", Host Management and Expert Settings.

The Expert Settings tab, when enabled and saved will change the entire interface of the Yast DHCP Module. These changes will be covered in the next section.

The Host Management Screen allows you to manually assign the IP Address a specific computer or device gets "leased". This gives you the option of controlling IP Addresses on your network without having to manually enter them on every computer or device in your network.

DHCP Host Management

DHCP Server: Host Management

A common practice for this is to manually assign IP Addresses to printers through DHCP, this ensures that the same IP Address is assigned to each printer without having to enter the IP Addresses using a proprietary, or hard to use tool provided by the manufacturer.

To manually assign a IP Address, you must first get a list of the MAC Addresses (Ethernet based networks) for all of your Network cards or devices you want to configure. There are quite a few tools available to do this for you. These include:

Once you acquire all of the MAC Addresses, simply enter them into the Host Management screen, along with the computer name and relevant IP Address you want to set and click add. Once you complete this, the next time the computer obtains an IP Address from the DHCP Server, it will be leased the one you specified.

Advanced DHCP Settings

There are many different ways to configure a DHCP Server, the most common way to deploy DHCP is covered with the Standard DHCP Server Yast Module. However, if you want to fine tune your DHCP server, or you want to enable Dynamic DNS, you must enter into the "Expert Settings" mode of the DHCP Yast Module.

When you enter into the "Expert Settings" tab, the entire interface to the Yast Module will change. Although all of the settings provided with the standard mode will still be present, the module is laid out in an entirely different manner, and once you save any settings using the "Expert Settings" mode, you cannot go back to the standard mode.

Advanced DHCP Yast Module's Main Screen

DHCP Declarations Available

The Advanced DHCP Server Yast Module and the Available DHCP Declarations

The main screen of the Advanced DHCP mode allows you to adjust the majority of the settings related to the DHCP Server. You can specify whether or not to start the DHCP Server at boot, whether or not to use a "Chroot Jail" for the server and whether or not to enable LDAP Support to store settings and records. Through the Advanced button, you are provided easy ways to access the DHCP Log, the ability to specify which interface(s) to use (and to open the Firewall), and the ability to manage the TSIG Keys (which is covered in the Dynamic DNS Section).

The truly powerful options come into play when you work with the "Configured Declarations". Here you can add and edit various "declarations" to allow you to fine-tune or micro manage your DHCP setup. Basically declarations allow you to separate your network into different "groups" that you can apply different DHCP settings to (this is a very broad definition). If you do not specify any additional declarations, you can adjust all of the DHCP settings by "Global Options" listed within the declarations.

Here are the various declarations available:

Subnet: This is the most common declaration - for every subnet in your network you must have a subnet declaration covering the settings for that subnet.

Host: This declaration allows you to specify different settings for the specific host (the client computer). The most popular settings for the host is "fixed-address" which allows you to assign a specific IP address and "Hardware" which allows you to enter the MAC Address (Ethernet based host) of the host. Normally the host declarations should be within a "Subnet" declaration.

Shared Network: This declaration allows you to organize different Subnets that are located on the same physical network. Instead of specifying the same parameters for every subnet, create a shared network with those parameters, then add the relevant subnets under the Shared Network.

Group: The group declaration allows you to organize other declarations to specify parameters for every included declaration. You can group "shared networks", "Subnets", "Hosts" as well as other "Groups".

Pool of Addresses: The Pool parameter allows you to specify a group of addresses that can have different parameters applied to them. This is a common way to assign short "Lease" times for unknown clients. Normally this is specified within a Subnet declaration.

Class: The Class declaration allows you to separate your clients into different "Classes" using "match" statements. This declaration is well beyond the scope of this document, but if you want to separate your clients based on various items such as what dhcp client they use, then you will want to investigate this declaration further.

DHCP Parameters Reference

When fine-tuning your DHCP Server, you may have to add additional parameters to the server in order to get it to function properly, or provide the correct information to your clients. Here is a list of the parameters available and a quick description of what they do. Most of these parameters allow you to provide more information about your network to your clients, while some allow you to modify the behaviour of the DHCP Server. The Yast DHCP Server module does a very good job of showing what parameters are available to adjust depending upon what you are editing (i.e. What type of descriptor you are adjusting).

For more information on the DHCP Server, visit it's website at http://www.isc.org/index.pl?/sw/dhcp/.

"allow" "Controls the response of the DHCP server to various sorts of requests. This can be used to allow certain instances, such as bootp, client updates, etc. For more information check the dhcp.conf man page."
"authoritative" "When set, tells your clients that the configuration information about the given network segment is known to be correct and is authoritative."
"ddns-update-style" "When using Dynamic DNS, you must set this to be either ad-hoc or interim, depending upon how you setup DDNS. Set to none if not using DDNS."
"ddns-updates" "Controls whether or not the server will attempt to do a DNS update when a lease is confirmed. Set this to off if you do not want the server to attempt to do updates within a certain declaration.
"default-lease-time" "The time in seconds that will be assigned to a lease, unless the client specifically asks for a certain expiration time."
"deny" "Controls the response of the DHCP server to various sorts of requests. This can be used to allow certain instances, such as bootp, client updates, unknown clients, etc. For more information check the dhcp.conf man page."
"filename" "Allows you to specify the name of the initial boot file which is to be loaded by a client."
"log-facility" "Allows you to specify how the DHCP Server should do it's logging."
"max-lease-time" "The Maximum length in seconds that will be assigned to a lease."
"next-server" "Allows you to specify the host address of the server from which the initial boot file is to be loaded."
"option bootfile-name" "Used to identify a bootstrap file"
"option broadcast-address" "Specifies the broadcast address in use on the client's subnet"
"option dhcp-server-identifier" "Clients use the contents of the 'server identifier' field as the destination address for any DHCP messages unicast to the DHCP server."
"option domain-name" "Specifies the domain name that client should use when resolving hostnames via the Domain Name System."
"option domain-name-servers" "Specifies a list of Domain Name System name servers available to the client"
"option font-servers" "Specifies a list of X Window System Font servers available to the client."
"option host-name" "Specifies the name of the client."
"option interface-mtu" "Specifies the MTU to use on this interface."
"option irc-server" "Specifies a list of IRC servers available to the client."
"option log-servers" "Specifies a list of IRC servers available to the client."
"option lpr-servers" "Specifies a list of line printer servers available to the client."
"option netbios-dd-server" "Specifies a list of RFC 1001/1002 NBDD servers"
"option netbios-name-servers" "Specifies a list of RFC 1001/1002 NBNS name (WINS) servers"
"option netbios-node-type" "The NetBIOS node type option allows NetBIOS over TCP/IP clients which are configurable to be configured as described in RFC 1001/1002. The value is specified as a single octet which identifies the client type."
Possible node types are:
1   B-node: Broadcast - no WINS
2   P-node: Peer - WINS only
4   M-node: Mixed - broadcast then WINS
8   H-node: Hybrid - WINS then broadcast
"option netbios-scope" "Specifies the NetBIOS over TCP/IP scope parameter for the client"
"option nis-domain" "Specifies the name of the client's NIS (Network Information Services) domain."
"option nis-servers" "Specifies a list of IP addresses indicating NIS servers available to the client."
"option nisplus-domain" "Specifies the name of the client's NIS+ domain."
"option nisplus-servers" "Specifies a list of IP addresses indicating NIS+ servers available to the client."
"option ntp-servers" "Specifies a list of IP addresses indicating NTP servers available to the client."
"option pop-server" "Specifies a list of POP3 servers available to the client."
"option root-path" "Specifies the path-name that contains the client's root disk."
"option routers" "Specifies a list of IP addresses for routers on the client's subnet."
"option smtp-server" "Specifies a list of SMTP servers available to the client."
"option static-routes" "Specifies a list of static routes that the client should install in its routing cache."
"option subnet-mask" "Specifies the client's subnet mask."
"option tftp-server-name" "Used to identify a TFTP server."
"option time-servers" "Specifies a list of time servers available to the client"
"option vendor-class-identifier" "Used by some DHCP clients to identify the vendor type and possibly the configuration of a DHCP client."
"option vendor-encapsulated-options" "Contain either a single vendor-specific value or vendor-specific suboptions"
"option x-display-managers" "Specifies a list of systems that are running the X Window System Display Manager and are available to the client"


Google Ad

© 2017 Mike Petersen - All Rights Reserved