Вы находитесь на странице: 1из 102

DHCP Turbo

Administrator's Guide

© 2004 Weird Solutions, Inc.


DHCP Turbo
Administrator's Guide
by Weird Solutions, Inc.

The Weird Solutions DHCP Turbo Administrator’s


Guide describes how to configure and use the
Weird Solutions DHPC server product.

This documentation is intended for network


administrators responsible for maintaining and
setting up DHCP services on a network.
Weird Solutions DHCP Turbo

© 2004 Weird Solutions, Inc.

All rights reserved. No parts of this work may be reproduced in any form or by any means - graphic, electronic, or
mechanical, including photocopying, recording, taping, or information storage and retrieval systems - without the
written permission of the publisher.

Products that are referred to in this document may be either trademarks and/or registered trademarks of the
respective owners. The publisher and the author make no claim to these trademarks.

While every precaution has been taken in the preparation of this document, the publisher and the author assume no
responsibility for errors or omissions, or for damages resulting from the use of information contained in this document
or from the use of programs and source code that may accompany it. In no event shall the publisher and the author be
liable for any loss of profit or any other commercial damage caused or alleged to have been caused directly or
indirectly by this document.

Released in March 2004 Taby, Sweden

DHCP Turbo Administrators Guide

Weird Solutions, Inc.


Enhagsslingan 1B
187 40 Taby, SWEDEN
Phone +46-8-758 3700
Phone +46-8-758 3687

http://www.weird-solutions.com

Special thanks:

Thanks to everyone who contributed to this product. We've had the


pleasure to work with great people all across the globe, with
assistance and guidance every step of the way.

Bud Millwood
Chief Software Architect
I Weird Solutions DHCP Turbo

Table of Contents
Foreword 1

Part I Getting Started 3


1 What is DHCP?
................................................................................................................................... 3
2 Supported platforms
................................................................................................................................... 4
3 System requirements
................................................................................................................................... 5
4 Installing on Windows
................................................................................................................................... 5
5 Installing on Linux
................................................................................................................................... 5
6 Installing on Solaris
................................................................................................................................... 6
7 Removing the...................................................................................................................................
software 6

Part II Configuration 8
1 User Interface................................................................................................................................... 8
2 Login ................................................................................................................................... 8
3 Remote servers
................................................................................................................................... 9
4 Configuring ................................................................................................................................... 10
General .......................................................................................................................................................... 10
Address reclaimer
.......................................................................................................................................................... 12
Advanced .......................................................................................................................................................... 13
GUI parameters
......................................................................................................................................................... 13
Service parameters
......................................................................................................................................................... 13
Service control
......................................................................................................................................................... 14
Event Logging
......................................................................................................................................................... 14
The prestart
.........................................................................................................................................................
file 15
Configuration
.........................................................................................................................................................
file 15

Part III Operation 19


1 Working with...................................................................................................................................
scopes 19
Creating a new
..........................................................................................................................................................
scope 19
The local scope
..........................................................................................................................................................
policy (local options) 20
Applying named
..........................................................................................................................................................
policies (generic options) 21
Excluding addresses
..........................................................................................................................................................
from the scope 22
Scope rules .......................................................................................................................................................... 23
2 IP reservations
...................................................................................................................................
(fixed addresses) 24
Creating a IP ..........................................................................................................................................................
address reservation 24
3 Denying service
................................................................................................................................... 25
Hardware exclusions
..........................................................................................................................................................
(public server) 25
Hardware inclusions
..........................................................................................................................................................
(private server) 26
4 Using policies
...................................................................................................................................
(option groups) 27
Global policy ..........................................................................................................................................................
(system-wide) 27
Local policy ..........................................................................................................................................................
(scope level) 28
Named policies..........................................................................................................................................................
(generic) 29
5 Managing options
................................................................................................................................... 30

© 2004 Weird Solutions, Inc.


Contents II

Standard options
.......................................................................................................................................................... 30
Custom options
.......................................................................................................................................................... 31
Control options
.......................................................................................................................................................... 32
Subnet selection
......................................................................................................................................................... 32
Miscellaneous
......................................................................................................................................................... 33
Creating lease
.........................................................................................................................................................
logs 33
DOCSIS Cable
.........................................................................................................................................................
Modems 33
Non-standard
.........................................................................................................................................................
devices 33
Remote-boot
.........................................................................................................................................................
devices 34
ATM support
......................................................................................................................................................... 35
Packet inspection
..........................................................................................................................................................
(for expressions) 36

Part IV Using Expressions 38


1 Expression Editor
................................................................................................................................... 38
2 Data Types ................................................................................................................................... 38
3 Operator reference
................................................................................................................................... 40
4 Sample Expressions
................................................................................................................................... 40
5 Functions reference
................................................................................................................................... 41
Device Identification
.......................................................................................................................................................... 41
$RELAY.RID......................................................................................................................................................... 42
$RELAY.CID......................................................................................................................................................... 42
$RELAY.DEVICEID
......................................................................................................................................................... 42
$RELAY.ADDRESS
......................................................................................................................................................... 43
$HWADDR ......................................................................................................................................................... 43
$HWTYPE ......................................................................................................................................................... 43
$CLIENTID ......................................................................................................................................................... 43
$CLASSID ......................................................................................................................................................... 43
$USERCLASS......................................................................................................................................................... 44
$BOOTP ......................................................................................................................................................... 44
Packet Inspection
.......................................................................................................................................................... 44
$INP ......................................................................................................................................................... 44
Miscellaneous
......................................................................................................................................................... 45
$BOOTFILE ......................................................................................................................................... 45
$HOPS ......................................................................................................................................... 45
$HTYPE ......................................................................................................................................... 45
$HLEN ......................................................................................................................................... 46
$VENDORSPECIFIC ......................................................................................................................................... 46
$XID ......................................................................................................................................... 46
$SECS ......................................................................................................................................... 46
$COOKIE ......................................................................................................................................... 46
Deprecated......................................................................................................................................................... 47
$INP_HAS ......................................................................................................................................... 47
Data and Time .......................................................................................................................................................... 47
$DATE ([format])
......................................................................................................................................................... 47
$YEAR ([format])
......................................................................................................................................................... 47
$MONTH .........................................................................................................................................................
([format]) 48
$DAY ([format])
......................................................................................................................................................... 48
$TIME ([format])
......................................................................................................................................................... 49
File I/O .......................................................................................................................................................... 49
$VALUE (file,key)
......................................................................................................................................................... 49
Type Conversion.......................................................................................................................................................... 50
$BOOL (value)
......................................................................................................................................................... 50

© 2004 Weird Solutions, Inc.


III Weird Solutions DHCP Turbo

$INT (value)
......................................................................................................................................................... 50
$IP (value)
......................................................................................................................................................... 50
$MAC (value)
......................................................................................................................................................... 50
$STR (value
.........................................................................................................................................................
[,delimiter]) 51
$TEXT ......................................................................................................................................................... 51
String Manipulation
.......................................................................................................................................................... 51
$LEFT (string,
.........................................................................................................................................................
count) 51
$RIGHT (string,
.........................................................................................................................................................
count) 52
$MID (string,
.........................................................................................................................................................
count, pos) 52
Error Handling.......................................................................................................................................................... 52
$DEFAULT .........................................................................................................................................................
(value) 52

Part V Additional Tools 55


1 Backup and Restore
................................................................................................................................... 55
Backing up your
..........................................................................................................................................................
database 55
Restoring your
..........................................................................................................................................................
database 56
2 Command Line
...................................................................................................................................
utility 57
Using the dhcpti
..........................................................................................................................................................
utlity 57
Server properties
......................................................................................................................................................... 58
Reading server properties
......................................................................................................................................... 58
Setting a server .........................................................................................................................................
property 58
Server information ......................................................................................................................................... 58
Starting and stopping .........................................................................................................................................
the service 59
Scopes ......................................................................................................................................................... 59
Enumerating all .........................................................................................................................................
scopes 60
Reading a specific .........................................................................................................................................
scope 61
Adding a new scope ......................................................................................................................................... 61
Changing a scope ......................................................................................................................................... 61
Deleting a scope......................................................................................................................................... 62
Policies ......................................................................................................................................................... 62
Enumerating all .........................................................................................................................................
policies 62
Reading a specific .........................................................................................................................................
policy 62
Adding a new policy ......................................................................................................................................... 63
Changing a policy ......................................................................................................................................... 63
Deleting a policy......................................................................................................................................... 63
Bindings ......................................................................................................................................................... 63
Enumerating bindings ......................................................................................................................................... 65
Reading bindings ......................................................................................................................................... 66
Individual bindings ...................................................................................................................................
by IP address 66
Individual bindings ...................................................................................................................................
by Client Identifier 67
Multiple bindings ...................................................................................................................................
by scope 67
Multiple bindings ...................................................................................................................................
by address range 67
Multiple bindings ...................................................................................................................................
by expression 69
Mixing filters ................................................................................................................................... 70
Reading all bindings ................................................................................................................................... 71
Adding a new binding ......................................................................................................................................... 72
Changing a binding ......................................................................................................................................... 72
Deleting a binding ......................................................................................................................................... 73
Pendings ......................................................................................................................................................... 73
Enumerating all .........................................................................................................................................
pendings 73
Reading a specific .........................................................................................................................................
pending 73
Adding a new pending ......................................................................................................................................... 74
Changing a pending ......................................................................................................................................... 74

© 2004 Weird Solutions, Inc.


Contents IV

Deleting a pending ......................................................................................................................................... 74


Device exclusions
......................................................................................................................................................... 74
Enumerating all .........................................................................................................................................
device exclusions 74
Reading a specific .........................................................................................................................................
device exclusion 74
Adding a new device .........................................................................................................................................
exclusion 75
Changing a device .........................................................................................................................................
exclusion 75
Deleting a device .........................................................................................................................................
exclusion 75
Device registrations
......................................................................................................................................................... 75
Enumerating all .........................................................................................................................................
device registrations 75
Reading a specific .........................................................................................................................................
device registration 75
Adding a new device .........................................................................................................................................
registration 76
Changing a device .........................................................................................................................................
registration 76
Deleting a device .........................................................................................................................................
registration 76
Option types
......................................................................................................................................................... 76
Enumerating all .........................................................................................................................................
option types 78
Reading a specific .........................................................................................................................................
option type 78
Adding a new option .........................................................................................................................................
type 79
Changing an option .........................................................................................................................................
type 79
Deleting an option .........................................................................................................................................
type 79
3 Change Notifications
................................................................................................................................... 79
Overview .......................................................................................................................................................... 79
Subscribing .......................................................................................................................................................... 80
Packet format.......................................................................................................................................................... 81
Reference .......................................................................................................................................................... 81

Part VI Frequently Asked Questions 86


1 FAQ's ................................................................................................................................... 86

Part VII Troubleshooting 90


1 Common error
...................................................................................................................................
messages 90

Index 95

© 2004 Weird Solutions, Inc.


1 Foreword

Foreword

The fast growth of the Internet has placed serious stress on the
software designed to run it. Traditional network management
services that were designed to handle hundreds of simultaneous
devices are now trying to handle hundreds of thousands.

Weird Solutions' software is radically designed to scale,


delivering "instant-on" networking that enables providers to offer
fast, reliable services over many thousands of network-devices.

© 2004 Weird Solutions, Inc.


Getting Started
DHCP Turbo Administrator's Guide

Part

I
3 Weird Solutions DHCP Turbo

1 Getting Started

1.1 What is DHCP?


Automating Network Address Management
DHCP is an acronym for Dynamic Host Configuration Protocol. The purpose of DHCP is to enable
individual computers on a TCP/IP network to obtain its IP address and configuration data from one or
more DHCP servers. DHCP servers are configured by network administrators, and can provide nearly
every operating parameter a DHCP client needs to effectively operate in the network environment.

DHCP makes it easier to manage a large network by centralizing the configuration of your computers
and other networked devices.

The Server Manager under Windows The Server Manager under Linux

DHCP definitions
DHCP was created by the Dynamic Host Configuration Working Group, part of the Internet
Engineering Task Force (IETF) DHCP is an Internet Standard Protocol. The basic protocol is defined
in RFC 2131.

RFC compliance
The software complies with the following RFC's and Internet drafts:

© 2004 Weird Solutions, Inc.


Getting Started 4

The basic DHCP protocol RFC 2131


DHCP options and BOOTP vendor info RFC 1542
DHCP and BOOTP interoperability RFC 1534
BOOTP extensions RFC 1542
User class option for DHCP RFC 3004
DHCP subnet selection for IPv4 RFC 3011

Cablelabs Client Configuration* RFC 3495


The DHCP Relay Agent * RFC 3046
The DHCP Relay Agent Device Class RFC 3256
suboption *
DHCP SIP Server option * RFC 3361

**) Only available in the public network version of this DHCP server

1.2 Supported platforms


Microsoft Windows

· Windows NT 4.0 with Service Pack 4 or later


· Windows 2000
· Windows XP
· Windows Server 2003

Server or desktop variants of these operating systems are supported

Linux (Intel x86 arch.)


· RedHat Linux
· Mandrake Linux
· SuSE Linux

Solaris (sparc arch.)


· Version 8 and 9

Daemon and dhcpti CL utility only. Use GUI remotely on one of the supported platforms

© 2004 Weird Solutions, Inc.


5 Weird Solutions DHCP Turbo

1.3 System requirements


The DHCP server software requires:
· Processor: Pentium class x86 or UltraSPARC
· RAM memory: 4MB minimum, 8MB recommended
· Disk space (application): 10MB after operating system is installed
· Disk space (bindings) 2.8MB per 1 000 bindings
· Networking protocol: TCP/IP
· Network Interface Card
· Solaris version also requires libgcc 3.2 installed

1.4 Installing on Windows


If you received a diskette or CD

Insert the CD or diskette into the drive and run SETUP.EXE to begin installation.

If you received the software electronically

This DHCP server is transmitted electronically as a single file titled dhcp***.exe. Copy this file to a
temporary directory on your hard drive, then double-click the file to begin installation process.

Setup allows you to specify 'Full' or 'Custom' installations. If this is your first time installing the DHCP
server you'll want to choose a Full install. Afterwards, you may want to choose to do a 'Custom'
installation to only install the User Interface (GUI) on a separate workstation to communicate with the
DHCP server remotely.

After selecting the installation directory and program group, the setup program copies the necessary
files to your hard disk and registers the service. Once this is complete you should configure the DHCP
server by clicking the new DHCP server icon on your desktop.

Refer to the section on Troubleshooting if you encounter errors during the installation.

1.5 Installing on Linux


Installing the Linux RPM packages
The software ships as two separate RPM files; one for the daemon and one for the user interface. You
may install either package, or both.

To install the two packages, either use the distribution supplied software install/uninstall utility or open
a super-user terminal in the directory containing the RPM files and type:

rpm -ivh dhcptd*.rpm (installs the service)


rpm -ivh dhcptui*.rpm (installs the user interface)

An automatic startup-script is also provided. For details see the Service Control section.

Refer to the section on Troubleshooting if you encounter errors during the installation.

© 2004 Weird Solutions, Inc.


Getting Started 6

1.6 Installing on Solaris


Installing the Solaris packages
Before installing this product you must ensure that the libgcc package is installed. This package can
be obtained from www.sunfreeware.com.

The DHCP server ships as a single package file for the daemon. To install the package, open a super-
user terminal in the directory containing the package file and type:

pkgadd -d packagename.pkg

You should probably create a startup script to launch the daemon in /usr/local/sbin/dhcptd
each time the machine is started.

Refer to the section on Troubleshooting if you encounter errors during the installation.

1.7 Removing the software


For Windows users
Click the uninstall icon in the DHCP server program group, or, alternately, use the Control Panel's
'Add/Remove Programs' applet.

For Linux users


Use the distribution specific add/remove software utility or open a super-user terminal and type:

rpm –e dhcptui (erase the installed user interface)


rpm –e dhcptd (erase the installed service)

Note for Linux users: the database directory is purposely left for manual removal: it can be found under
/var/lib/dhcptd

For Solaris users


As a super-user type:

pkgrm dhcptd

(Note for Solaris users: the database directory is purposely left for manual removal: it can be found
under /var/dhcptd)

© 2004 Weird Solutions, Inc.


Configuration
DHCP Turbo Administrator's Guide

Part

II
Configuration 8

2 Configuration

2.1 User Interface


Overview
The DHCP server is configured through the Server Manager user interface. This program allows you
to easily connect to and manage all available DHCP servers in a browse tree. The Server Manager
user interface works equally well with local and remote DHCP servers, and can be installed separately
on an administrator's workstation.

The following nodes are available once connected:

· Summary node - shows general information about the selected DHCP server

· Scopes node - entities for address-ranges: its lease specifications, a local policy (DHCP
options settings for the local scope) and an optional conditional access rule.

· Options node - displays all available options, standard DHCP options and the server's built-in
Control Options (negative numbered)

· Policies view - generic containers with configured DHCP options . The special Global Policy is
a system-wide container.

· Hardware exclusions * - lists hardware devices the DHCP server should ignore.
*) In Private Server mode, a Hardware inclusions node is shown instead.

· Database - used to create or lock down a device to a fixed IP-address, or browse IP addresses
and devices currently in use.

The Server Manager user interface on Windows

2.2 Login
Server Manager requires that the user connects and logs in on the selected DHCP server before
administering. All communication between the user interface an the DHCP server is secured using
Blowfish encryption.

© 2004 Weird Solutions, Inc.


9 Weird Solutions DHCP Turbo

The login window (encrypted)

Password protection
There is no password when the software is first installed, leave the password box blank the first time
you login. You can then set a new password by choosing Tools->Change Password… from the menu.

If you forget your password, you can delete the "admin_password" key from the dhcpt.conf file and
restart the service. (If you still have trouble logging in, delete the "private_key.bin" file in the database
directory.)

Automating login
It is also possible to start the GUI and have it automatically connect and login to a DHCP server by
adding parameters on startup.

2.3 Remote servers


Configuring additional DHCP servers
The Server Manager allows you to add remote DHCP servers and configure those as easily as you
configure the local computer. When you first start Server Manager you'll see an entry labeled
'localhost'. If the DHCP service is installed on your local computer you can manage it by double clicking
this server name.

Note: each additional DHCP server requires a separate license.

© 2004 Weird Solutions, Inc.


Configuration 10

Connecting to a new DHCP server

2.4 Configuring
Overview
Each DHCP server has a set of basic properties defining different aspects of its operation. You can
modify these server properties by first selecting a server, then choosing Edit->Properties… from the
menu.

The server properties window is divided into General and Address Reclaimer settings. The next
sections cover each of these.

2.4.1 General
General operation of the DHCP server program
To change General properties for a DHCP server, highlight the server name and choose Edit-
>Properties… from the menu. The General tab shows the current settings for the server.

© 2004 Weird Solutions, Inc.


11 Weird Solutions DHCP Turbo

Setting general operating parameters

Meaning of each property

Private Server When checked, this server only responds to


requests from pre-registered devices. Private
DHCP servers appear with a different (red) icon
in Server Manager, and show a Registrations
icon instead of an Exclusions icon in the
browse tree.

Enable write caching When checked, the server caches lease


commits to memory instead of writing them to
disk. The cache is flushed at the reclaimer
interval.

Enable dynamic BOOTP Allows the server to dynamically assign


addresses to BOOTP devices. These devices
will always receive an infinite lease.

Deny Windows RAS Rejects all requests from Windows RAS


servers (Remote Access Service) servers.

Enable detailed logging Enable this to keep a detailed log file of the
server's activity. Enabling this option for long
periods of time is not recommended because
the log file grows quite large.

© 2004 Weird Solutions, Inc.


Configuration 12

2.4.2 Address reclaimer


Reclaiming network addresses
The DHCP server has a built-in Address Reclaimer that's responsible for refilling the server's high-
speed address dispenser. The reclaimer recollects expired bindings. An expired binding record is
considered reusable by the DHCP server if a device has been offline for more than 150% of its lease
time. The grace period can be controlled with the setting shown below.

The reclaimer can be disabled (value set to zero) which can be useful for environments without
scopes, only fixed addresses

You can adjust how often the reclaimer checks for available expired bindings by changing the setting
shown in the image below. (This setting is not absolute, the address reclaimer will automatically
attempt to find available expired bindings incase the internal address dispenser is low on free IP
addresses.)

Retaining expired bindings


By adjusting the binding retention time (grace period), the server can offer your DHCP clients their
expired bindings even when they have been offline for long periods of time. The Keep expired
bindings setting shown below allows you to adjust this value. The default binding retention time is one
day.

In a high-turnover environment with short lease times, setting this value to 0 days is appropriate. This
indicates no added grace period and bindings expire when devices go offline for more than 150% of
their lease time.

The reclaimer properties window

Note: Even if disk write caching is enabled, the memory cache is always flushed to disk before each
Reclaimer run.

© 2004 Weird Solutions, Inc.


13 Weird Solutions DHCP Turbo

2.4.3 Advanced
2.4.3.1 GUI parameters

Automating login
You can automate the connection to a local or remote DHCP server's GUI (Server Manager) by
passing additional commands to the GUI application dhcpui.exe

This way, for example no step-after-step manual login procedure would be necessary.

Supported command line arguments


The Server Manager graphical user interface application is dhcptui.exe. It supports the following
arguments:

--server <name> When specified, pre-selects the server named <name>.

--password <password> When specified, automatically forwards the password to


the server.

--connect When specified, automatically attempts to connect to the


specified server. If no password is supplied, the Login
window appears to allow the user to supply the password.

You can omit the --server and --password identifiers if you specify the values in order:
server,password.

Examples:

dhcptui localhost mypassword


dhcptui localhost --connect
dhcptui --server localhost --password mypassword
dhcptui localhost ""

2.4.3.2 Service parameters

Windows The service is named: dhcpt.exe and is


located in the DHCP servers program
directory.
Linux The daemon is named dhcptd, and is
located in /usr/sbin.
Solaris The daemon is named dhcptd, and is
located in /usr/local/sbin.

The following command line parameters can be passed to the DHCP service:

© 2004 Weird Solutions, Inc.


Configuration 14

-v, --version Display this version information


-h, --help Display this version information
-p, --pack Pack the bindings database
-c, --create dir Create an empty database in 'dir'
-f, --config file Use 'file' for configuration instead of the
default
-n, --nodaemon Stay in the foreground

2.4.3.3 Service control

The DHCP server can be stopped and started by choosing Tools->Control Service… from the menu.

Windows The DHCP server is a regular system service that can be started,
stopped, paused and resumed using the Tools->Control Service
Menu option and also with the Services icon in the Control Panel.
(Run: services.msc)
Linux The DHCP server daemon process forks and runs in the
background when started as super-user. To stop the daemon,
use the SysV-init script provided in /etc/rc.d/init.d/dhcptd,
or use any utility that can send the process a SIGTERM.

Solaris Use ps -ae | grep dhcptd to find the pid, then kill to shut
down the daemon

2.4.3.4 Event Logging

Standard logging:
The DHCP server logs relevant events using your operating system's log facility.

Windows: events appear in the Application section of the Event Log

Linux & Solaris: events appear in the syslog

Detailed logging:
The service can also be configured to use a detailed log file to record debugging information. To
enable detailed logging, set the server general property enable_logging to "true". You should only
enable the detailed logging property during a test phase because of the size of file that can be
produced.

Lease logging:

© 2004 Weird Solutions, Inc.


15 Weird Solutions DHCP Turbo

To record lease information, define and place the Lease log Control Option (-18) in a scope, policy or
binding. See the Control Options for details.

2.4.3.5 The prestart file

The DHCP server creates a prestart file in the database directory each time the service starts. This file
contains the prestart command "pack_bindings". When the service gracefully shuts down, the
command is removed from the file.

The prestart file is used to automatically re-index the DHCP server's database if the service exits
abnormally.

2.4.3.6 Configuration file

Other properties
Some of the server's settings are not available through Server Manager Interface. Open the file:
dhcpt.conf to see all of the server's settings:

On Windows
The configuration file is located in the DHCP server's program directory

On Linux
The configuration file is located under the /etc directory

On Solaris
The configuration file is located under the /usr/local/etc directory

Configuration file parameters


The following properties can be set in the config file:

© 2004 Weird Solutions, Inc.


Configuration 16

database=./database Defines the directory where the database tables can


be found.
helper_dll=./arpadd.dll Defines the fully qualified pathname for the arp helper
dll.

enable_logging=false When set to true, all DHCP activity is logged in the log
log_file=./dhcpt.log file specified by the key: log_file.
Also needs the name of the file to use for activity
logging
private_server=false When true, the DHCP server only services the
devices listed in the iclients.txt file.

write_caching=false When true, the DHCP server caches writes to the


database. These writes are then flushed at the
reclaim_interval. Use write caching with care, and be
aware of the ramifications of how your lease
allocations can be affected in the event of a server
crash.
reclaim_interval=15 This value specifies the interval between global
address reclamations. The default value causes the
reclaimer to recover expired leases every 15 minutes
(with a 10% grace period on the lease length). If write
caching is active, the cache is flushed to disk prior to
each reclamation run.
static_arp_timeout=60 If a dynamic arp entry cannot be made, a static one is
made instead. This value specifies how long static arp
entries should be available before being removed.
max_dg_rcv=4096 Specifies the maximum sized datagram the service
should be prepared to receive. The default value is 4
kilobytes.
dynamic_bootp=true When true, DHCP server will issue dynamic
addresses to BOOTP devices using an infinite lease.
deny_ras=false When true, the DHCP server will refuse to service the
Windows Remote Access Server.
match_local_segment_scopes=true When set to false the server can offer addresses from
any local segment scope regardless of source.
(Testing purposes)
min_inactive_days=1 The minimum time expired bindings are kept in the
database and not reclaimed, for reuse by offline
devices.
daemon_listen_on=10.0.0.1 If defined, specifies a comma-delimited list of IP
addresses on which the service should operate. By
default all known addresses are used.
daemon_port=67 If defined, specifies the port on which the DHCP
server should listen. The default port is 67, the DHCP
server port.
comms_listen_on=192.168.3.2, If defined, specifies a comma-delimited list of IP
127.0.0.1 addresses on which the daemon communications
module should listen on. By default all known
addresses are used.
comms_port=8088 If defined, specifies a static port on which the DHCP
server communications module should operate. The
default is for the DHCP engine to choose a port at
runtime.

© 2004 Weird Solutions, Inc.


17 Weird Solutions DHCP Turbo

The following advanced keys are also supported:

client_id=[ <your expression> ] If this key is specified, the server uses your
expression to generate a unique identifier for each
client. If you expression results in an empty value, the
standard DHCP mechanism is used to create a client
identifier.
exclusive_locks=true When set to false, the DHCP server will disable its
exclusive lock on the bindings database file:
mappings.dbf while the service is running.(Used with
caution)

Note:

It's possible to tell the service to use a different configuration file by passing a command line parameter
when starting the service. See the section Service Startup parameters for more information.

© 2004 Weird Solutions, Inc.


Operation
DHCP Turbo Administrator's Guide

Part

III
19 Weird Solutions DHCP Turbo

3 Operation

3.1 Working with scopes


3.1.1 Creating a new scope

A scope defines a range of IP-addresses for allocation to clients and it also stores configuration-data
(options) specific to this scope, the scope's Local Policy.

For more advanced environments it is noteworthy to mention that Expressions can be used to provide
rules related to the scope, accessible from the Advanced Tab.

Scope definitions
You can create a new scope by choosing File->New->Scope from the menu. You must supply a name,
gross-address range, subnet mask, lease duration. If the addresses are to be provided to clients
across a router, uncheck 'Local' and specify the remote IP-address of the relay agent, this is the
interface the remote clients reside on.

You may also want to exclude certain IP-addresses from the scope, or explicitly reserve an IP-address
to a hardware device on the network.

Note: IP-addresses that are excluded (removed) from scope's address-range or specifically reserved
from the IP-address range are no longer associated with the scope, nor its properties such as its Local
Policy.

New scope window

© 2004 Weird Solutions, Inc.


Operation 20

Active Denotes whether the server can allocate


addresses from this scope
Name A name that uniquely identifies the scope

Description A user friendly description for this scope

Start address The first address in this scope's range of


addresses
End address The last address in this scope's range

Subnet mask The subnet mask to be used on this network


segment
Lease These settings specify how long a device may
use an address before it's recovered by the
server. (See also the server's reclaim setting)
Segment Uncheck Local if this scope will be used by
devices that are separated from the DHCP
server by a relayer (often a router) and specify
the router's IP address, on the remote
interface side, ie. the segment the clients
resides on. (Ensure 'BOOTP relaying' is
enabled on the router)

3.1.2 The local scope policy (local options)


Adding options to the scope
It's possible to provide your network devices with a lot more information than just a working IP address.
You can supply information about DNS servers, e-mail servers, and much more using DHCP
Options. There are many kinds of DHCP options, and each carries a specific type of information.

To define an option for a specific scope, select the scope and choose File->New->Option... from the
menu.
Every scope has a Local Policy, its locally stored DHCP options. When you define an option in a
scope, you're defining that option in the scope's Local Policy. To define an option select the scope
and choose File->New->Option... from the menu. There are different types of options available,
DHCP Standard Options, DHCP Server Control Options and lastly internal packet inspection options.

If DHCP options apply to multiple scopes, it may be a good idea to group these in a generic Named
Policy or place them in the Global Policy container if it should encompass system-wide.

© 2004 Weird Solutions, Inc.


21 Weird Solutions DHCP Turbo

The scope options, the Local Policy

3.1.3 Applying named policies (generic options)


A scope can inherit options from one or more generic Named Policies. These are generic in the sense
that they are created and saved outside of the context of a scope for generic use in any scope or
individual IP-address reservations. Apply Named Policies to a scope with the Add>> or <<Remove
buttons as well ordered in precedece with the Up/Down arrows. The top listed Policy has the highest
priority.

Priority levels for policies


If an option is defined in both a scope's Local Policy and a generic Named Policy, the scope's Local
Policy takes precedence. Read more about how and why in the section on Using Policies.

© 2004 Weird Solutions, Inc.


Operation 22

Inheriting from a generic Named Policy

Options inherited from a generic Named Policy behave exactly as if they were defined within the
scope's Local Policy. If an option is defined in both the scope's Local Policy and is inherited from a
Named Policy, the Local Policy value takes precedence.

3.1.4 Excluding addresses from the scope


You may find that you want to remove one ore more IP-addresses from your scope's gross address-
range. You can achieve this by highlighting the scope and selecting File->New->IP Exclusion from the
menu. A scope's IP Exclusions tab shows all IP-addresses that have been removed from the scope.

Enter a sub-range to exclude. To exclude a single IP address, enter that address as both the start and
end of the range.

© 2004 Weird Solutions, Inc.


23 Weird Solutions DHCP Turbo

Removing IP-addresses from the scope

3.1.5 Scope rules


Each scope has an Allow and Deny property, signifying conditional access. This can be used to
decide whether or not a device can obtain an address from it. The expression must result in true or
false.

The priority order of scopes can also be set with the priority slider, a higher value signifies
precedence.

© 2004 Weird Solutions, Inc.


Operation 24

A simple rule that denies Cable Modems any access to the scope.

3.2 IP reservations (fixed addresses)


3.2.1 Creating a IP address reservation
An IP-address reservation, also known as a manual allocation, can be used to ensure that a device
always receives a given IP address. Although it's generally best to let the DHCP server to dynamically
manage IP-address assignments, there may be specific cases where a IP-address reservation makes
more sense. You can create reservations for both BOOTP and DHCP devices. A DHCP address
reservation can either be infinite lease or a time-limited lease, a BOOTP reservation can only be of
type 'infinite lease'.

Providing options to IP-address reservations

An IP-address reservation has no association with a scope, even though the IP-address may be in its
gross-address range. It's possible to define options in a single IP-address reservations own Local
Policy, but often it's more convenient to use options already predefined in a generic Named Policy or
even an existing scope's Local Policy. To offer an IP-address reservation options already defined
elsewhere, checkmark 'Policies', then browse for the policies you wish to apply.

If you want to add individual options directly to the IP-reservation, you'll need to add them to its Local
Policy after the IP reservation is created: select the created IP-reservation and click: File -> New ->
Option

© 2004 Weird Solutions, Inc.


25 Weird Solutions DHCP Turbo

Reserving an IP-address to a device

Device Identifier Must match the identifier supplied by the


device. Normally this is a sequence of six
hexadecimal values: the device's MAC
address. By default the hardware type is
assumed to be Ethernet.
IP Address The address this device should receive.
Policy One or more optional policies from which this
IP-reservation should inherit options
Lease Specify DHCP or BOOTP depending on the
type of device. If the device is DHCP, you can
also specify a lease duration.

3.3 Denying service


3.3.1 Hardware exclusions (public server)
Device exclusions ensure that certain devices never receive an address from the DHCP server. This
can be useful if wish to force a device to use another DHCP server or perhaps you suspect your
network has a faulty or malicious device.

Excluding service to a device

Device Identifier: Enter the identifier supplied by the device. Normally this is a sequence of six
hexadecimal values, the device's MAC address. (Hardware type Ethernet "01-" is assumed.)

Remark: An optional text field for personal notes.

© 2004 Weird Solutions, Inc.


Operation 26

Select File->New->Device Exclusion… to create a new device exclusion.

3.3.2 Hardware inclusions (private server)


The DHCP server will only respond to requests from pre-registered devices if the server's Private
Server property is enabled. When the DHCP server is running in Private Server mode, the server
icon has a red outline, and will show a Hardware registrations node.

Pre-registering a device
If the DHCP server is running in Private Server mode you need to register devices by choosing File-
>New->Device Registration… from the menu:

Device Identifier: Enter the identifier supplied by the device. Normally this is a sequence of six
hexadecimal values, the device's MAC address. (Hardware type Ethernet "01-" is assumed.)

Remark: An optional text field for personal notes.

© 2004 Weird Solutions, Inc.


27 Weird Solutions DHCP Turbo

Pre-registering a device on a private server

3.4 Using policies (option groups)


3.4.1 Global policy (system-wide)
A policy is a reusable container of Options. The DHCP server processes policies in this order: Global,
Named and lastly the Local Policy.

The Global Policy is a special system-wide lowest priority container, and is automatically inherited by
all scopes and IP-address reservations. In the case of a duplicate option definition, the Option in the
Global Policy will be overridden.

For example, suppose you have a single DNS-server on your network, you can define the Domain
Name Servers option in the Global Policy:

Select the Policy called Global and right-click, select 'New Option" to add an appropriate option with a
value.

© 2004 Weird Solutions, Inc.


Operation 28

Defining a DNS server globally

Now every device that receives an address from this server will use the specified DNS server.

Further suppose that you want all devices serviced by the PC_10.0 scope shown in the image above to
use another DNS server on your network. The quickest way to do this is to add the Domain Name
Servers option to the PC_10.0 scope's Local Policy and set it to the appropriate value, effectively
overriding the value defined in the Global Policy.

3.4.2 Local policy (scope level)


Providing information to devices
It's possible to provide your network devices with a lot more information than just a working IP address.
You can supply information about DNS servers, e-mail servers, and much more using DHCP
Options. There are many kinds of DHCP options and each carries a specific type of information. For a
complete list of Internet standard options refer to section on Option Types.

To define an option for a specific scope, select the scope and choose File->New->Option... from the
menu.

© 2004 Weird Solutions, Inc.


29 Weird Solutions DHCP Turbo

Choosing a new option

After selecting the option, you're presented with a data-entry window where you can specify the
settings specific to your network. Advanced users may want to read the section on entitled Using
Expressions to learn how to define values that are evaluated while the server is running.

If you have multiple values (for example, multiple Domain name servers on your network), the
Advanced>> button allows you to specify a list of values.

Extended data-entry window

Entries in the value list can be moved up or down, and normally specify a preferential order.

3.4.3 Named policies (generic)


Named Policies are useful generic containers of options that you create outside the context of any
scope or IP-address reservations. After creating a Named Policy, you can populate it with options,

© 2004 Weird Solutions, Inc.


Operation 30

then add that container to any scope or IP-address reservations.

Local Policies
Every scope and IP-address reservation has its own Local Policy. When you define an option in a
scope or IP-address reservation you're defining that option directly to a specific scope or IP-address
reservation.

The Global policy


Every server also has a Global Policy. This policy is inherited by all scope's and IP-address
reservations that you create.

The policies tab in a scope

3.5 Managing options


3.5.1 Standard options
Option types
The DHCP protocol uses options to carry most of the information a device receives. Select Option
Types nodes to see the available options or right-click and select: New Option Type to add your
own custom option.

© 2004 Weird Solutions, Inc.


31 Weird Solutions DHCP Turbo

The list will show both standard DHCP options and the DHCP server's own Control Options
(negative numbered) these are used to set server-side rules such as obtaining a specific behavior.

Viewing option types.


Select Edit->Properties… from the menu to view detailed information for a single option.

3.5.2 Custom options


Creating new options
This DHCP server lets you create option types to allow new kinds of information to be passed to your
devices. Choose File->New->Option Type… to create a new option.

© 2004 Weird Solutions, Inc.


Operation 32

Creating an option type

Tag You must supply a unique tag number.

Name Choose a name that has meaning, because this


is what the user will normally see when
selecting from a list of options.

Type Select a basic data type from the drop-down


menu.

Signed Place a check in this box if this option is a kind


of signed number.

Arrayed If this option can hold more than one piece of


data you should enable this option. The
standard option DNS Name Server, for
example, is arrayed because most networks
have more than one DNS server.
Description You can provide a short description for this
option type.

3.5.3 Control options


3.5.3.1 Subnet selection

Device selectable: Option -21

RFC 3011 defines a means for an intermediate device to request a lease from an arbitrary subnet.
Support for this is available as Control Option -21, Device selectable. If a scope has this boolean
value defined as true, or inherits this value from a policy, the scope is allowed to be considered during
the server's subnet selection process.

© 2004 Weird Solutions, Inc.


33 Weird Solutions DHCP Turbo

If you have an intermediate device that supports subnet selection, consider defining Device selectable
in the global policy, or, alternately, in those scopes that are allowed to be part of the selection list.

3.5.3.2 Miscellaneous

Hardware address length: Option -18

The device's hardware address length

Home directory: Option -5

The user's home directory


3.5.3.3 Creating lease logs

Lease log: Option -18

The DHCP server can create log files to record when and where your addresses are allocated. This file
follows a simple standard format, making it easy to parse with programs such as a spreadsheet
software.
To create a lease log, define the Lease log Control Option in a scope, policy or binding. The value can
be a fully qualified path name, or an expression that results in a fully qualified path name.

Note: The date functions are particularly useful when defining lease logs. For example, defining a value
of [$DATE() + ".log"] allows you to create rotating log files.

3.5.3.4 DOCSIS Cable Modems

Remote ID (RID) address limit: Option -17

The public network version of the DHCP server supports reading the Relay Agent Info option 82 for
extra security with large cable-modem networks. If your cable-modems are DOCSIS compliant, you
can define Remote ID address limit (RID limit) to specify the total number of addresses that will be
allocated to Customer Premises Equipment (CPE).

Circuit ID (CID) address limit: Option -22

The public network version of this DHCP server supports reading the Relay Agent Info option 82 for
extra security with large cable-modem networks. If your cable-modems are DOCSIS compliant, you
can define Circuit ID address limit (CID limit) to specify the total number of addresses that will be
allocated to Customer Premises Equipment (CPE).

Note: Your CMTS must be configured to insert the Remote ID and/or Circuit ID agent-info option into
upstream DHCP packets in order for these control options to have any effect. Consult the
documentation for your CMTS for information on configuring this.

3.5.3.5 Non-standard devices

Magic cookie: Option -6

All BOOTP and DHCP packets contain a "magic cookie" (a number) that defines the format of the
packet. You can override the value of the magic cookie using this option. The format of the response is
not changed by this option.

© 2004 Weird Solutions, Inc.


Operation 34

Terminate strings: Option -23

Some DHCP client devices incorrectly expect string values to be null terminated. Define this option to
make the server terminate its strings.

Force broadcast response: Option -8

Some DHCP-enabled devices will refuse to see a response that's unicast onto the network. Define this
option to force a broadcast response to these devices.

Force unicast response: Option -9

Some DHCP-enabled devices will simply refuse to see a response that's broadcast onto the network.
Define this option to force a unicast response to these devices.

Force BOOTP response: Option -10

This option can help an impaired DHCP-enabled device. If your device requires this option in order to
function, contact the manufacturer of the device for an upgrade.

Destination port: Option -19

Sometimes it may be desirable to force all DHCP replies to a specific UDP port number when replying
to a device, regardless of the source port the device used. The Destination port control option -19
handles this.

Warning: Be careful using this option in contexts such as the global policy where it can inadvertently
affect responses to working devices.

Legacy datagram size: Option -13

Changes the default (576 bytes) datagram size to the old 300 byte size.
3.5.3.6 Remote-boot devices

Specifying the boot file name: (including option 67)


The DHCP server supports two ways to specify a boot file name, check your client to see what method
is needed:

· The BOOTP method use: Control Option -1


· Microsoft/PXE method use: Control Option -16

© 2004 Weird Solutions, Inc.


35 Weird Solutions DHCP Turbo

Specifying 'Boot Packet area: Description:


file name'

Option -16 Extended area of This Control Option is available for


(MS Option 67 DHCP packet, devices that expect their boot file name
boot file name) tag 67 to be tagged as option 67.

Option -1 Uses the fixed The RFC method to offer a BOOTP


(Boot file name) 'filename' area of device a boot file name
the DHCP packet

Specifying the TFTP server: (option 66)


The DHCP server supports three ways to specify a TFTP server, check your client to see what method
is needed:

· Microsoft method use: Control Option -15


· BOOTP SIADDR overload: use Control Option option -14
· BOOTP SNAME overload: use Option option -20

Specifying the Packet area: Description:


TFTP server:

Option -15 Extended area of Some devices expect tag 66, TFTP
(MS Option 66 the DHCP packet server name (IP address) to always be
TFTP server with tag 66 present in a DHCP reply in order to
name) define a second stage boot server.
(Note: this is not the RFC 'Next Server'
overload method.)

Option -14 Overloaded DHCP-enabled devices should interpret


(Next server) SIADDR field in the SIADDR field of a DHCP packet as
header area with their second stage boot server.
the TFTP server's This option is used to direct the device to
IP address in the another server for the second stage of its
reply. boot process.

Option -20 Overloaded Some devices interpret the SNAME field


(Server name) SNAME field, to locate the next server in its boot
populated with the process. This Control option can be used
TFTP server's to modify the SNAME field when replying
hostname in the to these devices.
reply.

3.5.3.7 ATM support

ATM Hardware Address: Option -11

© 2004 Weird Solutions, Inc.


Operation 36

Classical-IP-over-ATM requires mapping Ethernet-like hardware addresses to the longer ATM


addresses. The ATM Hardware Address option can be used to specify the hardware address to be
used when manipulating the system's arp cache.

3.5.4 Packet inspection (for expressions)


Options for Expression writing
This DHCP server has defined many extended options in addition to the DHCP standard options.
Internal Options have a negative tag number between -1000 and -1022, and refer to specific parts of
a DHCP packet. Internal Options are normally only used when writing expressions.

Tag Type Name Description

-1014 ip address CIAddr 0.0.0.0 if the device does not already have an address,
otherwise the device's current address
-1013 ip address YIAddr Should always be 0.0.0.0 on inbound packets

-1012 ip address SIAddr Normally 0.0.0.0 on inbound packets

-1011 ip address GIAddr The ip of the first router this packet encountered. If no
router was encountered the value is 0.0.0.0.
-1010 string SName Not normally used on inbound packets

-1009 integer Flags Individual bits of this field have different meanings. Refer
to the most current DHCP RFCs for a description of the
meaning of the bit in this field.
-1008 integer Seconds The number of seconds the device has been trying to get
an address.
-1007 integer Opcode This value should always be 1 on inbound packets

-1006 integer HType The device's hardware type.

-1005 integer HLen The number of octets in the device's MAC address.

-1004 integer Hops The number of routers through which this packet passed
before arriving at this server.

-1003 integer Transaction ID A random identifier chosen by the device

-1002 byte CHAddr The device's hardware address


sequence
-1001 ip address Magic Cookie Normally contains 99.130.83.99

-1000 string Boot File If not an empty string, the device is attempting to request
that we give it specific boot file

© 2004 Weird Solutions, Inc.


Using Expressions
DHCP Turbo Administrator's Guide

Part

IV
Using Expressions 38

4 Using Expressions

4.1 Expression Editor


The Expression Editor gives you unlimited flexibility to configure your network. Instead of simply
defining static values, expressions allow you to calculate values at runtime using many different
criteria.

You can supply expressions in many places where you would normally use a literal value. For example,
instead of setting a scope's allow property to true, you could set it to [$DAY() == "Monday"]. This
expression evaluates to true on Mondays, and false on all other days, resulting in a scope that only
allows access on Mondays.

You can use expressions in the following places:

· anywhere you define a DHCP option value


· for the allow and deny properties of a scope
· for the policy name in a scope or binding

The Build… button invokes the expression editor window, and is normally available in any place where
you can use an expression instead of a literal value.

The Expression Editor interface

4.2 Data Types


The expression evaluator in this DHCP server recognizes the following data types:

© 2004 Weird Solutions, Inc.


39 Weird Solutions DHCP Turbo

string Strings are always enclosed in double quotes. "My name is"
is an example of a string.
date Dates are specified in a rigid Month, Day, Year format. Oct
1 1992 is an example of a date.
ip address An ip address is specified in dotted-decimal notation.
192.168.1.1 is an example of an ip address.
integer An integer is signed number specified in decimal form. -
1000 is an example of an integer.
boolean A boolean represents true or false. Booleans are specified
using true or false.
byte sequence A byte sequence is a sequence of 8-bit values that together
represent a single unit. 00-A0-24-2F-10-26 is an example of
a byte sequence.

© 2004 Weird Solutions, Inc.


Using Expressions 40

4.3 Operator reference


The following operators can be used in your expressions. Not all operators work on all data types.

SPECIAL CHARACTERS
() Used to change the natural order of precedence among the operators
[] Opening and closing tags for an expression

MATHEMATICAL
+ addition
- subtraction
/ division
* multiplication

COMPARISON
< less than
> greater than
<= less than or equal
>= greater than or equal
== equal to ("==" compares two values for equality, ie: "=" is only assignment)
!= not equal to

CONDITIONAL
? : Conditional (if...else)

LOGICAL OPERATORS
&& logical AND
|| logical OR
! logical NOT

LOGICAL BITWISE OPERATORS


& bitwise AND
| bitwise OR
^ bitwise XOR

UNARY OPERATORS
~ bitwise_inverse
- unary negation ("negative")

4.4 Sample Expressions


The following list of sample expressions shows can give you an idea of the types of expressions the
DHCP server can evaluate.

Scope record expressions:

© 2004 Weird Solutions, Inc.


41 Weird Solutions DHCP Turbo

Only allow Cable Modems Allow


on this scope [ $LEFT ($CLASSID(),6) == "docsis" ]

Only allow devices that Allow


have been trying to boot [ $SECS() > 20 ]
for more than 20 seconds
Only allow Packet Cable Allow
(telephony) devices in this [ $LEFT ($CLASSID(),5) == "pktc1" ]
scope
Deny this scope for Cable Deny
Modems and Packet [ $LEFT ($CLASSID(), 6) == "docsis" || $LEFT ($CLASSID(),
Cable devices (ie: all 5) == "pktc1" ]
others will be allowed)
Specify a policy to use Policy
based on the device's [ $CLASSID() == "management" ? "mgmt" : "others"]
class identifier.

4.5 Functions reference


The DHCP server provides functions that give you run-time access to different parts of the DHCP
service. These functions allow you to inspect the packet received by the DHCP server, retrieve
arbitrary values from files, read the system data and time, and more.

The view of functions available


in the Expression Editor

4.5.1 Device Identification


Device Identification functions are useful for runtime provisioning of devices on your network. These
functions each return a piece of information that identifies the specific device or class of device the
server is communicating with.

© 2004 Weird Solutions, Inc.


Using Expressions 42

If you can't find a function that handles the information you want, take a look at the $INP() function.
4.5.1.1 $RELAY.RID

This function returns the remote identifier of the device as specified by the relay agent. This is the
Option 82 Remote ID.

Arguments: None

Example 1:

$RELAY.RID()

Returns a byte sequence representing a trusted identifier for an end host.

Example 2:

$RELAY.RID() == "04-0A-14-00-01-00-B0-B0-02-00-00-00-00"

Returns true if the trusted identifier matches the specified end host.

4.5.1.2 $RELAY.CID

This function returns the identifier of the relay agent's circuit through which the device is
communicating. This is the Option 82 Circuit ID.

Arguments: None

Example 1:

$RELAY.CID ()

Returns a byte sequence representing a circuit identifier.


4.5.1.3 $RELAY.DEVICEID

This function returns the Option 82 DOCSIS device class.

Arguments: None

Example 1:

$RELAY.DEVICECLASS ()

The result is a single 32 bit number, where each bit has a specific meaning. Use the bitwise operators
(|) or (&) to test individual bits.

© 2004 Weird Solutions, Inc.


43 Weird Solutions DHCP Turbo

4.5.1.4 $RELAY.ADDRESS

This function returns the IP address of the relay agent.

Arguments: None

Example 1:

$RELAY.ADDRESS ()

Returns the relay agent's IP address.


4.5.1.5 $HWADDR

This function returns the link-layer hardware address (MAC address) of the device the server is
communicating with.

Arguments: None

Example 1:

$HWADDR()

Returns the device's link-layer hardware address.


4.5.1.6 $HWTYPE

This function returns the hardware type (eg. Ethernet) of the device the server is communicating with.

Arguments: None

4.5.1.7 $CLIENTID

This function returns the device's self-proclaimed identifier.

Arguments: None

Example 1:

$CLIENTID()

Returns an identifier for an end host.


4.5.1.8 $CLASSID

This function returns an identifier denoting the class of device the server is communicating with.

Arguments: None

Example 1:

$CLASSID()

Returns a device-class identifier.

© 2004 Weird Solutions, Inc.


Using Expressions 44

4.5.1.9 $USERCLASS

This function returns an identifier denoting the type of user or application the server is communicating
with.

Arguments: None

Example 1:

$USERCLASS()

Returns a user-class identifier.


4.5.1.10 $BOOTP

This function returns true if the device is using the BOOTP protocol, false otherwise.

Arguments: None

Example 1:

$BOOTP ()

Returns true or false depending on the protocol the device is using.

4.5.2 Packet Inspection


4.5.2.1 $INP

This is a general-purpose function that allows you to inspect the value of any DHCP option or field
found in the packet received by the server.

The tag argument is required, and specifies the data you wish to inspect. Tag numbers are listed in
section entitled Option Types.

The index argument is optional, and specifies the 1-based index used to access arbitrary elements of
an arrayed DHCP option. This argument is not normally required.

If the tag argument refers to a subencoded option, the second argument must be used and must
specify a subtag. The third argument specifies the index, and is optional.

When writing expressions using $INP, the tag you're inspecting dictates the return type. For packets
that do not contain the specified option, the return type is invalid.

Example 1:

$INP (77)

The result is a string containing the user class identifier.

Example 2:

$INP (-1002)

The result is a byte sequence representing the client device's MAC address.

Any data type can be converted at runtime to a boolean type. An invalid data type is always converted

© 2004 Weird Solutions, Inc.


45 Weird Solutions DHCP Turbo

to boolean false, and a valid data type is converted to boolean true. This allows you to evaluate the
result as a simple boolean to test for the existence of the option:

$INP (60) == true

4.5.2.2 Miscellaneous

Enter topic text here.


4.5.2.2.1 $BOOTFILE

This function returns the name of the requested boot file if the device has requested a specific boot file.
Most devices will not request a boot file, and the value of this function will be an empty string.

Arguments: None

Example 1:

$BOOTFILE ()

Returns a string value representing the requested boot file.


4.5.2.2.2 $HOPS

This function returns the number of hops through which this packet has been relayed. Most relay
agents now use directed datagrams when relaying packets, so this value will rarely rise above one (1).

Arguments: None

Example 1:

$HOPS ()

Returns a number representing the number of hops this packet has made. Not likely to reflect the
actual number of relay agents through which this packet passed.
4.5.2.2.3 $HTYPE

This function returns the hardware type in use on the device with which the server is communicating.
Hardware types are listed in Internet RFCs.

Arguments: None

Example 1:

$HTYPE ()

Returns a number representing the hardware type in use on the device.

© 2004 Weird Solutions, Inc.


Using Expressions 46

4.5.2.2.4 $HLEN

This function returns the length (in bytes) of the value returned by the $HWADDR() function.

Arguments: None

Example 1:

$HLEN ()

Returns a number representing the hardware address length.


4.5.2.2.5 $VENDORSPECIFIC

This function returns any vendor-specific information the device is sending to the server.

Arguments: None

Example 1:

$VENDORSPECIFIC ()

Returns vendor-specific information.


4.5.2.2.6 $XID

This function returns the current transaction id the device is using to communicate with the server.

Arguments: None

Example 1:

$XID ()

Returns a number representing the transaction id.


4.5.2.2.7 $SECS

This function returns the number of seconds the device has been attempting to get an address.

Arguments: None

Example 1:

$SECS ()

Returns a number of seconds.


4.5.2.2.8 $COOKIE

This function returns the magic cookie the device is using.

Arguments: None

Example 1:

$COOKIE ()

Returns the cookie.

© 2004 Weird Solutions, Inc.


47 Weird Solutions DHCP Turbo

4.5.2.3 Deprecated

Enter topic text here.


4.5.2.3.1 $INP_HAS

This function is deprecated. New expressions can simply use $INP(tag) or a specific device
identification function to test for the existence of an option.

4.5.3 Data and Time


4.5.3.1 $DATE ([format])

This function returns the current date. The default return type is a string, but the optional format
argument allows you to return the date as an integer value or any other type as specified by the ISO-C
strftime() format.

Example 1:

$DATE ()

The return value is a string containing "2002-01-25".

Example 2:

$DATE ("integer")

The return value is an integer whose value is 020125.

Example 3:

$DATE ("%c")

The return value is a string containing the date and time in the current locale format: "Thu Jul 25
16:56:18 CEST 2002".

The ISO-C strftime() function can take a wealth of format specifiers. More information about this
function can be found on the internet at various locations.

4.5.3.2 $YEAR ([format])

This function returns the current year. The default return type is a string, but the optional format
argument allows you to return the year as an integer value or any other type as specified by the ISO-C
strftime() format.

Example 1:

$YEAR ()

The return value is a string containing "2002".

Example 2:

$YEAR ("integer")

The return value is an integer whose value is 2002.

Example 3:

© 2004 Weird Solutions, Inc.


Using Expressions 48

$YEAR ("%y")

The return value is a string containing the year without century "02".

The ISO-C strftime() function can take a wealth of format specifiers. More information about this
function can be found on the internet at various locations.

4.5.3.3 $MONTH ([format])

This function returns the current month. The default return type is a string, but the optional format
argument allows you to return the month as an integer value or any other type as specified by the ISO-
C strftime() format.

Example 1:

$MONTH ()

The return value is a string containing "January".

Example 2:

$MONTH ("integer")

The return value is an integer whose value is 1.

Example 3:

$MONTH ("%b")

The return value is a string containing the abbreviated month name "Jan".

The ISO-C strftime() function can take a wealth of format specifiers. More information about this
function can be found on the internet at various locations.

4.5.3.4 $DAY ([format])

This function returns the current day of the week. The default return type is a string, but the optional
format argument allows you to return the current day as an integer value or any other type as specified
by the ISO-C strftime() format.

Example 1:

$DAY ()

The return value is a string containing "Thursday".

Example 2:

$DAY ("integer")

The return value is an integer whose value is 25, corresponding to the day of the month.

Example 3:

$DAY ("%j")

© 2004 Weird Solutions, Inc.


49 Weird Solutions DHCP Turbo

The return value is a string containing the julian day: "206".

The ISO-C strftime() function can take a wealth of format specifiers. More information about this
function can be found on the internet at various

4.5.3.5 $TIME ([format])

This function returns the current time. The default return type is a string, but the optional format
argument allows you to return the current time as an integer value or any other type as specified by the
ISO-C strftime() format.

Example 1:

$TIME ()

The return value is a string containing "04:58:26 PM".

Example 2:

$TIME ("integer")

The return value is an integer whose value is 1658, corresponding to 16:58 in 24hr time format.

Example 3:

$TIME ("%Z")

The return value is a string containing your timezone name: "CEST".

The ISO-C strftime() function can take a wealth of format specifiers. More information about this
function can be found on the internet at various locations

4.5.4 File I/O


4.5.4.1 $VALUE (file,key)

This function retrieves a single value from a file, using the key argument as an index. The format of the
file is:

key1=192.168.1.1
key2=192.168.1.2
<default>=192.168.1.254

...

The key and value can be any data type. The special <default> key can also be listed in this file. If it
exists, all non-matching lookups return this value.

Example:

$VALUE ("valid_macs.txt",$INP (-1002))

This expression implies that your file uses hardware addresses as the key, since tag number -1002
refers to the hardware address sent by the device.

© 2004 Weird Solutions, Inc.


Using Expressions 50

4.5.5 Type Conversion


4.5.5.1 $BOOL (value)

This function attempts to convert value to a boolean value. value can be any data type, but the
conversion is not guaranteed to succeed because the type or format of value may not facilitate
conversion.

Example:

$BOOL ("true")

This returns a boolean value of true.

4.5.5.2 $INT (value)

This function attempts to convert value to an integer. value can be any data type, but the conversion is
not guaranteed to succeed because the type or format of value may not facilitate conversion.

Example:

$INT ("206")

This returns an integer whose value is 206.


4.5.5.3 $IP (value)

This function attempts to convert value to an ip address type. value can be any data type, but the
conversion is not guaranteed to succeed because the type or format of value may not facilitate
conversion.

Example:
$IP ("192.168.1.1")

This returns an IP address having the value 192.168.1.1.


4.5.5.4 $MAC (value)

This function attempts to convert value to a byte sequence, the typical format of a hardware address.
value can be any data type, but the conversion is not guaranteed to succeed because the type or
format of value may not facilitate conversion.

Example:
$MAC ("00-A0-24-2F-10-26")

This returns a sequence of bytes having the value 00-A0-24-2F-10-26.

© 2004 Weird Solutions, Inc.


51 Weird Solutions DHCP Turbo

4.5.5.5 $STR (value [,delimiter])

This function converts value to a string. It is always possible to convert a non-string type to a string.

Example:
$STR (00-A0-24-2F-10-26)

This returns a string whose value is "00-A0-24-2F-10-26".

Use the optional delimiter argument to specify your own delimiter for data types that support them:

Examples:
$STR ($HWADDR(),"_")
This returns a string whose value has the form: "00_A0_24_2F_10_26".

$STR ($HWADDR(),":")
This returns a string whose value has the form: "00:A0:24:2F:10:26".

4.5.5.6 $TEXT

This function converts a byte_sequence to a string. Not the same as $STRING, which simply gives a
text representation of the bytes.

4.5.6 String Manipulation


4.5.6.1 $LEFT (string, count)

This function returns the left-most count elements from string.

Example 1:

$LEFT ("hello, world",5)

The result is a string containing "hello".

The string argument need not be of type string; it may be any type that can be converted to a string.
This includes MAC and INT types. In the case of a non-string type, the argument is first converted to a
string, left-stripped, then returned as a string type. If you require the result to be in another format, you
can simply wrap this function with a data conversion function, shown below:

Example 2:

$MAC ( $LEFT (00-A0-24-2F-10-26,5) )

The result is a hardware address containing two bytes, 00 and 0A.

© 2004 Weird Solutions, Inc.


Using Expressions 52

4.5.6.2 $RIGHT (string, count)

This function returns the right-most count elements from string.

Example 1:

$LEFT ("hello, world",5)

The result is a string containing "world".

The string argument need not be of type string; it may be any type that can be converted to a string.
This includes MAC and INT types. In the case of a non-string type, the argument is first converted to a
string, left-stripped, then returned as a string type. If you require the result to be in another format, you
can simply wrap this function with a data conversion function, shown below:

Example 2:

$MAC ( $LEFT (00-A0-24-2F-10-26,5) )

The result is a hardware address containing two bytes, 10 and 26.

4.5.6.3 $MID (string, count, pos)

This function returns count elements from string, starting at position pos. The pos argument specifies
the zero-based index of the starting character.

Example 1:

$MID ("hello, world",1,4)

The result is a string containing "ello".

The string argument need not be of type string; it may be any type that can be converted to a string.
This includes MAC and INT types. In the case of a non-string type, the argument is first converted to a
string, the mid-result is calculated, and the result is returned as a string type. If you require the result to
be in another format, you can simply wrap this function with a data conversion function, shown below:

Example 2:

$MAC ( $MID (00-A0-24-2F-10-26,3,5) )

The result is a hardware address containing two bytes, A0 and 24.

4.5.7 Error Handling


4.5.7.1 $DEFAULT (value)

This function allows you to specify a return value in the event the expression cannot be evaluated at
runtime. The value argument is required, and specifies the default value to be used in the event of a
runtime error.

This function should be placed first, followed by a comma, then your expression.

Example:

$DEFAULT ("basic.00"), "basic." + 42

© 2004 Weird Solutions, Inc.


53 Weird Solutions DHCP Turbo

Returns "basic.00" because of a type mismatch; it's not possible to add a string and a number.

© 2004 Weird Solutions, Inc.


Additional Tools
DHCP Turbo Administrator's Guide

Part

V
55 Weird Solutions DHCP Turbo

5 Additional Tools

5.1 Backup and Restore


5.1.1 Backing up your database

Overview
Your important DHCP files are stored in the DHCP server's database directory. A full backup of the
files in the database directory can normally only be done when the DHCP server is stopped. However a
dump_bindings command can be issued which 'dumps' the binding records while the DHCP server is
running. This and can be later used for repopulating a new database.

Windows The database directory is a located under the DHCP server's


program directory.
Linux The database directory is /var/lib/dhcptd.
Solaris The database directory is /var/dhcptd.

The database directory files

© 2004 Weird Solutions, Inc.


Additional Tools 56

mappings.dbf XBase tables


mappings.mdx
The bindings table is an Xbase format database table. The actual
records are stored in the mappings.dbf file, and the indexes are stored
in the file mappings.mdx

Only attempt to backup the Xbase files directly from disk while the
DHCP service is stopped, since the backup could otherwise be in an
inconsistent state and unusable.

In order to export the bindings database while the DHCP server is


running, use the dhcpti.exe command line utility:

dhcpti --noheader -e dump_bindings --server mydhcpserver


-p mypassword > bindings_backup.txt

The output from this command is a full set of records formatted as a


command sequence. It can be fed directly back into dhcpti to
regenerate your database. See Restoring your database.

scopes.txt ASCII tables:


i_clients.txt
x_clients.txt
policies.txt Most tables in your database directory are in plain ASCII text format,
options.txt and end with ".txt". These files rarely change, and can be backed up by
sub_options.txt simply copying them to a secure location.

In the event you need to restore one or more of your ASCII tables,
simply stop the DHCP service, copy your tables into the database
directory, and restart the service. You may want to check the system
event log to ensure there were no errors encountered.

Note: If you copy these files between different platforms, ensure that
they are have the correct ASCII format for the machine on which they'll
be used. Windows and Unix use different formats for ASCII.
prestart.txt Improper shutdown indicator

Used internally to detect if a improper shutdown has occurred: if the file


contain a "pack_bindings" key on startup, it will be used to initiate re
indexing of the database. By manually adding the line
"pack_bindings" to the file before startup, re indexing of the database
will commence.

5.1.2 Restoring your database

© 2004 Weird Solutions, Inc.


57 Weird Solutions DHCP Turbo

mappings.dbf XBase tables


mapping.mdx
To restore your database from a backup command:

1. Stop the DHCP service


2. Delete the old mappings.dbf and mappings.mdx files from your
database directory
3. Start the DHCP service
4. Ensure that new mappings.dbf and mappings.mdx files exist in the
database directory
5. Execute the command shown to regenerate your database:

dhcpti --noheader --server myserver -p mypassword <


bindings_backup.txt

6. Verify that your database records exist.

scopes.txt ASCII tables


i_clients.txt
x_clients.txt
policies.txt In the event you need to restore one or more of your ASCII tables,
options.txt simply stop the DHCP service, copy your tables into the database
sub_options.txt directory, and restart the service. You may want to check the system
event log to ensure there were no errors encountered.

Note: If you copy these files between different platforms, ensure that
they are have the correct ASCII format for the machine on which they'll
be used. Windows and Unix use different formats for ASCII.

prestart.txt Improper shutdown indicator

By adding the line "pack_bindings" to the file, re indexing of the


database will commence on startup.

5.2 Command Line utility


5.2.1 Using the dhcpti utlity
The DHCP server package includes dhcpti, a text-based utility for working with your DHCP server.
This console application can be run interactively or from a script, and is designed to give system
integrators a flexible way to tie the DHCP server into a larger system.

When using the Server Manager graphical interface you can select View->Console to "spy" on the
communication between the GUI and server. Watching this communication is a great way to
understand how to talk to the server from within dhcpti.

Interacting with a server


Invoke dhcpti with the name or IP address of the server as a command line argument. If no address is
specified the local computer is assumed. After typing in your password you can see brief instructions
by entering:

help
[ENTER]
[ENTER]

© 2004 Weird Solutions, Inc.


Additional Tools 58

To exit dhcpti type:

exit
[ENTER]
[ENTER]

dhcpti also accepts your password as a command line argument. For a complete list of supported
arguments, type:

dhcpti --help

5.2.1.1 Server properties

Getting DHCP server configuration information


Many of the properties of the DHCP server can be retrieved and passed to the server from command
line arguments. The DHCP sever can also be started and stopped this way

Reading and setting server properties


Reading version information
Starting and stopping the service
5.2.1.1.1 Reading server properties

You can read this DHCP server's properties using the get_properties command.

get_properties
[ENTER]

code=ack
private_server=false
write_caching=false
enable_logging=false
log_file=./dhcpt.log
dynamic_bootp=true
deny_ras=false

5.2.1.1.2 Setting a server property

set_properties
private_server=true
write_caching=false
enable_logging=false
log_file=./dhcpt.log
dynamic_bootp=true
deny_ras=false
[ENTER]

code=ack

5.2.1.1.3 Server information

The info command returns miscellaneous information about this DHCP server.

© 2004 Weird Solutions, Inc.


59 Weird Solutions DHCP Turbo

info
[ENTER]

code=ack
build=1251
build_type=retail
features=docsis
max_bindings=3000
version=2.0
name=offset.myown-solutions.com
platform=Windows NT 4.0

5.2.1.1.4 Starting and stopping the service

On Windows platforms dhcpti can be used to start, stop or restart the DHCP service. No password is
required because the Windows security system is used for authentication, but you must have system
administrator privileges on the target system to perform these commands.

For a complete list of supported arguments, type:

dhcpti --help

5.2.1.2 Scopes

Scopes define the basis for dynamic address allocations. Each field of a scope record is shown here
with a description of the field's purpose.

© 2004 Weird Solutions, Inc.


Additional Tools 60

name The unique name for this scope.

active Can be true or false. When false, no addresses are


allocated from this scope.
giaddr Network segment to which this scope is attached.

description A description for this scope.

policy A policy from which this scope should inherit options.

rangestart Together with rangestop defines an inclusive IP address


range from which to allocate addresses.
rangestop See rangestart.

xrange Defines a range of IP addresses to be excluded from


allocation.
allow Optional. If defined, should be an expression that
evaluates to true or false. See the section entitled Using
Expressions for information about using expressions.
deny Optional. If defined, should be an expression that
evaluates to true or false. See the section entitled
Advanced Configurations: Using Expressions for
information about using expressions.
option xxx may have as many option fields as you wish. The Subnet
Mask and DHCP address lease time options are required
for all scopes.

5.2.1.2.1 Enumerating all scopes

enum_scopes
[ENTER]

scope=Charlotte
scope=Atlanta
scope=Miami
code=ack

© 2004 Weird Solutions, Inc.


61 Weird Solutions DHCP Turbo

5.2.1.2.2 Reading a specific scope

read_scope=Charlotte
[ENTER]

code=ack
active=true
policy=
description=
giaddr=0.0.0.0
name=Charlotte
rangestart=192.168.1.120
rangestop=192.168.1.125
xrange=
option Subnet mask=255.255.255.0
option DHCP address lease time=300
option Force broadcast=true

5.2.1.2.3 Adding a new scope

add_scope
name=Raleigh
active=true
policy=
description=
giaddr=0.0.0.0
rangestart=192.168.1.120
rangestop=192.168.1.125
xrange=
option Subnet mask=255.255.255.0
option DHCP address lease time=300
option Force broadcast=true
[ENTER]

code=ack
Blank fields may be omitted if they are not required.

5.2.1.2.4 Changing a scope

To change a scope requires that you specify all information for that scope, much the same way as
when adding a scope.

write_scope
active=true
giaddr=0.0.0.0
name=Test
rangestart=192.168.1.121
rangestop=192.168.1.125
xrange=
option Subnet mask=255.255.255.0
option DHCP address lease time=300
option Force broadcast=false
[ENTER]

code=ack

© 2004 Weird Solutions, Inc.


Additional Tools 62

5.2.1.2.5 Deleting a scope

delete_scope=Test
[ENTER]

code=ack

5.2.1.3 Policies

Policies are used to refer to a group of options by a name. Each field of a policy record is shown here
with a description of the field's purpose.

name The unique name for this policy.

type Current supported types are general and global. There should only ever be one
global policy.

key Not used for general or global type policies. Can be any value.

description A description for this policy.

policy A policy from which this policy should inherit options. Currently unsupported.

option xxx Each recognized option should be preceded with the keyword 'option'. You may
have as many option fields as you wish.

5.2.1.3.1 Enumerating all policies

enum_policies
[ENTER]

policy=Global
policy=generic
code=ack

5.2.1.3.2 Reading a specific policy

read_policy=Premium
[ENTER]

code=ack
name=Premium
description=Premium services
option Domain name servers=192.168.1.1
option Boot file=premium.bin

© 2004 Weird Solutions, Inc.


63 Weird Solutions DHCP Turbo

5.2.1.3.3 Adding a new policy

add_policy
name=test
description=For test purposes
option Lease log=c:\logs\test_leases.log
option Log servers=192.168.1.4
[ENTER]

code=ack
5.2.1.3.4 Changing a policy

Use the write_policy command to create a new policy and the change_policy command to make
partial updates to an existing policy, using the "name=xxx", and adding attributes to change/add.

write_policy
name=test
description=For test purposes
option Lease log=c:\logs\test.log
option Log servers=192.168.1.3
[ENTER]

code=ack

change_policy
name=test
option Lease log=c:\logs\test2.log
[ENTER]

code=ack
5.2.1.3.5 Deleting a policy

delete_policy=test
[ENTER]

code=ack

5.2.1.4 Bindings

Although it is possible to perform the following operations on pendings, you will rarely see any pending
allocations unless your server is extremely busy. The fields of a pending record are shown here with an
explanation of each field.

© 2004 Weird Solutions, Inc.


Additional Tools 64

clientid The unique device identifier (also known as client identifier). This is usually
the hardware address followed by the device's MAC address.

giaddr The relay agent through which this device is booting.

ipaddr The IP address that is pending allocation to this device.

lease_length The duration for which the IP address binding is valid (once committed).

scope The scope from which this record's IP address was taken.

pend_time The date and time this address was offered to the device.

remote id The DOCSIS version of this DHCP server records the remote id supplied by
the CMTS in this field.

circuit id The DOCSIS version of this DHCP server records the circuit id supplied by
the CMTS in this field.

© 2004 Weird Solutions, Inc.


65 Weird Solutions DHCP Turbo

5.2.1.4.1 Enumerating bindings

You can enumerate all bindings on the server, or you can enumerate a subset of bindings by specifying
a filter. Examples of each method are shown below.

Enumerate bindings by device identifier or IP address


enum_bindings
[ENTER]

...or by IP address

enum_addrs
[ENTER]

Enumerate an arbitrary subset of bindings


The count= setting may be positive or negative, allowing forward or backward traversal.

enum_bindings=01-00-A0-22-4F-6C-5C
count=3
[ENTER]

binding=01-00-A0-22-4F-6C-5C
binding=01-00-A0-22-4F-6C-5D
binding=01-00-A0-22-4F-6C-5E
code=ack

Enumerate bindings in a scope


Enumerates all bindings for a scope. This includes only dynamic leases created from this scope.

enum_bindings
scope=myscope
[ENTER]

binding=01-00-A0-22-4F-6C-5E
binding=01-00-A0-22-4F-6C-5F
binding=01-00-A0-26-26-31-F1
binding=01-00-A0-26-26-31-F2
binding=01-00-A0-26-26-31-F3
binding=01-00-A0-26-26-31-F4
binding=01-00-A0-26-26-31-F5
code=ack

Enumerate bindings in an address range


enum_bindings
range=192.168.1.1-192.168.1.20
[ENTER]

binding=01-00-A0-26-26-31-F3
binding=01-00-A0-26-26-31-F4
binding=01-00-A0-26-26-31-F5
code=ack

© 2004 Weird Solutions, Inc.


Additional Tools 66

Enumerate bindings in a scope range


You can specify a scope name for the range instead of an IP address range. In this case, the server
first reads the scope record, then filters out bindings that lie outside the scope's address range. The
difference between the range=myscope and scope=myscope methods is that the former also
returns fixed reservations that lie within the scope's address range.

enum_bindings
range=myscope
[ENTER]

binding=01-00-A0-22-4F-6C-5E
binding=01-00-A0-22-4F-6C-5F
binding=01-00-A0-26-26-31-F1
binding=01-00-A0-26-26-31-F2
binding=01-00-A0-26-26-31-F3
binding=01-00-A0-26-26-31-F4
binding=01-00-A0-26-26-31-F5
code=ack

5.2.1.4.2 Reading bindings

Because the bindings database can be quite large, we've provided a number of ways to filter the output
of a read_bindings command.

Single binding records can be retrieved by specifying a client identifier or ip address, and multiple
binding records
can be retrieved by using any combination of scope, range and dBase expression filtering.

The next few topics show how to use each of these methods.

Note: read_bindings and read_binding refer to the same command. Either format is acceptable.
5.2.1.4.2.1 Individual bindings by IP address

read_binding
ipaddr=192.168.1.125
[ENTER]

code=ack
clientid=01-00-A0-26-26-31-F5
policy=
commit_time=Thu Sep 21 13:34:09 2000
giaddr=0.0.0.0
hostname=testbox.my-ownsolutions.com
ipaddr=192.168.1.125
lease_length=0:5:0
protocol=dhcp
remote id=
scope=Charlotte

© 2004 Weird Solutions, Inc.


67 Weird Solutions DHCP Turbo

5.2.1.4.2.2 Individual bindings by Client Identifier

read_binding
clientid=01-00-A0-26-26-31-F5
[ENTER]

code=ack
clientid=01-00-A0-26-26-31-F5
policy=
commit_time=Thu Sep 21 13:34:09 2000
giaddr=0.0.0.0
hostname=testbox.myown-solutions.com
ipaddr=192.168.1.125
lease_length=0:5:0
protocol=dhcp
remote id=
scope=Charlotte

5.2.1.4.2.3 Multiple bindings by scope

You can retrieve all bindings that were dynamically created from a given scope using the specialized
scope=<name> filter. This filter only returns dynamic leases created from the named scope.

read_bindings
scope=Charlotte
[ENTER]

clientid=01-00-A0-26-26-31-F5
policy=
commit_time=Thu Sep 21 13:34:09 2000
giaddr=0.0.0.0
hostname=testbox.myown-solutions.com
ipaddr=192.168.1.125
lease_length=0:5:0
protocol=dhcp
remote id=
scope=Charlotte
-
clientid=01-00-A0-26-26-31-F6
policy=
commit_time=Thu Sep 21 13:34:09 2000
giaddr=0.0.0.0
hostname=testbox2.myown-solutions.com
ipaddr=192.168.1.126
lease_length=0:5:0
protocol=dhcp
remote id=
scope=Charlotte
-
code=ack

5.2.1.4.2.4 Multiple bindings by address range

You can retrieve all bindings that fall within a specified address range using the specialized
range=<value> filter. The value can be a literal address range (e.g. 192.168.1.25-192.168.1.26), or a

© 2004 Weird Solutions, Inc.


Additional Tools 68

scope name.

The syntax range=scope_name differs from the syntax scope=scope_name in that the former
returns all bindings within the given scope's address range, regardless of whether they were created as
fixed reservations or dynamic bindings. The latter syntax will only return dynamic bindings that were
created from the given scope.

Example 1: Using a literal range

read_binding
range=192.168.1.25-192.168.1.26
[ENTER]

clientid=01-00-A0-26-26-31-F5
policy=
commit_time=Thu Sep 21 13:34:09 2000
giaddr=0.0.0.0
hostname=testbox.myown-solutions.com
ipaddr=192.168.1.125
lease_length=0:5:0
protocol=dhcp
remote id=
scope=Charlotte
-
clientid=01-00-A0-26-26-31-F6
policy=
commit_time=Thu Sep 21 13:34:09 2000
giaddr=0.0.0.0
hostname=testbox2.myown-solutions.com
ipaddr=192.168.1.126
lease_length=0:5:0
protocol=dhcp
remote id=
scope=Charlotte
-
code=ack

Example 2: Using a scope range

read_binding
range=Charlotte
[ENTER]

clientid=01-00-A0-26-26-31-F5
policy=
commit_time=Thu Sep 21 13:34:09 2000
giaddr=0.0.0.0
hostname=testbox.myown-solutions.com
ipaddr=192.168.1.125
lease_length=0:5:0
protocol=dhcp
remote id=
scope=Charlotte
-
clientid=01-00-A0-26-26-31-F6
policy=
commit_time=Thu Sep 21 13:34:09 2000

© 2004 Weird Solutions, Inc.


69 Weird Solutions DHCP Turbo

giaddr=0.0.0.0
hostname=testbox2.myown-solutions.com
ipaddr=192.168.1.126
lease_length=0:5:0
protocol=dhcp
remote id=
scope=Charlotte
-
code=ack

5.2.1.4.2.5 Multiple bindings by expression

You can retrieve an arbitrary set of bindings that match a dBase-style expression. When writing dBase
expressions you will find it useful to know the following field names. All fields are text. The ipaddress
field contains expanded octets, such that an address of "172.0.0.1" is stored as "172.000.000.001".

clientid : The device's 'client identifier'


ipaddress : The IP address assigned to the device
giaddr : The address of the relay agent through which this client was booted
hostname : The supplied or generated hostname for this device
remoteid : The remote identifier for this device (supplied by the intermediate relay agent)
circuit : The circuit identifier for this device (supplied by the intermediate relay agent)
scope : The scope name from which this binding was created. This field is blank for
reservations.
collection : A sequence of collection names to be applied to this binding. For all dynamic bindings
this
value is <default>. For reservations it is an arbitrary set of names.
issuetime : The absolute time this binding was issued or last updated.
duration : The length of time this binding is valid. The format is h:m:s.
clienttype : The boot protocol the device is using. Values are "dhcp" and "bootp".
options : An arbitrary set of options to be applied to this binding.

The example below returns all records where the clientid field begins with the sequence "01-00-
A0".

read_bindings
filter=LEFT (clientid,8) = "01-00-A0"
[ENTER]

clientid=01-00-A0-26-26-31-F5
policy=
commit_time=Thu Sep 21 13:34:09 2000
giaddr=0.0.0.0
hostname=testbox.myown-solutions.com
ipaddr=192.168.1.125
lease_length=0:5:0
protocol=dhcp
remote id=
scope=Charlotte
-
clientid=01-00-A0-26-26-31-F6
policy=
commit_time=Thu Sep 21 13:34:09 2000
giaddr=0.0.0.0
hostname=testbox2.myown-solutions.com
ipaddr=192.168.1.126

© 2004 Weird Solutions, Inc.


Additional Tools 70

lease_length=0:5:0
protocol=dhcp
remote id=
scope=Charlotte
-
code=ack

5.2.1.4.2.6 Mixing filters

Filters for reading multiple records can be mixed within the same command sequence. The example
below returns all records from the scope Charlotte that also have a client identifier starting with the
sequence "01-00-A0".

read_bindings
scope=Charlotte
filter=LEFT (clientid,8) = "01-00-A0"
[ENTER]

clientid=01-00-A0-26-26-31-F5
policy=
commit_time=Thu Sep 21 13:34:09 2000
giaddr=0.0.0.0
hostname=testbox.myown-solutions.com
ipaddr=192.168.1.125
lease_length=0:5:0
protocol=dhcp
remote id=
scope=Charlotte
-
clientid=01-00-A0-26-26-31-F6
policy=
commit_time=Thu Sep 21 13:34:09 2000
giaddr=0.0.0.0
hostname=testbox2.myown-solutions.com
ipaddr=192.168.1.126
lease_length=0:5:0
protocol=dhcp
remote id=
scope=Charlotte
-
code=ack

© 2004 Weird Solutions, Inc.


71 Weird Solutions DHCP Turbo

5.2.1.4.2.7 Reading all bindings

You can dump the entire contents of the bindings database using the dump_bindings command.

dump_bindings
[ENTER]

clientid=01-00-A0-26-26-31-F5
policy=
commit_time=Thu Sep 21 13:34:09 2000
giaddr=0.0.0.0
hostname=testbox.myown-solutions.com
ipaddr=192.168.1.125
lease_length=0:5:0
protocol=dhcp
remote id=
scope=Charlotte
-
clientid=01-00-A0-26-26-31-F6
policy=
commit_time=Thu Sep 21 13:34:09 2000
giaddr=0.0.0.0
hostname=testbox2.myown-solutions.com
ipaddr=192.168.1.126
lease_length=0:5:0
protocol=dhcp
remote id=
scope=Charlotte
-

This command does not generate a code=ack response. Its output is designed to be saved, and later
fed back into the command-line tool for regenerating your database. See the section on Backup for
more information about this command.

© 2004 Weird Solutions, Inc.


Additional Tools 72

5.2.1.4.3 Adding a new binding

add_binding
clientid=01-00-A0-00-00-00-00
policy=
commit_time=Thu Sep 21 13:34:09 2000
giaddr=0.0.0.0
fixed=true
hostname=testbox.myown-solutions.com
ipaddr=192.168.1.125
lease_length=0:5:0
protocol=dhcp
remote id=
scope=Charlotte
[ENTER]

code=ack

* The clientid field should be whatever your device uses as its device identifier (also known as client
identifier). This is normally the hardware type followed by the MAC address.

* You can create a dynamic binding by setting fixed=false.

5.2.1.4.4 Changing a binding

Use the write_binding command to create a new binding record and the change_binding command
to make partial updates to existing binding records.

write_binding
clientid=01-00-A0-00-00-00-00
policy=
commit_time=Thu Sep 21 13:34:09 2000
giaddr=0.0.0.0
hostname=testbox.myown-solutions.com
ipaddr=192.168.1.124
lease_length=0:5:0
protocol=dhcp
remote id=
scope=Charlotte
[ENTER]

code=ack

change_binding
clientid=01-00-A0-00-00-00-00
lease_length=0:5:0
[ENTER]

code=ack

© 2004 Weird Solutions, Inc.


73 Weird Solutions DHCP Turbo

5.2.1.4.5 Deleting a binding

delete_binding=01-00-A0-00-00-00-00
[ENTER]

code=ack

5.2.1.5 Pendings

Although it is possible to perform the following operations on pendings, you will rarely see any pending
allocations unless your server is extremely busy. The fields of a pending record are shown here with an
explanation of each field.

clientid The unique device identifier (also known as client identifier). This is
usually the hardware address followed by the device's MAC address.

giaddr The relay agent through which this device is booting.

ipaddr The IP address that is pending allocation to this device.

lease_length The duration for which the IP address binding is valid (once
committed).

scope The scope from which this record's IP address was taken.

pend_time The date and time this address was offered to the device.

remote id The DOCSIS version of this DHCP server records the remote id
supplied by the CMTS in this field.

circuit id The DOCSIS version of the DHCP server records the circuit id
supplied by the CMTS in this field.

5.2.1.5.1 Enumerating all pendings

enum_pendings
[ENTER]

code=ack

5.2.1.5.2 Reading a specific pending

It is very likely that a read for a specific pending will fail because the device transitioned from a pending
state to a bound state during the time between you enumerated the pendings and when you issued the
read.

read_pending=01-00-A0-00-00-00-00
[ENTER]

code=nak
session_message=Record not found

© 2004 Weird Solutions, Inc.


Additional Tools 74

5.2.1.5.3 Adding a new pending

Adding a pending record is not supported. You should never need to perform this operation.

5.2.1.5.4 Changing a pending

Changing a pending record is not supported. If you believe the DHCP server has a pending record
that's in error, you may delete it, although these records are periodically deleted automatically.

5.2.1.5.5 Deleting a pending

delete_pending=01-00-A0-00-00-00-00
[ENTER]

code=nak
session_message=Record not found

5.2.1.6 Device exclusions

The DHCP server maintains a list of devices that should be denied service under all conditions. This is
useful to deny certain devices from each server in a multi-server environment, or to deny service to
devices that are known to behave badly. The fields of an xclient (device exclusion) record are shown
here with an explanation of each field.

clientid The unique device identifier (also known as client identifier). This is
usually the hardware address followed by the device's MAC
address.

description A description for this device exclusion.

5.2.1.6.1 Enumerating all device exclusions

enum_xclients
[ENTER]

code=ack
xclient=01-01-00-33-00-00-22
xclient=01-01-00-FF-00-4C-3D

5.2.1.6.2 Reading a specific device exclusion

read_xclient=01-01-00-33-00-00-22
[ENTER]

code=ack
clientid=01-01-00-33-00-00-22
description=Ghostrider test box

© 2004 Weird Solutions, Inc.


75 Weird Solutions DHCP Turbo

5.2.1.6.3 Adding a new device exclusion

add_xclient
clientid=01-01-00-33-00-00-44
description=test
[ENTER]

code=ack

5.2.1.6.4 Changing a device exclusion

write_xclient
clientid=01-01-00-33-00-00-44
description=Secondary test box
[ENTER]

code=ack

5.2.1.6.5 Deleting a device exclusion

delete_xclient=01-01-00-33-00-00-44
[ENTER]

code=ack

5.2.1.7 Device registrations

If the private server property is enabled, the DHCP server maintains a list of device identifiers that are
explicitly allowed to use this server. Using device registrations can be useful to secure the server, but
still allow the DHCP address management. The fields of an iclient (device registration) record are
shown here with an explanation of each field.

clientid The unique device identifier (also known as client identifier).


This is usually the hardware address followed by the device's
MAC address.
description A description for this device registration.

5.2.1.7.1 Enumerating all device registrations

enum_iclients
[ENTER]

code=ack
iclient=01-01-00-33-00-00-22
iclient=01-01-00-FF-00-4C-3D

5.2.1.7.2 Reading a specific device registration

read_iclient=01-01-00-33-00-00-22
[ENTER]

© 2004 Weird Solutions, Inc.


Additional Tools 76

code=ack
clientid=01-01-00-33-00-00-22
description=Ghostrider test box

5.2.1.7.3 Adding a new device registration

add_iclient
clientid=01-01-00-33-00-00-44
description=test
[ENTER]

code=ack

5.2.1.7.4 Changing a device registration

write_iclient
clientid=01-01-00-33-00-00-44
description=Secondary test box
[ENTER]

code=ack

5.2.1.7.5 Deleting a device registration

delete_iclient=01-01-00-33-00-00-44
[ENTER]

code=ack

5.2.1.8 Option types

The DHCP server maintains a table of all options it recognizes. This table includes RFC-defined
options, Control options, and user-defined options. The fields of an optiontype record are shown here
with an explanation of each field.

© 2004 Weird Solutions, Inc.


77 Weird Solutions DHCP Turbo

tag The unique tag for this option

name The unique name for this option

type The data type for this option. Valid values are 8bit, 16bit, 32bit, string, ipaddr,
bool, time, hardware_address and control.

description A description for this option type

advanced Not currently used.

arrayed Specifies whether or not this option type allows multiple values to be defined. Can
be true or false.

single_hosts Specifies that this option type can only be defined for a single host; it cannot be
defined in a scope or policy. Can be true or false.

signed If numeric, specifies whether or not this value can be signed. Can be true or false.

user_definable Some option types are not meant to have user-definable values. One example is
the MAXIMUM_MESSAGE_SIZE, which a DHCP device uses to specify the
largest size datagram it can receive from a server. This field is false for such
options.

© 2004 Weird Solutions, Inc.


Additional Tools 78

5.2.1.8.1 Enumerating all option types

By default option types are enumerated by tag:

enum_optiontypes
[ENTER]

code=ack
optiontype=-34
optiontype=-33
optiontype=-32
optiontype=-31
optiontype=-30
optiontype=-29
optiontype=-28
optiontype=-27
optiontype=-26

<output clipped for brevity>

Specify names to enumerate option types by name instead:

enum_optiontypes=names
[ENTER]

code=ack
optiontype=Subnet mask
optiontype=Time offset
optiontype=Gateways
optiontype=Time servers
optiontype=IEN116 name servers
optiontype=Domain name servers
optiontype=Log servers
optiontype=Cookie/Quote servers

<output clipped for brevity>

5.2.1.8.2 Reading a specific option type

The read_optiontype command can take a numeric tag or an alphanumeric name as its argument. In
this example we use the name of the option type.

read_optiontype=Subnet mask
[ENTER]

code=ack
advanced=false
arrayed=false
description=Specifies a subnet mask for the device
name=Subnet mask
single_hosts=false
signed=false
tag=1
type=ipaddr
user_definable=true

© 2004 Weird Solutions, Inc.


79 Weird Solutions DHCP Turbo

5.2.1.8.3 Adding a new option type

add_optiontype
advanced=false
arrayed=false
description=For testing purposes
name=Test option
single_hosts=false
signed=false
tag=128
type=ipaddr
user_definable=true
[ENTER]

code=ack

5.2.1.8.4 Changing an option type

write_optiontype
advanced=false
arrayed=false
description=For testing purposes
name=Test option
single_hosts=false
signed=false
tag=128
type=string
user_definable=true
[ENTER]

code=ack

5.2.1.8.5 Deleting an option type

The delete_optiontype command can take a numeric tag or an alphanumeric name as its argument.
In this example we use the name of the option type.

delete_optiontype=Test option
[ENTER]

code=ack

5.3 Change Notifications


5.3.1 Overview
The DHCP server can be configured to notify other programs on the network when changes are made
to the server's configuration. After registering with the DHCP server, a program will receive
notifications for the following events:

Scope: add, remove, modify


Binding: add, remove, modify
Policy: add, remove, modify
Hardware Exclusion: add, remove, modify
Hardware Inclusion: add, remove, modify

© 2004 Weird Solutions, Inc.


Additional Tools 80

Option Type: add, remove, modify


Suboption Type: add, remove, modify
Server Properties: modify
Subscription: add, remove

Change notifications are sent in plain text format over UDP to the ip address/port of your choosing.

5.3.2 Subscribing
You must create and bind a UDP listener socket before subscribing to change notification.

The DHCP server will detect and remove dead subscribers*. If your socket is not ready to receive
network datagrams when you first subscribe, you will be detected as a dead subscriber upon
registration, and immediately unsubscribed. As a courtesy, and to safeguard against denial-of-service
attacks, dead subscribers themselves will also receive notification that they are being unsubscribed.

*Linux 2.4 series kernels needs to be manually unsubscribed.

You must be logged into the DHCP server's remote communications console to subscribe and
unsubscribe. You can use the dhcpti utility for this, or you can connect directly from within your own
application. Information on how to interface directly to the DHCP server can be found in the OEM
Interface Guide.

To subscribe, enter the command below using your specific network values:

subscribe
ipaddr=192.168.1.50
port=20000

The server responds with code=ack. If the server responds with code=nak, you were subscribed
already.

To unsubscribe, enter the command below using your specific network values:

unsubscribe
ipaddr=192.168.1.50
port=20000

The server responds with code=ack.

© 2004 Weird Solutions, Inc.


81 Weird Solutions DHCP Turbo

5.3.3 Packet format


Notifications are sent as plain text using UDP. Each UDP packet contains only one notification.

The format for a notification is:

operation=v <newline>
class=w <newline>
instance=x <newline>
src_ip=y<newline>
src_port=z<newline>

The value for the operation key can be one of:

add
delete
modify

The value for class can be one of:

scope
binding
policy
optiontype
suboptiontype
xclient
iclient
properties
subscription

The value for instance is a hint indicating the specific object that has changed. For each possible
class, the hint is:

scope target: The scope name


binding target: The device identifier
policy target: The policy name
optiontype target: The tag number of the option
suboptiontype target: The tag/subtag of the suboption, in "tag/subtag" format
xclient target: The hardware address of the excluded device
iclient target: The hardware address of the included device
properties target: Empty
subscription target: The ip address and port of the subscriber, in "ip:port" format

Together, the src_ip and src_port values define the remote connection that initiated this change.

5.3.4 Reference
The following notifications may be received from the server. Note that the values may differ in your
environment.

Scopes

operation=add
class=scope
instance=test
src_ip=192.168.1.50
port=51477

© 2004 Weird Solutions, Inc.


Additional Tools 82

operation=modify
class=scope
instance=test
src_ip=192.168.1.50
port=51477

operation=delete
class=scope
instance=test
src_ip=192.168.1.50
port=51477

Bindings

operation=add
class=binding
instance=01-00-A0-24-2F-10-26
src_ip=192.168.1.50
port=51477

operation=modify
class=binding
instance=01-00-A0-24-2F-10-26
src_ip=192.168.1.50
port=51477

operation=delete
class=binding
instance=01-00-A0-24-2F-10-26
src_ip=192.168.1.50
port=51477

Policies

operation=add
class=policy
instance=Gold
src_ip=192.168.1.50
port=51477

operation=modify
class=policy
instance=Gold
src_ip=192.168.1.50
port=51477

operation=delete
class=policy
instance=Gold
src_ip=192.168.1.50
port=51477

Option types

operation=add
class=optiontype
instance=133
src_ip=192.168.1.50
port=51477

© 2004 Weird Solutions, Inc.


83 Weird Solutions DHCP Turbo

operation=modify
class=optiontype
instance=133
src_ip=192.168.1.50
port=51477

operation=delete
class=optiontype
instance=133
src_ip=192.168.1.50
port=51477

Suboption types

operation=add
class=suboptiontype
instance=122/1
src_ip=192.168.1.50
port=51477

operation=modify
class=suboptiontype
instance=122/1
src_ip=192.168.1.50
port=51477

operation=delete
class=suboptiontype
instance=122/1
src_ip=192.168.1.50
port=51477

Hardware exclusions

operation=add
class=xclient
instance=01-00-A0-24-2F-10-26
src_ip=192.168.1.50
port=51477

operation=modify
class=xclient
instance=01-00-A0-24-2F-10-26
src_ip=192.168.1.50
port=51477

operation=delete
class=xclient
instance=01-00-A0-24-2F-10-26
src_ip=192.168.1.50
port=51477

Hardware inclusions

operation=add
class=iclient
instance=01-00-A0-24-2F-10-26
src_ip=192.168.1.50
port=51477

© 2004 Weird Solutions, Inc.


Additional Tools 84

operation=modify
class=iclient
instance=01-00-A0-24-2F-10-26
src_ip=192.168.1.50
port=51477

operation=delete
class=iclient
instance=01-00-A0-24-2F-10-26
src_ip=192.168.1.50
port=51477

Properties

operation=modify
class=properties
instance=
src_ip=192.168.1.50
port=51477

Subscriptions

operation=add
class=subscription
instance=192.168.1.50:20000
src_ip=192.168.1.50
port=51477

operation=delete
class=subscription
instance=192.168.1.50:20000
src_ip=192.168.1.50
port=51477

© 2004 Weird Solutions, Inc.


Frequently Asked
Questions
DHCP Turbo Administrator's Guide

Part

VI
Frequently Asked Questions 86

6 Frequently Asked Questions

6.1 FAQ's
Q1. Can I change a dynamic binding to a fixed IP-address reservation?

A. Yes. In the Database view, select the binding in question, then choose Bindings->Make Fixed
from the menu.

Changing a binding from dynamic to fixed allows you to assume full administrative control over
that binding. You are then free to modify any of the properties of the binding.

Q2. Can I change a fixed binding to a dynamic binding?

A. A fixed binding can not be changed to a dynamic binding. You can however delete the fixed
binding, enabling the device to get a new dynamic binding and forcing the client to renew its
address.

Q3. Can I direct devices to use a particular scope?

A. Yes. The Allow and Deny properties of a scope enable you to dynamically enable or disable use
of that scope using runtime identification of the device.

For example, to place all Cable modems in one scope, and all PC's in a separate scope, create
two scopes named CM and PC. For the CM scope, set the Allow property to:

[ $CLASSID() == "docsis1.1" ]

And for the PC scope, set the Deny property to:

[ $CLASSID() == "docsis1.1" ]

This pair of expressions effectively limits each class of device to its respective scope. Since
scopes may be evaluated in an arbitrary order, the Allow and Deny expressions must be set for all
scopes servicing a given segment.

Note:

$CLASSID() is only one of the identification functions available to you at runtime. For a complete
list of available functions, see the section entitled Functions under Using Expressions.

Q4. On a multi-NIC machine, how do I specify which network card the DHCP server binds to?

A. You do this by modifying the 'dhcpt.conf' text-file and restarting the server. You'll find a line
that's commented out called 'daemon_listen_on=192.168.x.x'. Uncomment the line and list the
addresses it should operate on.

Q5. Should I enable write-caching in the server properties window?

A. Not unless you require the performance gain. If you do, we recommend you run this DHCP

© 2004 Weird Solutions, Inc.


87 Weird Solutions DHCP Turbo

server on a stable server and set a low reclaimer interval so that cached lease commits are written
back to permanent storage as often as possible.

Q6. Does this DHCP server support boot file aliasing?

A. Yes, by using an expression. For example, you can define the "Boot file" option in the Global
policy, and set its value as:
[ "C:\images\" + $INP (-1000) + ".img" ]

With this expression, the name of the boot file the DHCP server returns would include the text the
client requested. If the client specified "BF1", for example, the value "C:\images\BF1.img" would
be returned as the boot file.

You could also use:


[ $INP (-1000) == "" ? "C:\images\default.img" : "C:\images\" + $INP (-1000) +
".img" ]

In this case, if the client doesn't specify a boot file, it gets the default, otherwise it creates the
name on the fly like the first expression does.

Q7. Can I create lease logs?

A. Yes, by defining control option -18, Lease Log:

· define a single global lease log by adding this option to the servers Global policy
· define a scope-specific lease log by adding this option to a scope's Local policy
· define a binding-specific lease log by adding this option to a binding's Local policy

Q8. Does the DHCP server support subnet selection?

A. Yes. You must explicitly define which scopes are allowed to be selected by defining option -21,
Device selectable in the scope's local policy. Alternatively, if you define this option in the global
policy, all scopes will be available for selection.

Q9. How can I secure the DHCP server against Denial-of-Service attacks from malicious users?

A. If your intermediate systems support option 82 (most CMTSes do, for example), you simply
need to define internal Control option -22, Circuit ID address limit, and/or option -17, Remote ID
address limit. The value you define is the total number of active leases you're willing to allocate to
each household. Because they are options, these settings can be defined in a scope, binding,
named policy or the global policy.

Q10. My device gets an address, but can't seem to do a TFTP download. What's wrong?

A1. You have no TFTP server running. Install a TFTP server.

A2. Your TFTP server is not running on the same machine as the DHCP server. Use option -14,
Next server to direct the device to its TFTP server.

A3. You have not specified a boot file for the device. Use option -1, Boot file to convey the boot file
to your device.

A4. Your device incorrectly interprets sname as it's TFTP server. Use option -20, Server name to

© 2004 Weird Solutions, Inc.


Frequently Asked Questions 88

direct the device to its TFTP server.

A5. Your device incorrectly interprets option 66 as its TFTP server. Use option -15, MS Option 66
to direct the device to its TFTP server.

A6. Your device incorrectly interprets option 67 as its boot file. Use option -16, MS Option 67 to
convey the boot file to your device.

A7. Your device cannot respond to ARP requests until it has received its boot file. Use option -9,
Force unicast response to ensure the server will not need to resolve the device's IP address
before transmitting the boot file.

Q11. How do I configure and provide Microsoft WINS server values to my clients? (Windows
Internet Naming Service)

A. You need to set two options. Option 44: the IP addresses of WINS server(s) and option 46: the
node type, default value is 8 = Hybrid node. When you are in the "Option Types" view, you can
double-click these options to see its description.(Legacy systems may also need option 47.)

Q12. Can I administer the DHCP server through a firewall?

A. Yes. In the dhcpt.conf file, uncomment the line showing 'comms_port=', and fill in any value
over 1023 (for example, comms_port=8088. Restart the DHCP server, then configure your firewall
to pass traffic on ports 67 and 8088.

© 2004 Weird Solutions, Inc.


Troubleshooting
DHCP Turbo Administrator's Guide

Part

VII
Troubleshooting 90

7 Troubleshooting

7.1 Common error messages


These are the most common error messages that may be reported, as well as suggestions for how to
remedy the problem.

Many of these messages may also include a system-specific error message. This message can be
quite useful in indicating the nature of a particular problem.

Cannot locate configuration file 'x'


· The standard configuration file is missing or corrupt. Fix the configuration file, or re-install your
DHCP server.
· You specified an invalid configuration file from the command line. Specify a valid configuration
file.

Device 'xx-xx-xx-xx' has been denied service because the current limit of 'Y' bindings has been
reached.
· Your DHCP server's bindings license limit has been reached. Contact your supplier to upgrade
your license limit.

Login: Authentification failed. (Login attempt and no password)


· You may be using a firewall software product on the local machine that is blocking the request
towards the localhost. Try to add a rule that explicitly allows access to the locahost.

Could not bind socket to interface 'x.x.x.x'


· You may have another DHCP or BOOTP server running.
· You may not have permission to bind to the interface.
· Your TCP/IP installation is mis-configured.

Could not connect to the database 'xxx'


· The database directory listed in your DHCP server configuration file is missing or corrupt. Fix
the configuration file.
· You specified an invalid database directory from the command line. Specify a valid database
directory.
· Another instance of the DHCP server is already running and has the database locked. Only one
instance may run at a time.
· The database directory contains corrupt tables. You can attempt to pack the bindings table by
specifying the '-pack' command line option.
· Remove all files from the database directory and create new tables using the command line
option '-create'.

Could not create socket for address enumeration


· A temporary socket could not be created. Check that TCP/IP is properly installed.

Could not retrieve interface list (Linux platform)


· You may not have enough permission to enumerate the interfaces on your machine.

© 2004 Weird Solutions, Inc.


91 Weird Solutions DHCP Turbo

Could not set blocking mode for socket


· Check that TCP/IP is properly installed.

Database 'xxx' contains 'Y' bindings, but this server is limited to 'Z' bindings
· Your license limit has been reached. Contact your supplier to upgrade your license limit.

Device 'xx-xx-xx' has refused to accept assigned address 'yy.yy.yy.yy'


· The DHCP server has tried to assign this device an address that it believes is legal and
available, but the device believes otherwise. Check to make sure there are no other DHCP
servers on your network that are handing out the same address

Device 'xx-xx-xx' has refused to accept pending address 'yy.yy.yy.yy'


· DHCP server has tried to assign this device an address that it believes is legal and available,
but the device believes otherwise. Check to make sure there are no other DHCP servers on
your network that are handing out the same address.

Device 'xx-xx-xx' has refused to accept reserved address 'yy.yy.yy.yy'


· You have created an IP reservation, but the device is refusing to accept the address you
specified. The device may have discovered through it's own means that the address is already
in use, or is not valid for its current network segment.

Device 'xx-xx-xx' NAKed. Requested IP address is 'yy.yy.yy.yy', should be 'zz.zz.zz.zz'


· The device is attempting to enter a binding agreement with this server to use an address that
this server never offered. Your device is faulty or malicious.

Error reading configuration key 'xxx'


· The specified key from the configuration file is missing or invalid. Edit the configuration file to fix
the key, or re-install the DHCP server.

Expression 'xxx' for tag 'yyy' must return an integer type


· The given expression does not return an integer. Re-write the expression so that it evaluates to
a valid integer value. For example, the expression [1 == 2] evaluates two integers, but returns a
boolean result.

Expression 'xxx' must evaluate to a string


· The given expression does not return a string. Re-write the expression so that it evaluates to a
valid string value.

Expression 'xxx' must evaluate to true or false


· The given expression does not return a boolean. Re-write the expression so that it evaluates to
a valid boolean result.

Expression error evaluating 'xxx': 'yyy'


· The 'yyy' portion of this message gives more detailed information about the problem.

© 2004 Weird Solutions, Inc.


Troubleshooting 92

Failed to allocate inbound packet buffer


· Your system does not have enough memory to start the DHCP server. Free up some memory.

Failed to bind a socket for the teleconsole


· You may be running another instance of the DHCP server. Only one instance at a time is
allowed.
· If the DHCP server exited abnormally the last time it was started it may take up to 60 seconds
before you can start it again without errors.

Failed to bind to address 'yy.yy.yy.yy'


· You may have another DHCP or BOOTP server running.
· You may not have permission to bind to the interface.
· Your TCP/IP installation is mis-configured.
· Failed to configure daemon socket for address 'yy.yy.yy.yy'
· Your TCP/IP installation may be mis-configured.

Failed to configure daemon socket reuse for address 'yy.yy.yy.yy'


· You may not have permission to make this configuration setting.
· Your TCP/IP installation is mis configured.

Failed to connect to database 'xxx'


· The database directory listed in your DHCP server configuration file is missing or corrupt. Fix
the configuration file.
· You specified an invalid database directory from the command line. Specify a valid database
directory.
· An instance of the DHCP server is already running and has the database locked. Only one
instance may run at a time.
· The database directory contains corrupt tables. You can attempt to pack the bindings table by
specifying the '-pack' command line option.
· Remove all files from the database directory and create new tables using the command line
option '-create'.

Failed to create a daemon socket for address 'yy.yy.yy.yy'


· You may have another DHCP or BOOTP server running.
· You may not have permission to bind to the interface.
· Your TCP/IP installation is mis-configured.

Failed to create a socket for the teleconsole


· You may not have permission to bind to the interface.
· Your TCP/IP installation is mis-configured.

Failed to create an arp entry mapping 'xx-xx-xx' to 'yy.yy.yy.yy'


· You may be running an older version of Windows. Check for a newer service pack for your
operating system.
· You may not have permission to modify your system's arp cache. Contact technical support.

Failed to delete expired binding for device 'xx-xx-xx'


· Contact technical support.

© 2004 Weird Solutions, Inc.


93 Weird Solutions DHCP Turbo

Failed to flush the bindings table after rebuild


· Contact technical support.

Failed to initialize the arp helper %s (Windows platform)


· The configuration file does not point to the correct arp helper DLL. Edit the file to correct the
problem.
· The arp helper DLL is missing or corrupt. Re-install the DHCP server.

Failed to listen on a teleconsole socket


· You may be running another instance of the DHCP server. Only one instance at a time is
allowed.
· If the DHCP server exited abnormally the last time it was started it may take up to 60 seconds
before you can start it again without errors.
· Your TCP/IP installation is mis configured.

Failed to rebuild the bindings table


· You may have another instance of the DHCP server running. Only one instance may run at a
time.
· Contact technical support.

Failed to reset the address manager


· Contact technical support.

Failed to set blocking mode for the teleconsole socket


· Check that TCP/IP is properly installed.

Host 'xx-xx-xx' is not authorized to connect to the teleconsole


· The specified host does not have permission to administer this server. If the host should have
permission, modify the server properties (or edit the configuration file) to allow this host access.

No daemon sockets were created


· The DHCP server was unable to create any sockets for use. This error is normally accompanied
by at least one other error explaining in more detail why socket creation failed.

No free addresses for network 'yy.yy.yy.yy'


· The device requested an address using the Subnet Selection option, but no addresses exist (or
no scopes exist) for this subnet. Wait until the existing leases expire, add more addresses to an
appropriate scope, or define a new scope.

No free addresses for segment 'yy.yy.yy.yy'


· There are no free addresses, or no scopes exist, for this subnet. Wait until the existing leases
expire, add more addresses to an appropriate scope, or define a new scope.

Tag 'xx' missing expression


· Contact technical support.

© 2004 Weird Solutions, Inc.


Troubleshooting 94

The server can't block


· Your TCP/IP installation is mis-configured.

The server can't write to a daemon socket


· You may not have permission to write to the interface.
· Your TCP/IP installation is mis-configured.

'xxxx' is not an expression


· The server expected an expression, but none was given. Expressions should always appear in
brackets "[ ]". Reformat the value as a recognizable expression.

© 2004 Weird Solutions, Inc.


95 Weird Solutions DHCP Turbo

localhost 9

Index login 8

-N-
-A- Named polices 29
address reservation 24
Allow 23
-O-
-B- operators 40
Option types 30
basic properties 10

-R-
-C- Reclaimer 12
Control Options 30
Control Service 14
create option 31
-S-
scope 19
-D- Server Manager 8
Supported platforms 4
Deny 23
device exclusion 25
DHCP definitions 3
DHCP Options 28
dhcpt.conf 15

-F-
fixed 24

-G-
Global policy 29

-I-
Installing on Linux 5, 6
Internal options 36
IP Exclusion 22

-L-
Local policies 29
Local Policy 20

© 2004 Weird Solutions, Inc.

Вам также может понравиться