\chapter{DHCP Server (ISC-DHCPD 3)} 
\emph{Version 1.2.1 - Date 01.02.2007\\ 
(c) Maximilian Pasternak  <max(at)eisfair(dot)org>} 

 
\section{Abstract}

The DHCP (Dynamic Host Configuration Protocol) is used for automating the
configuration of computers that use TCP/IP. DHCP can be used to automatically
assign IP addresses, to deliver TCP/IP stack configuration parameters such as
the subnet mask and default router, and to provide other configuration
information such as the addresses for printer, time and news servers.\\
(taken from www.dhcp.org)

This package contains the daemon for delivering IP addresses for local
and remote network(s).

This package contains:

\begin{itemize}
    \item ISC DHCP Server 3.0.6   ---  http://www.isc.org/sw/dhcp/
    \item mknbi 1.4.4             ---  http://sourceforge.net/projects/etherboot/
    \item pxelinux 3.53           ---  http://syslinux.zytor.com/index.php
\end{itemize}

Package Features:

\begin{itemize}
    \item Support for dynamic and static IP-adresses
    \item Wins support
    \item Assign IP-adresses to remote networks attatched via a dhcp-relay-router
    \item Out-of-the-box integration with the DNS server BIND9 for Nameserver Updates (DDNS)
    \item Supports Network-boot for discless clients (etherboot and PXE)
\end{itemize}


\section{The DHCP server dhcpd}

The DHCP server provides IP addresses for local networks. It defines a pool
of addresses, which can be given away. Additionally the server sets a time
for the address to be valid. After that time, the client has to renew the
address. Normally the client will get the same address, but you cannot rely
on.

Additionally to the ip address the server sends information about standard
gateway and nameserver. So you do not need to enter any of this values on
your desktop pc if everything is well configured at your DHCP server.
Under windows, you just have to choose something like ``get ip automatically��
unfortunately the configuration differs from version to version.

In addition to normal ip address distribution the server has a special
function to provide the same ip for one host all the time. That's stupid~---
i hear you say but there are reasons to do so. You need not reconfigure
each client pc if some configuration parameter had changed in you network
e.g. the default gateway address or the nameserver.


\section{Configuration}

The configuration can be changed withe the menu item ``Edit Configuration��.
After exiting the editor the configuration will be checked. In case of
errors you should correct the given options.


\subsection{General settings}

\begin{description}

\config{START\_DHCPD}{START\_DHCPD}{STARTDHCPD} 
{
Set this value to 'yes' to activate the dhcp server and distribute ip-adresses
for your lan.

Valid values: \emph{yes,no}
}


\config{DHCPD\_WINSSERVER}{DHCPD\_WINSSERVER}{DHCPDWINSSERVER}
{
Here you can give the adress of one ore more external wins-servers.
This option cannot be used in conjunction with SAMBA!

Default:  \emph{DHCPD\_WINSSERVER=''}
}

\end{description}


\subsection{Dynamic IP Ranges}

\begin{description}

\config{DHCPD\_NIC\_N}{DHCPD\_NIC\_N}{DHCPDNICN}
{
Here you have to enter the number of network interface cards, you want
the server to provide ip addresses.

Default:  \emph{DHCPD\_NIC\_N='1'}
}


\config{DHCPD\_NIC\_x\_ACTIVE}{DHCPD\_NIC\_x\_ACTIVE}{DHCPDNICxACTIVE}
{
This option is used to enable ('yes') or disable ('no') one
entry of the NIC list.

Default:  \emph{DHCPD\_NIC\_1\_ACTIVE='yes'}
}


\config{DHCPD\_NIC\_x\_DEVICE}{DHCPD\_NIC\_x\_DEVICE}{DHCPDNICxDEVICE}
{
Here you have to enter the network interface card, you want the server
to provide ip addresses. Don't use either a nic thats connected to ISP
nor to a lan, another dhcp-server (e.g. fli4l's dhcpd) is running on.

Default:  \emph{DHCPD\_NIC\_1\_DEVICE='eth0'}
}


\config{DHCPD\_NIC\_x\_RANGE}{DHCPD\_NIC\_x\_RANGE}{DHCPDNICxRANGE}
{
For each interface defined before in DHCPD\_NIC\_\%\_DEVICE, you have to
configure a range of ip-addresses, the server can distribute.
Attention! Don't use ip adresses of fixed hosts as gateways or 
other servers.

Default:  \emph{DHCPD\_NIC\_1\_RANGE='192.168.1.100 192.168.1.150'}
}

\end{description}


\subsection{PXE Menu}

\begin{description}

\config{DHCPD\_PXE\_N}{DHCPD\_PXE\_N}{DHCPDPXEN}
{
Here you have to enter the number of entries in the PXE-Bootmenu.
The PXE-Bootmenu will be used for clients with dynamic IP-Adresses.

Default:  \emph{DHCPD\_PXE\_N='1'}
}


\config{DHCPD\_PXE\_x\_NAME}{DHCPD\_PXE\_x\_NAME}{DHCPDPXExNAME}
{
Here you have to enter the Name of the PXE-Bootmenu Configuration.

Default:  \emph{DHCPD\_PXE\_1\_NAME='fli4l'}
}


\config{DHCPD\_PXE\_x\_ACTIVE}{DHCPD\_PXE\_x\_ACTIVE}{DHCPDPXExACTIVE}
{
This option is used to enable ('yes') or disable ('no') one entry
of the PXE-Bootmenu.

Default:  \emph{DHCPD\_PXE\_1\_ACTIVE='no'}
}


\config{DHCPD\_PXE\_x\_DESCRIPTION}{DHCPD\_PXE\_x\_DESCRIPTION}{DHCPDPXExDESCRIPTION}
{
Here you enter the description of the system to be displayed in
the PXE-Bootmenu.

Default:  \emph{DHCPD\_PXE\_1\_DESCRIPTION='fli4l (router)'}
}


\config{DHCPD\_PXE\_x\_KERNEL}{DHCPD\_PXE\_x\_KERNEL}{DHCPDPXExKERNEL}
{
Path to the Kernel which is used for PXE boot. This path is 
relative to {\tt /tftpboot}.

Leave this option empty for local harddisc or floppy boot.

Default:  \emph{DHCPD\_PXE\_1\_KERNEL='fli4l/kernel'}
}


\config{DHCPD\_PXE\_x\_INITRD}{DHCPD\_PXE\_x\_INITRD}{DHCPDPXExINITRD}
{
Path to the initrd which is used for PXE boot. This path is
relative to {\tt /tftpboot}.

Default:  \emph{DHCPD\_PXE\_1\_INITRD='fli4l/rootfs.img'}
}


\config{DHCPD\_PXE\_x\_ROOT}{DHCPD\_PXE\_x\_ROOT}{DHCPDPXExROOT}
{
Path to the rootfs which is used for PXE boot. This path is
relative to {\tt /tftpboot}.

Default:  \emph{DHCPD\_PXE\_1\_ROOT='/dev/tmpfs'}
}


\config{DHCPD\_PXE\_x\_APPEND}{DHCPD\_PXE\_x\_APPEND}{DHCPDPXExAPPEND}
{
Additional options which can be used within the PXE-Bootmenu

Default:  \emph{DHCPD\_PXE\_1\_APPEND=''}
}


\end{description}


\subsection{Static IP Adresses}

\begin{description}

\config{DHCPD\_CLIENT\_N}{DHCPD\_CLIENT\_N}{DHCPDCLIENTN}
{
Tell the server, how many fixed addresse you want to provide. This
is a special distribution of ip addresses and it's done by the hardware
address of the nic. So you need to find out this hardware-address
(ethernet cards have something like this: 00:10:A4:0B:4D:36).
You can find this out by using winipcfg on windows 95/98/Me boxes,
``ipconfig -all�� on NT/2000/XP boxes and ifconfig on linux boxes.

Default:  \emph{DHCPD\_CLIENT\_N='2'}
}


\config{DHCPD\_CLIENT\_x\_NAME}{DHCPD\_CLIENT\_x\_NAME}{DHCPDCLIENTxNAME}
{
Here you can enter a hostname for each client which uses a fixed
address. If you leave this filed empty, a hostname will be generated.

Default:  \emph{DHCPD\_CLIENT\_1\_NAME='fixed-ip-1'}
}


\config{DHCPD\_CLIENT\_x\_ACTIVE}{DHCPD\_CLIENT\_x\_ACTIVE}{DHCPDCLIENTxACTIVE}
{
This option is used to enable ('yes') or disable ('no') one specific
fixed address client.

Default:  \emph{DHCPD\_CLIENT\_1\_ACTIVE='no'}
}


\config{DHCPD\_CLIENT\_x\_MAC}{DHCPD\_CLIENT\_x\_MAC}{DHCPDCLIENTxMAC}
{
Enter the first hardware-address here. You will have to build as many
entries counting up \% (starting at 1) as you have declared in
DHCPD\_CLIENT\_N.

Default:  \emph{DHCPD\_CLIENT\_1\_MAC='00:01:02:03:04:06:07'}
}


\config{DHCPD\_CLIENT\_x\_IP}{DHCPD\_CLIENT\_x\_IP}{DHCPDCLIENTxIP}
{
This entry contains the corresponding ip address to DHCPD\_CLIENT\_\%\_MAC.
Attention: don't use ip addresses from DHCPD\_NIC\_\%\_RANGE!

Default:  \emph{DHCPD\_CLIENT\_1\_IP='192.168.1.2'}
}


\config{DHCPD\_CLIENT\_x\_PXE\_KERNEL}{DHCPD\_CLIENT\_x\_PXE\_KERNEL}{DHCPDCLIENTxPXEKERNEL}
{
If you want to use discless clients you can use this option
to specify the kernel to be provided to each client.

The kernel has to be placed in /tftpboot/{\it DHCPD\_CLIENT\_x\_NAME}
and be named as given here. Pxelinux will be used to transfer the
kernel, the pxelinux configuration will be generated automatically.

Leave this option empty for local harddisc or floppy boot.

Default:  \emph{DHCPD\_CLIENT\_1\_PXE\_KERNEL=''}
}


\config{DHCPD\_CLIENT\_x\_PXE\_INITRD}{DHCPD\_CLIENT\_x\_PXE\_INITRD}{DHCPDCLIENTxPXEINITRD}
{
Here you have to specify the name of the initrd which should
be transfered with DHCPD\_CLIENT\_x\_PXE\_KERNEL. This has
to placed in the same folder as the kernel.

Default:  \emph{DHCPD\_CLIENT\_1\_PXE\_INITRD=''}
}


\config{DHCPD\_CLIENT\_x\_PXE\_ROOT}{DHCPD\_CLIENT\_x\_PXE\_ROOT}{DHCPDCLIENTxPXEROOT}
{
Here you have to specify the name of the rootfs which should
be transfered with DHCPD\_CLIENT\_x\_PXE\_KERNEL. This has
to placed in the same folder as the kernel.

Default:  \emph{DHCPD\_CLIENT\_1\_PXE\_ROOT=''}
}


\config{DHCPD\_CLIENT\_x\_PXE\_APPEND}{DHCPD\_CLIENT\_x\_PXE\_APPEND}{DHCPDCLIENTxPXEAPPEND}
{
You can use this option if you want to specify additional
parameters if you are using pxelinux.

Example:  \emph{DHCPD\_CLIENT\_1\_PXE\_APPEND='root=/dev/tmpfs'}

Default:  \emph{DHCPD\_CLIENT\_1\_PXE\_APPEND=''}
}


\config{DHCPD\_CLIENT\_x\_NETBOOT}{DHCPD\_CLIENT\_x\_NETBOOT}{DHCPDCLIENTxNETBOOT}
{
If you want to use discless clients you can use this option
to specify the images to be provided to each client.

All images have to be placed in /tftpboot and the filename
must not include the directory /tftpboot 
(use DHCPD\_CLIENT\_3\_NETBOOT='3c90x.zpxe' for /tftpboot/3c90x.zpxe).

You can either specify a PXE or an Etherboot file.

You should leave this empty, if you are using pxelinux configured
by DHCPD\_CLIENT\_x\_PXE\_KERNEL.

Default:  \emph{DHCPD\_CLIENT\_1\_NETBOOT=''}
}

\end{description}


\subsection{Remote Networks}

\begin{description}

\config{DHCPD\_EXTRA\_N}{DHCPD\_EXTRA\_N}{DHCPDEXTRAN}
{
Here you have to enter the number of remote networks, you want
the server to provide ip addresses via a dhcp relay.

Default:  \emph{DHCPD\_EXTRA\_N='0'}
}


\config{DHCPD\_EXTRA\_x\_ACTIVE}{DHCPD\_EXTRA\_x\_ACTIVE}{DHCPDEXTRAxACTIVE}
{
This option is used to enable ('yes') or disable ('no') one
entry of the remote networks list.

Default:  \emph{DHCPD\_EXTRA\_1\_ACTIVE='no'}
}


\config{DHCPD\_EXTRA\_x\_RANGE}{DHCPD\_EXTRA\_x\_RANGE}{DHCPDEXTRAxRANGE}
{
Here you can specify additional adress ranges, which are managed
by this dhcp-server. In opposite to DHCPD\_NIC\_\%\_RANGE, these are
networks which are not connected to the server directly.
The router to that network has to provide DHCP-RELAY services.

Default:  \emph{DHCPD\_EXTRA\_1\_RANGE='192.168.6.100 192.168.6.150'}
}


\config{DHCPD\_EXTRA\_x\_NETMASK}{DHCPD\_EXTRA\_x\_NETMASK}{DHCPDEXTRAxNETMASK}
{
Netmask for the remote network.

Default:  \emph{DHCPD\_EXTRA\_1\_NETMASK='255.255.255.0'}
}


\config{DHCPD\_EXTRA\_x\_DNS\_SERVER}{DHCPD\_EXTRA\_x\_DNS\_SERVER}{DHCPDEXTRAxDNSSERVER}
{
DNS-Server for the remote network.

Default:  \emph{DHCPD\_EXTRA\_1\_DNS\_SERVER='192.168.6.1'}
}


\config{DHCPD\_EXTRA\_x\_GATEWAY}{DHCPD\_EXTRA\_x\_GATEWAY}{DHCPDEXTRAxGATEWAY}
{
Default-route for the remote network.

Default:  \emph{DHCPD\_EXTRA\_1\_GATEWAY='192.168.6.1'}
}


\end{description}


\section{Administration} 

For administration, there is a submenu in setup (or if you log in as eis user).
The menu provides you the possibility to edit the config, watch the state of
the daemon and start and stop it.

You can control the daemons by hand using the control-script in /etc/init.d:

\begin{verbatim}

      /etc/init.d/dhcpd start|stop|status|restart

\end{verbatim}
~\\
~\\

