uCon HomePage
DHCP/BOOTP Server
A simple DHCP/BOOTP server can be started to support
target-based network bootup. This server is single threaded (meaning
that it can only deal with one DHCP transaction at a time). It is not
intended for use on a loaded network, rather to provide basic support
for target-based network bootup. The menu item Servers->DHCP
brings up the following dialog box:
This server provides a very basic DHCP/BOOTP server
for targets that have been configured to boot from a server. It
supports 'automatic allocation' mode (see RFC2131) in which the server
simply assigns an IP address that is then assumed to be owned by that
client. The server can be configued in two different ways, single-client
mode or file mode. Note that in either mode, the
transaction can be monitored if DHCP system trace is enabled (see Config->SystemTrace)
and the trace window is visible.
CONFIGURATION Single-Client Mode:
A simple, single-client server can be established by
activating the "Single-Client Config" radio button and filling in the
appropriate items within the group. The server is then enabled by
checking the "Enable Server" box and clicking OK. At that point the
server will then wait for a DHCP or BOOTP request from a client that
has the specified MAC address, and assign the other specified items to
that client upon request. The syntax of each entry is typical; except
for the ServerIP... For this entry, the IP address can be immediately
followed by a comma ',', in which case the string after the comma will
be used as the server name when the DHCP server replies to a request.
CONFIGURATION File Mode:
In this mode, the server requires a configuration file be
established. To enter this mode, activate the "File-Based Config" radio
button. This will enable that group in the dialog box. A template
config file is created when a new config file is built by clicking on
the "New" button. When starting up, the server reads in the config file
and converts that data to binary for quick parsing when incoming DHCP
requests are received. The purpose of the config file is to allow the
server to uniquely configure multiple clients based on the
client_macaddr field of the incoming DHCP_DISCOVER request.
When the server is running and a
client makes a DHCP request, the server can print out the state
transitions occurring as the transaction progresses. This trace must be
enabled through the System Trace dialog box..
Note that for both Single-Client
and File Configuration modes, the parameter can be specified as
a shell variable. Obviously this means that the shell variable must
exist when the server is started, so if it doesn' t an error will
result.
EXAMPLE CONFIG FILE:
uCon can generate a configuration
file that can be used as a template.
Following is an example of that
output...
# Configuration File Template....
# Notes:
# * Each line consists of an ID
string followed by a PARAMETER string.
# ID and PARAMETER must be whitespace
delimited.
# * Blank lines are ignored, and
lines starting with a '#' are ignored.
# * A complete entry begins with the
DHCP_CLIENT_MAC entry.
# entry. The server expects to find
all other entries associated with
# that MAC prior to finding the next
DHCP_CLIENT_MAC entry.
# * The server will respond to BOOTP
requests also. To signify
# a BOOTP (instead of a DHCP) entry,
use BOOTP_CLIENT_MAC instead of
# DHCP_CLIENT_MAC. To server either,
use CLIENT_MAC.
# * The XXX_OPTNO_NNN entries below
demonstrate the fact that the server
# can be told to load any option with
a hex, ascii or IP type of value.
# * The XXX_VSOPTNO_NNN entries below
demonstrate the fact that the server
# can be told to load any
vendor-specific option (#43) with a hex, ascii
# or IP type of value.
# * The list of options is created in
the same order as they are found in",
# this file. Based on RFC2132 section
3.3 then, if you specify both",
# NETMASK and GATEWAY, then NETMASK
should be above GATEWAY in this file.",
#
# * NOTE:
# The subnet of the PC that is
running this server must be the same
# subnet that the CLIENT_IP entries
are set to.
#######################################################
#
# Syntactically valid entry for use with DHCP or
BOOTP
# clients:
#
CLIENT_MAC: 00:11:22:33:44:55
CLIENT_IP: 1.2.3.4
SERVER_IP: 1.2.3.2
RLYAGNT_IP: 1.2.3.3
NETMASK: 255.255.255.0
GATEWAY: 1.2.3.1
SERVER_NAME: server_name_here
BOOTFILE: some_filename_here
STR_OPTNO_131: some_ascii-string_here
HEX_OPTNO_132: AABBCCDDEEFF
IPA_OPTNO_133: 4.8.12.16
IPA_OPTNO_999: 4.8.12.16,1.2.3.4,5.6.7.9
STR_VSOPTNO_11: ascii_string
HEX_VSOPTNO_132: 112233
IPA_VSOPTNO_13: 8.9.10.11
#
# Note that in the above example, NETMASK is the same
as IPA_OPTNO_1
# and GATEWAY is the same as IPA_OPTNO_3
#
#######################################################
#
# Syntactically valid BOOTP entry:
#
BOOTP_CLIENT_MAC: 66:77:88:99:AA:BB
CLIENT_IP: 1.2.3.4
SERVER_IP: 1.2.3.2
RLYAGNT_IP: 1.2.3.3
NETMASK: 255.255.255.0
GATEWAY: 1.2.3.1
SERVER_NAME: server_name_here_too
BOOTFILE: some_other_filename_here
#######################################################
#
# Example DHCP entry for for serving embedded linux:
#
# OPTNO_54: Server Identifier
# OPTNO_44: NetBIOS over TCP/IP Name server
# OPTNO_46: NetBIOS over TCP/IP node type
# OPTNO_15: Domain name
# OPTNO_6: Domain name server(s)
# OPTNO_51: Address lease time
DHCP_CLIENT_MAC: 00:11:22:33:44:56
CLIENT_IP: 135.222.140.70
SERVER_IP: 135.222.140.159
IPA_OPTNO_54: 135.222.4.11
NETMASK: 255.255.254.0
IPA_OPTNO_44: 135.222.4.26,135.222.136.4
HEX_OPTNO_46: 08
STR_OPTNO_15: mh.lucent.com
IPA_OPTNO_6: 135.222.4.10
GATEWAY: 135.222.140.1
HEX_OPTNO_51: 00151800
# For basic PXE support add this (requires tftp
server):
HEX_VSOPTNO_6: 08
STR_OPTNO_60: PXEClient
BOOTFILE: pxelinux-serial-only.0