INI FILE REFERENCE
Entries in the [Settings]
section
|
|
[Settings]
AddStandardEntries=1Default:1
|
AddStandardEntries is a new setting in V2.3.4. It allows to control the behaviour of the DHCP Server with respect
to DNS_x, WINS_x and ROUTER_x entries in the replies from the server to the client.
The default behaviour (AddStandardEntries=1) is to automatically add the standard values from the Windows configuration to the reply message. This is
convenient, because it makes it unneccessary to repeat all the DNS_x, WINS_x and ROUTER_x settings that were already made
in Windows IP configuration. If the server should not take the standard values from Windows, then set AddStandardEntries=0.
|
|
[Settings]
AssociateBindsToPools=1Default:0
|
Associate the IP pools with the
respective IP binds. If the DHCP Server is
configured to use more than one NIC with a
separate subnet each (see Example 3 in the overview) then this entry associates the
IPPOOL_x with the IPBIND_x. The two entries with
the same number x belong together.
Clients on subnet IPBIND_x get IP addresses
assigned only from the pool defined by IPPOOL_x. The
default behavior (AssociateBindsToPools=0) is to
view all IPPOOL_x as one big pool of IP addresses
which can be assigned to any client regardless of
the subnet IPBIND_x.
|
|
[Settings]
ClearClientsOnStartup=1
Default:0
|
Setting ClearClientsOnStartup=1 basically removes all clients from the INI file every time the DHCP Server is started.
This is not recommended in general usage but might be useful in special cases.
|
|
[Settings]
ConfigureUnknownClients=1 Default:
1
|
ConfigureUnknownClients is available
since V1.7. Setting this to 1 tells the DHCP
server to automatically configure unknown
clients. Since this is the default, there is no
change to previous versions. If
ConfigureUnknownClients is set to 0, then a
client is assigned an IP address only if the
client is already specified in the INI file.
Note: Important difference to
IgnoreUnknownClients. IgnoreUnknownClients only
controls how the DHCP Server behaves when no IP
address is assigned (declining request or keep
quiet). What makes a client a "known
client" is an existing entry in the INI file
such as:
[00-01-02-03-04-05] ; mac address
AutoConfig=1
or
[00-01-02-03-04-??] ; mac address with wildcards
AutoConfig=1
or
[client-identifier] ; client identifier (option
61)
AutoConfig=1
|
|
[Settings]
Database=d:\database.ini Default:
-
|
The Database setting allows to split
the dhcpsrv.ini file into two parts. (Available
since V1.7) Part 1 is for everything in the
[Settings] section. This stays in the dhcpsrv.ini
file. All the rest [General], [General_x] or
client section goes into the Database.ini file.
This allows a clean distinction between real
settings and configuration for the DHCP server
and the IP assignment database in which the
client configurations are managed.
New in V1.9.2: If no [General] or [General_x] section is found in the Database.ini file, then
the dhcpsrv.ini config file is used for that instead.
If no Database setting is defined, then the DHCP
server assumes that the database is part of the
dhcpsrv.ini file. |
|
[Settings]
DeleteOnRelease=0
Default: 1
|
The DeleteOnRelease setting is new in V1.9. It defines whether a client entry in the databse is deleted upon DHCPRELEASE, or not. The default behavior
is to automatically delete the entry in the database. The effect is that when the same client comes back after some time and asks for an IP address, no information
about it's previous IP address is available. Even if the old IP address is available, it would most likely not being chosen. With DeleteOnRelease set to 0, the entry
only gets an expired lease timestamp and can therefore be reactivated at a later time.
In addition to this the DeleteOnRelease setting also controls the bahvior for expired leases. When DeleteOnRelease is set then expired leases are also
automatically deleted from the INI file same as DHCPRELEASE from client. This is new in V1.9.3 and is based on a timeout mechansim. The timeout is set to the time
when the next client lease expires. This is updated every time a DHCP action is happening.
|
|
[Settings]
EnableSendRawUnicast=0
Default: 0
|
The EnableSendRawUnicast setting is new in V1.9.1. The DHCP protocol allows the client to specify a broadcast flag. If this flag is not set, then the DHCP
server is asked to unicast the response. Unfortunatly, there is no standard mechanism based on the winsock programming interface that would allow the DHCP
server to send unicasts solely based on mac address addressing scheme. In V1.9.1 the usage of the winpcap library got implemented. In situations where a
unicast is required without having an IP address of the client at hand, the wpcap.dll function pcap_sendpacket is used. The EnableSendRawUnicast setting
enables this functionality. Please set to 1 only if there are really problems with clients in that situation. Clients actually should be also fine with receiving
responses as broadcast, which is the default behavior if EnableSendRawUnicast is not set or the wpcap dll is not installed. This has been tested with winpcap
Version V4.1.1. Please also see the description of the OverwriteBroadcastFlag setting for even more advanced options to set.
|
|
[Settings]
ExpiredLeaseTimeout
Default: 4294967 (approx. 49 days)
|
ExpiredLeaseTimeout defines a time value in seconds. The mechanism that checks expired leases is triggered by this. Regardless of when
the next lease expires, the mechanism is scheduled at least in the time interval specified by ExpiredLeaseTimeout. This is useful when the INI file
entries get changed manually and the DHCP server may not be aware of already expired leases. By this, the INI file gets cleaned up cyclically.
|
|
[Settings]
HBA
Default: -
|
HBA provides a basic load balancing concept according to RFC3074. HBA stands for hash bucket allocation and defines whether the DHCP Server
is responsible for a client or not. The HBA consists of 32 hex values separated by a single blank. Every hex number represents eight bits,
one bit per hash bucket. The DHCP server calculates a hash value for every client that asks for an IP address. The hash value is between 0 and 255.
If the correspondig HBA bit for that hash value is 1, then the client is serviced. If it is 0 then the client is not serviced.
Please assume the following example:
[Settings]
HBA=FF FF FF FF FF FF 00 00 FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
This restricts the DHCP Server to service clients whos hash value is 0 through 47 or 64 through 127.
The server servicing the rest of the clients should have the exact opposite HBA.
The HBA logic kicks in only for clients that are unknown (not yet in the INI file) to the DHCP Server.
Clients who are already known are serviced regardless of the HBA.
|
|
[Settings]
IgnoreUnknownClients=1 Default:
0
|
Setting this to 1 tells the DHCP
server not to answer to requests from clients
that are not configured in the client sections.
DHCP requests from unknown clients are declined,
if IgnoreUnknownClients is set to 0 (default).
|
|
[Settings]
InstallAsService=2 |
This is used internally by the DHCP
Server to remember the checkbox Dont
ask this question again on startup of the
software. |
|
[Settings]
IPBIND_0=192.168.2.1
IPBIND_9=192.168.10.2Default:
-
|
Binding to certain IP addresses (or
NIC cards).
[Settings]
IPBIND_0=123.45.56.78
IPBIND_1="Local Area Connection" ; name of connection
This restricts the DHCP server to bind only to
123.45.56.78. All other IP addresses are ignored.
This is very important if you want to restrict
the DHCP server to particular cards in your
computer. You have already two IP addresses, as
soon as the computer is on the internet using a
dial up connection.
The DHCP server will bind to all IP addresses if
no IPBIND_x is found. IPBIND_0 to IPBIND_9 are
supported. Starting with V1.8 the value of an IPBIND_x entry can also be specified as a LAN connection name.
These are the names Windows is using to specifiy network connections. In case a name based IPBIND_x is configured,
then subnet mask, ip address and all other windows configured data such as DNS server addresses etc. are obtained automatically and don't
need to be explicitly specified in the ini file anymore. See also the AUTO feature in IPPOOL_x.
|
|
[Settings]
IPPOOL_0=192.168.2.2-49
IPPOOL_9=192.168.10.3-12Default:
-
|
From version 1.5 on the so called
auto configuration is supported:
[Settings]
IPPOOL_0=123.45.56.78-90
IPPOOL_1=123.45.57.0-254
IPPOOL_2=AUTO
The above enables three IP pools for DHCP clients.
Unknown clients are automatically configured by
adding the appropriate client sections to the INI
file. IP pools of size 1 (e.g. 123.45.56.78-78)
are allowed and are very useful if you want to
assign the same IP address to all clients.
The new feature in V1.8 is: AUTO. If AUTO instead of a numerical IP-Pool configuration is used then
the IP Pool is automatically chosen to cover the complete IP Range based on the IPBIND_x IP address and the network mask.
This works best together with a name based IPBIND_x configuration.
From V1.9 on the IPPOOL_x numerical IP-Pool definition is enhanced with a comma syntax. This allows to define IP pools such as:
[Settings]
IPPOOL_0=123.45.56.78-90,92,94
This adds 123.45.56.92 and 123.45.56.94 to the IPPOOL_0.
Since V2.3.1 it is also possible to define a class A/B network by using
IPPOOL_1=10.45.3.1-10.45.5.254. This defines, in accordance with the subnet mask, all IP addresses
from 10.45.3.1 through 10.45.5.254 as the IP pool.
|
|
[Settings]
IPRELAY_0=192.168.2.1
IPRELAY_9=192.168.10.1
Default: -
|
IPRELAY_x is the definition of the DHCP Server address where the relay agent sends all
requests coming in from IPBIND_x. Please see the description in the
INI file overview
about relay agents to learn more. IPRELAY_x is supported since V2.0.
|
|
[Settings]
IPSCOPE_0=string-expression
IPSCOPE_9=string-expression
Default: -
|
IPSCOPE_n defines based on the client request if this scope matches or not. Please see the description in the
INI file overview
about mulitple scopes to learn more. IPSCOPE_n is supported since V2.3.
|
|
[Settings]
MINPACKETLENGTH=300Default:
300
[Settings]
MINPACKETLENGTH=300
Default:
300
|
This option is new in V1.6 and
allows to specify a minimum packet length that
the DHCP server is supposed to respond with.
Default is 300 bytes. Some clients were not happy
with a too short response. The remainder of the
packet is filled with 0. |
|
[Settings]
NAKMessage="Info text for DHCPNAK" ;
Default: -
|
Since V2.2.1 NAKMessage allows to specify an info text that is added to DHCPNAK replies as option 56. This info text is visible in some DHCP clients.
It is very rarely used and should usually be omitted. Default behavior if NAKMessage is not specified is to not add option 56 in the reply.
|
|
[Settings]
NotifyTimeout=5000
Default: 1000
|
The DHCP Server automatically recognizes changes in the IP configuration in Windows. This is done based on the Windows API
NotifyAddrChange. This API tells the DHCP Server when an IP configuration is changing. The DHCP Server acts on this by internally
shutting down and restarting itself. Upon restart, the new configuration is used. In order to not shutdown and restart unneccessarily the DHCP
Server uses a timeout mechanism to delay the shutdown after NotifyAddrChange events. The default of this timeout is 1 second (1000 millisends).
Some network cards are very slow and require a longer delay before they are actually ready to run. Set the NotifyTimeout value to a larger
timeout period to compensate for this.
|
|
[Settings]
OverwriteBroadcastFlag=0
Default: broadcast-flag as set by the client request
|
OverwriteBroadcastFlag is new in V1.9.1. It allows to overwrite the broadcast flag set by the client. (See also EnableSendRawUnicast setting).
The default behavior if this setting is not present or commented out, is to act according to the DHCP specification. If OverwriteBroadcastFlag is
present then the behavior is to always broadcast the response (= 0) or to always try to unicast the response first (= 1). If unicast fails, then
the DHCP Server defaults to broadcast.
|
|
[Settings]
PADDING=0
Default: 0
|
PADDING is new in V1.8 and enables to add PAD bytes (0) after each DHCP option, if the next option would otherwise
be stored at a non WORD aligned offset. Some older BOOTP clients require this. |
|
[Settings]
PacketValidation=0
Default: 1
|
PacketValidation allows to switch off the packet validation routine that filters malformed DHCP requests.
Added in V2.2. This setting exists only to bypass a to aggressive validation that falsly identifies correct requests as malformed.
|
|
[Settings]
PORT_67=67
Default: 67
PORT_68=68
Default: 68
PORT_53=53
Default: 53
PORT_69=69
Default: 69
PORT_80=80
Default: 80
|
This options are new in V1.6.5 and
allows to customize the IP ports the DHCP Server
is supposed to use. Default is 67 or 68
respectively. Port 53 is the default port for the DNS Server. Port 69 is the default port of the TFTP Server.
Port 80 is the default port of the HTTP Server (available since V2.0). If no relay agent function is in use, then
this setting has no effect.
|
|
[Settings]
RelayAgentAdvanced=1Default:
1
|
Since V2.1.3 this setting allows to alter the behavior of the relay agent. With RelayAgentAdvanced=0, the relay agent
runs in a compatible mode and can be used in conjunction with other DHCP servers such as Windows 2003 Server. With the default setting
of RelayAgentAdvanced=1, the relay agent adds option 82 to all requests. This allows the DHCP Server to distinguish between the link
selection information and the address of the relay agent.
|
|
[Settings]
ShowBalloonMessages=1Default:
1
|
Since V1.7 the DHCP server shows
balloon messages in the tray if run in
application mode. This can be disabled by setting
ShowBalloonMessages=0. |
|
[Settings]
ServerName=Name of server
Default:
Windows computer name
|
Since V2.4 it is possible to define the content of the sname (server name) field in the DHCP reply packets. The default is
the computer name as it is configured in Windows (return value of Win32 API GetComputerName).
|
|
[Settings]
SERVICENAME=DHCP Server
SERVICEDISPLAYNAME=DHCP Server
Default:
DHCP Server
|
Since V1.9 the DHCP server supports customizing the service name entries. This is useful when the service
is to be installed several times (different INI file needed) or in combination with an already existing DHCP
server with the same serivce name.
|
|
[Settings]
SingleInstanceApp=1Default: 0
|
Since V2.2.3 it is possible to limit the DHCP Server to one instance if run in application mode.
If SingleInstanceApp is not configured or set to 0 then the server can be started multiple times.
If set to 1 then the second instance will only show a dialog inidicating that it's a second instance
and will terminate after confirming the dialog box.
|
|
[Settings]
TRAYICON=someicon.icoDefault: Default
|
Since V2.1 it is possible to change the tray icon of the dhcp server. The default tray
icon is still avaible as a default. You can either choose "None", "Default" or a filename.
TRAYICON=Default uses the built in default icon.
TRAYICON=None uses no icon at all. This is not recommended because the process can only be stopped using
task manager if there is no tray icon.
TRAYICON=filname.ico loads the given icon file as the try icon.
All this is of course only effective if dhcpsrv.exe is started as an application (not as a service).
The intended purposes to choose the tray icon is to bo able to distinguish the processes in the tray in case
you are running dhcpsrv.exe multiple times.
|
|
[Settings]
Trace=1Default: 0
[Settings]
TraceFile=c:\temp\dhcptrc.txt
|
You can switch the trace on by
putting a Trace=1 entry into the [Settings]
section (not the general section as I stated in
former documentation). The trace file is called
dhcptrc.txt and is written into the same folder
as the dhcpsrv.exe and the dhcpsrv.ini files. I
recommend to switch the trace on, if you
encounter any problems and attach the trace file
to the e-mail that you are sending to me to
report it. If you want the trace to have a
different name (and/or directory) then use
TraceFile for that. Example:
[Settings]
Trace=1 ; 1= enable, 0=disable
TraceFile=c:\temp\dhcptrc.txt ; this is
where the trace goes
If the TraceFile setting in not set then the
default is dhcptrc.txt in the dhcpsrv.exe
directory. TraceFile is a new feature in V1.5.2.
|
|
[Settings]
UseClientID=1Default:
0
|
If UseClientID is set to 1, then
clients can be recognized based on their Option
61 specification "client-identifier".
Option 61 allows several client id formats. Two
of them are supported by the DHCP Server: type=0
and type=1. Type 1 is treated as the mac address
of the client and just uses the mac address given
by option 61 instead of the chaddr field of the
DHCP packet.
Type 0 is treated as an ascii string. The client
section is created with the client identifier
instead of the mac address. Also the manual
specification of client sections need to be based
on the client-idendifier, if UseClientID is set
to 1. This option is new in V1.7. |
|
[Settings]
VENDORCLASS=MSFT 5.0Default:
-
|
If a VENDORCLASS is specified as an
entry in the [Settings] section, then only
clients with the same vendor class defined in
their DHCP request get an IP address assigned.
|
|
Entries in the [DNS-Settings] section
|
|
|
[DNS-Settings]
EnableDNS=1
Default:0
|
EnableDNS enables the integrated Domain Name Service (DNS) functionality of the DHCP Server.
|
|
|
[DNS-Settings]
FORWARD=192.168.2.1
Default:none
|
The FORWARD setting defines the IP address of one external DNS server that gets all the requests that the integrated DNS server can not answer.
This feature is fairly rudimentary and works only with UDP.
|
|
|
[DNS-Settings]
DEFAULTIPADDR=192.168.17.18
Default:none
|
The DEFAULTIPADDR setting is a very simple but effective security feature.
If DEFAULTIPADDR is not set then the DNS server serves everybody as expected with resovled names.
If it is set, then requesters with an unknown IP address get always the default ip address
as an answer to all name resolution requests. The intention of this feature is to forward
all unknown clients to a predefined default address (e.g. a web server with registration facility).
Since V1.9.3, this can be also defined on a per client basis. Please see AllowDNSQuery for details.
|
|
Entries in the [TFTP-Settings] section
|
|
|
[TFTP-Settings]
EnableTFTP=1
Default:0
|
EnableTFTP enables the integrated Trivial File Transfer Protocol (TFTP) server functionality of the DHCP Server.
|
|
|
[TFTP-Settings]
MaxBlockSize=1024
Default:-
|
The tftp protocol allows to negotiate the blksize. This is the number of bytes transfered between client
and server in each packet. It has been shown that if the client asks for a blksize that is bigger than the
MTU, that the tftp communication does not work. Therefore it is since V2.2.3 possible to limit the blksize on
the server side. MaxBlockSize should be set to a value between 512 and the MTU.
|
|
|
[TFTP-Settings]
PortRange=51000-51100
Default:AUTO
|
The PortRange setting defines the ports the TFTP server will use for sending and receiving data.
The default is AUTO and specifies that the port numbers are allocated automatically on demand as they are
made available by windows sockets (winsock). This can be a problem with firewalls, because the port numbers can
not be explicitly opened in the firewall if they are unknown at configuration time. Therefore it is possible to specify
a range of ports like PortRange=51000-51100. This tells the TFTP function to select port numbers out of the given range
for sending and receiving data. Please make sure that the specified port numbers are not confilicting with other network
services running on the server.
|
|
|
[TFTP-Settings]
WritePermission=1
Default:0
|
If not set or set to 0 WritePermission is not granted. Tftp clients can not write files in this case.
|
|
|
[TFTP-Settings]
Root=c:\tftproot\
Default:none
|
Only files located in or under the given Root path are served by the tftp server. A tftp client request asking for a file x
automatically translates to a file access to c:\tftproot\x.
|
|
|
[TFTP-Settings]
TransferWindow=1
Default:4
|
The tftp-setting TransferWindow sets the maximum number of tftp data packets that are sent
before an acknowledge is received. TFTP protocol standard behavior is achieved by setting TransferWindow=1.
The default of 4 should increase TFTP performance by about 50%. In case of problems try to set to 1.
|
|
Entries in the [HTTP-Settings] section
|
|
|
[HTTP-Settings]
DefaultFile=showerr.html
Default:-
|
The DefaultFile allows to specify a file whos content is returned instead of a 404 file not found message. This is a new feature
in V2.3.3.
In case the URL refers to a not existing file, then this file is fetched. If DefaultFile is not specified then
the regular 404 file not found return occurs.
|
|
|
[HTTP-Settings]
EnableHTTP=1
Default:0
|
EnableHTTP enables the integrated HTTP Protocol server functionality of the DHCP Server.
|
|
|
[HTTP-Settings]
Root=c:\httproot\
Default:none
|
Only files located in or under the given Root path are served by the http server. A Web browser request asking for a file x
automatically translates to a file access to c:\httproot\x.
|
|
|
[HTTP-Settings]
Logfile=c:\httplog.txt
Default: none
|
The http server logs all activities in this file.
|
|
|
[content-type]
.htm=text/html
Default: -
|
The http server knows the content-type definitions for .htm, .html, .css,
.xsl, .jpg, .png, .gif, .ico, .xml and .txt. Additional file extensions and their respective
content types can be specified in the [content-type] section.
|
|
Entries in the [General],
[General_x] or client sectionAll
of the following entries can be specified in the
client section [00-01-02-03-04-05], in the
[General] or the [General_x] section. The
response to the client is composed of all entries
in these sections. Every information that was not
found in the client section is taken from the
general section. If it's in neither of both an
appropriate default value is taken. See also the INI file
overview.
|
|
|
AllowDNSQuery=1
_
|
AllowDNSQuery goes along with the built-in DNS functionality. A client who performs DNS queries that is not known to the DHCP Server (not in the ini file)
can get a default IP address returned regardless of the name it wants to resolve. This is a security feature that limits the DNS function to known clients.
Since V1.9.3 AllowDNSQuery defines this behavior on a per client basis. If AllowDNSQuery is set to 1 then the client can resolve names to IP addresses with DNS queries.
If AllowDNSQuery is set to 0 then whatever is configured as DEFAULTIPADDR is returned for every name. Please assume the following INI file:
[General]
...
AllowDNSQuery=0
...
[DNS-Settings]
EnableDNS=1
DEFAULTIPADDR=192.168.0.1
[00-00-00-00-00-01]
IPADDR=192.168.0.10
Hostname=Computer_1
[00-00-00-00-00-02]
IPADDR=192.168.0.11
Hostname=Computer_2
AllowDNSQuery=1
In this example, only Computer_2 will be able to resolve DNS queries to the real IP addresses. Computer_1 will observe that
regardless of the name he wants to resolve, he will always get 192.168.0.1 in return.
|
|
| AutoConfig=12/29/2007_18:37:26
|
This entry marks a client section as
being created by the DHCP Server (auto
configuration). Dont touch it. |
|
| BOOTFILE=bootimage.bin |
A string that typically defines the
boot file which is fetched from a TFTP server by
the client. |
|
DNS_0=123.4.56.78
DNS_9=192.168.2.1 |
This entry sets the IP address of
the DNS server. You can setup up to 10 DNS
servers.
|
|
| DOMAINNAME=mydomain |
This entry should define the domain
name that is send to the client machine. This is
in most cases the name of the domain or workgroup
that your server machine is in. |
|
| IPADDR=192.168.10.11 |
This is the IP address that has to
be assigned to the client. This is the most
important entry in the client section. |
|
| LeaseEnd=1198953446 |
This entry is automatically created
by the DHCP Server. LeaseEnd is specified as
number of seconds since midnight (00:00:00),
January 1, 1970 and defines the time at which
this particular IP address expires.
Lease times are important when a client requests
an IP address and all addresses in the IP pool
are already assigned to other clients. In that
case the client whose lease time (LeaseEnd) has
expired least recently is deleted from the INI
file and the available IP address is used for the
request. |
|
| LEASETIME=3600 ; 1 hour Default: infinite
|
Lease time in seconds (decimal
value). E.g. 86400 is the lease time for 1 day.
Default is an infinite lease. The actual lease
period for the clients IP address is the minimum
of the configured LEASETIME and the lease
duration the client is asking for. |
|
| NAME=ClientPC |
ClientPC is send to the
client as the hostname entry in the DHCP options.
This is supposed to be the name of the client
machine. This entry doesn't work with Windows
clients, because they do not change the computer
name. |
|
| NEXTSERVER=123.45.6.7 |
IP address of the "next
server". This is typically used to specify a
TFTP server in the BOOTP protocol. |
|
| NODETYPE=8
|
Default: 8, which means hybrid.
Ive never used something else than 8.
|
|
ROUTER_0=123.4.56.78
ROUTER_9=192.168.2.1 |
This entry sets the IP address of
the router or standard gateway. You can setup up
to 10 routers by using the entries ROUTER_0 to
ROUTER_9. |
|
| SUBNETMASK=255.255.255.0
|
The subnet mask is usually common to
all clients and should be placed in the general
section. This has to be the same as the subnet
mask of the server machine that is setup in your
network settings. |
|
WINS_0=123.4.56.78
WINS_9=192.168.2.1 |
This entry sets the IP address of
the WINS servers. You can setup up the 10 WINS
servers using the entries WINS_0 to WINS_9.
|
|
| WPAD=http://server.domain/config.pac
|
Location of a proxy server (Web
Proxy Auto Detection) used by Internet browsers
to automatically detect proxy settings. |
|
| Custom options The
DHCP server supports custom options in addition
to the above options. This allows to specifiy all
possible DHCP options in client and general
sections. (New in V1.7)
The syntax for custom options is:
[00-01-02-03-04-6A]
OPTION_nn="whatever text"
; text
OPTION_nn=02:03:04:05 ;
hex bytes
OPTION_nn=192.168.2.1 ;
IP address
OPTION_nn= 01 "whatever text"
; combination of hex byte and
text
nn is the option number (decimal) such as
OPTION_66 for TFTP server IP address.
Please note that all the examples
above have a trailing comment in each line. This
is necessary and is not optional. The comment
even if it is only the semi-colon (;) is needed.
OPTION_nn="whatever
text" ;
If there is no comment symbol at the
end then the OPTION_nn setting will not be
recognized correctly and is treated as malformed
and therefore ignored.
The custom option syntax understands hex bytes as two digit values, IP addresses as a group of four decimal numbers seperated by '.', and
"text". As seperators are allowed: blanks and colons (:).
Two special syntax features make it easier to deal with custom options (available since V2.4).
The first is the auto-len prefix for everything inside of parentheses (). You can group all data (hex bytes, IP addresses and text) as you whish
and put parentheses around them. The resulting encoding will automatically prefix the data with a length field.
An example can be seen in FAQ 14.
The second new feature in V2.4 is related to IP address encodings. Sometimes it is necessary to encode, e.g. in OPTION_121, a network ID in
a compact form. Example:
OPTION_121= 10.10.30.0/24 10.10.20.254 ;encodes to 18 0A 0A 1E 0A 0A 14 FE
This defines a classless static route for all addresses in the 10.10.30.0/24 network to be routed via 10.10.20.254. The encoding for this
is an 8 byte octect sequence as shown above, where the first 4 octects are a compact CIDR syntax. Compact CIDR syntax means, that
10.10.30.0/24 only consists of the relevant octets for the network id. The relevant octets in this case are 3, because /24 makes the
4th octet of 10.10.30.0 irrelevant.
|
|
|
Client sections with wildcards A client section can be specified
based on wildcards (since V1.7). Please use this
with care. Recommendation is to not use client-id
based specifications (UseClientID=0) and also to
make sure that no interference with IPOOLs is
possible, because the DHCP Server is not able to
check this. This is how it works:
A client section can be defined based on
wildcards like this:
[00-01-02-03-04-??]
IPADDR=192.168.17.%m5
What happens is that if a client that matches the
above wildcard asks for an IP address, that the
IP address assigned is automatically composed by
using mac address byte 5 (%m5). The resulting mac
address for client [00-01-02-03-04-6A] will be
192.168.17.106. (6A hex is 106 dec).
Mac address byte 0 through 5 are accessed
accordingly with %m0 through %m5. The wildcard
match algorithm searches in the following order
and takes the first matching entry:
[00-01-02-03-04-6A]
[00-01-02-03-04-??]
[00-01-02-03-??-??]
[00-01-02-??-??-??]
[00-01-??-??-??-??]
[00-??-??-??-??-??]
[??-??-??-??-??-??]
In addition to the %m0 through %m5, since V2.3.1 there are further macros available.
These are %ip0 through %ip3. They allow to access the IP address of the IPBIND_n
address used by the current DHCP request. If IPBIND_1 is defined as
IPBIND_1=192.168.5.1, then the macros are extended to: %ip0=192, %ip1=168, %ip2=5 and %ip3=1.
|
|