blob: eca44c0ab41ed09df2d8d1aaf84be803c6b882be [file] [log] [blame]
Russ Dill61fb4892002-10-14 21:41:28 +00001# Sample udhcpd configuration file (/etc/udhcpd.conf)
Denys Vlasenko2b0e9572009-06-17 13:22:26 +02002# Values shown are defaults
Russ Dill61fb4892002-10-14 21:41:28 +00003
4# The start and end of the IP lease block
Denys Vlasenko2b0e9572009-06-17 13:22:26 +02005start 192.168.0.20
6end 192.168.0.254
Russ Dill61fb4892002-10-14 21:41:28 +00007
8# The interface that udhcpd will use
Denys Vlasenko2b0e9572009-06-17 13:22:26 +02009interface eth0
Russ Dill61fb4892002-10-14 21:41:28 +000010
Denys Vlasenko777706c2010-03-19 23:42:23 +010011# The maximum number of leases (includes addresses reserved
12# by OFFER's, DECLINE's, and ARP conflicts). Will be corrected
Denys Vlasenko2b0e9572009-06-17 13:22:26 +020013# if it's bigger than IP lease block, but it ok to make it
14# smaller than lease block.
15#max_leases 254
Russ Dill61fb4892002-10-14 21:41:28 +000016
Denys Vlasenko2b0e9572009-06-17 13:22:26 +020017# The amount of time that an IP will be reserved (leased to nobody)
Denys Vlasenko87fa2162010-03-20 18:06:23 +010018# if a DHCP decline message is received (seconds)
Denys Vlasenko2b0e9572009-06-17 13:22:26 +020019#decline_time 3600
Russ Dill61fb4892002-10-14 21:41:28 +000020
Denys Vlasenko2b0e9572009-06-17 13:22:26 +020021# The amount of time that an IP will be reserved
Denys Vlasenko87fa2162010-03-20 18:06:23 +010022# if an ARP conflict occurs (seconds)
Denys Vlasenko2b0e9572009-06-17 13:22:26 +020023#conflict_time 3600
Russ Dill61fb4892002-10-14 21:41:28 +000024
Denys Vlasenko87fa2162010-03-20 18:06:23 +010025# How long an offered address is reserved (seconds)
Denys Vlasenko2b0e9572009-06-17 13:22:26 +020026#offer_time 60
Russ Dill61fb4892002-10-14 21:41:28 +000027
Denys Vlasenko2b0e9572009-06-17 13:22:26 +020028# If client asks for lease below this value, it will be rounded up
Denys Vlasenko87fa2162010-03-20 18:06:23 +010029# to this value (seconds)
Denys Vlasenko2b0e9572009-06-17 13:22:26 +020030#min_lease 60
Russ Dill61fb4892002-10-14 21:41:28 +000031
Denys Vlasenko14b162f2011-05-04 21:17:23 +020032# The location of the pid file
33#pidfile /var/run/udhcpd.pid
34
Russ Dill61fb4892002-10-14 21:41:28 +000035# The location of the leases file
Denys Vlasenko2b0e9572009-06-17 13:22:26 +020036#lease_file /var/lib/misc/udhcpd.leases
Russ Dill61fb4892002-10-14 21:41:28 +000037
Denys Vlasenko14b162f2011-05-04 21:17:23 +020038# The time period at which udhcpd will write out leases file.
39# If this is 0, udhcpd will never automatically write leases file.
40# Specified in seconds.
41#auto_time 7200
Russ Dill61fb4892002-10-14 21:41:28 +000042
Denys Vlasenko87fa2162010-03-20 18:06:23 +010043# Every time udhcpd writes a leases file, the below script will be called
Denys Vlasenko2b0e9572009-06-17 13:22:26 +020044#notify_file # default: no script
45#notify_file dumpleases # useful for debugging
Russ Dill61fb4892002-10-14 21:41:28 +000046
Denys Vlasenko87fa2162010-03-20 18:06:23 +010047# The following are bootp specific options
Denys Vlasenko2e7aa922010-03-21 02:22:07 +010048# next server to use in bootstrap
49#siaddr 192.168.0.22 # default: 0.0.0.0 (none)
50# tftp server name
51#sname zorak # default: none
52# tftp file to download (e.g. kernel image)
53#boot_file /var/nfs_root # default: none
Russ Dill61fb4892002-10-14 21:41:28 +000054
Denys Vlasenko87fa2162010-03-20 18:06:23 +010055# Static leases map
56#static_lease 00:60:08:11:CE:4E 192.168.0.54
57#static_lease 00:60:08:11:CE:3E 192.168.0.44
58
Denys Vlasenko777706c2010-03-19 23:42:23 +010059# The remainder of options are DHCP options and can be specified with the
Russ Dill61fb4892002-10-14 21:41:28 +000060# keyword 'opt' or 'option'. If an option can take multiple items, such
61# as the dns option, they can be listed on the same line, or multiple
Denys Vlasenko2e7aa922010-03-21 02:22:07 +010062# lines.
Denys Vlasenko2b0e9572009-06-17 13:22:26 +020063# Examples:
Russ Dill61fb4892002-10-14 21:41:28 +000064opt dns 192.168.10.2 192.168.10.10
65option subnet 255.255.255.0
66opt router 192.168.10.2
67opt wins 192.168.10.10
Denys Vlasenko777706c2010-03-19 23:42:23 +010068option dns 129.219.13.81 # appended to above DNS servers for a total of 3
Russ Dill61fb4892002-10-14 21:41:28 +000069option domain local
Denys Vlasenko2e7aa922010-03-21 02:22:07 +010070option lease 864000 # default: 10 days
Michael McTernan7b57ff42011-12-16 17:05:52 +010071option msstaticroutes 10.0.0.0/8 10.127.0.1 # single static route
72option staticroutes 10.0.0.0/8 10.127.0.1, 10.11.12.0/24 10.11.12.1
Denys Vlasenko29034692010-04-04 15:38:22 +020073# Arbitrary option in hex form:
74option 0x08 01020304 # option 8: "cookie server IP addr: 1.2.3.4"
Russ Dill61fb4892002-10-14 21:41:28 +000075
Denys Vlasenko2b0e9572009-06-17 13:22:26 +020076# Currently supported options (for more info, see options.c):
Denys Vlasenko0f62c4d2010-03-20 07:12:21 +010077#opt lease NUM
78#opt subnet IP
79#opt broadcast IP
80#opt router IP_LIST
81#opt ipttl NUM
82#opt mtu NUM
Denys Vlasenko2e7aa922010-03-21 02:22:07 +010083#opt hostname STRING # client's hostname
84#opt domain STRING # client's domain suffix
85#opt search STRING_LIST # search domains
Denys Vlasenko0f62c4d2010-03-20 07:12:21 +010086#opt nisdomain STRING
Denys Vlasenko2e7aa922010-03-21 02:22:07 +010087#opt timezone NUM # (localtime - UTC_time) in seconds. signed
88#opt tftp STRING # tftp server name
89#opt bootfile STRING # tftp file to download (e.g. kernel image)
90#opt bootsize NUM # size of that file
91#opt rootpath STRING # (NFS) path to mount as root fs
Denys Vlasenko0f62c4d2010-03-20 07:12:21 +010092#opt wpad STRING
Denys Vlasenko2e7aa922010-03-21 02:22:07 +010093#opt serverid IP # default: server's IP
94#opt message STRING # error message (udhcpd sends it on success too)
Nigel Hathawayfb6b1732011-04-26 02:50:00 +020095#opt vlanid NUM # 802.1P VLAN ID
96#opt vlanpriority NUM # 802.1Q VLAN priority
Denys Vlasenko0f62c4d2010-03-20 07:12:21 +010097# Options specifying server(s)
98#opt dns IP_LIST
99#opt wins IP_LIST
100#opt nissrv IP_LIST
Denys Vlasenkoe5ce91b2010-03-21 00:43:11 +0100101#opt ntpsrv IP_LIST
Denys Vlasenko0f62c4d2010-03-20 07:12:21 +0100102#opt lprsrv IP_LIST
103#opt swapsrv IP
Nigel Hathawayfb6b1732011-04-26 02:50:00 +0200104# Options specifying routes
105#opt routes IP_PAIR_LIST
Michael McTernan7b57ff42011-12-16 17:05:52 +0100106#opt staticroutes STATIC_ROUTES # RFC 3442 classless static route option
107#opt msstaticroutes STATIC_ROUTES # same, using MS option number
Denys Vlasenkoe5ce91b2010-03-21 00:43:11 +0100108# Obsolete options, no longer supported
Denys Vlasenko2e7aa922010-03-21 02:22:07 +0100109#opt logsrv IP_LIST # 704/UDP log server (not syslog!)
110#opt namesrv IP_LIST # IEN 116 name server, obsolete (August 1979!!!)
111#opt cookiesrv IP_LIST # RFC 865 "quote of the day" server, rarely (never?) used
112#opt timesrv IP_LIST # RFC 868 time server, rarely (never?) used
Nigel Hathawayfb6b1732011-04-26 02:50:00 +0200113# TODO: in development
114#opt userclass STRING # RFC 3004. set of LASCII strings. "I am a printer" etc
115#opt sipserv STRING LIST # RFC 3361. flag byte, then: 0: domain names, 1: IP addrs