Russ Dill | 61fb489 | 2002-10-14 21:41:28 +0000 | [diff] [blame] | 1 | # Sample udhcpd configuration file (/etc/udhcpd.conf) |
Denys Vlasenko | 2b0e957 | 2009-06-17 13:22:26 +0200 | [diff] [blame] | 2 | # Values shown are defaults |
Russ Dill | 61fb489 | 2002-10-14 21:41:28 +0000 | [diff] [blame] | 3 | |
| 4 | # The start and end of the IP lease block |
Denys Vlasenko | 2b0e957 | 2009-06-17 13:22:26 +0200 | [diff] [blame] | 5 | start 192.168.0.20 |
| 6 | end 192.168.0.254 |
Russ Dill | 61fb489 | 2002-10-14 21:41:28 +0000 | [diff] [blame] | 7 | |
| 8 | # The interface that udhcpd will use |
Denys Vlasenko | 2b0e957 | 2009-06-17 13:22:26 +0200 | [diff] [blame] | 9 | interface eth0 |
Russ Dill | 61fb489 | 2002-10-14 21:41:28 +0000 | [diff] [blame] | 10 | |
Denys Vlasenko | 777706c | 2010-03-19 23:42:23 +0100 | [diff] [blame] | 11 | # The maximum number of leases (includes addresses reserved |
| 12 | # by OFFER's, DECLINE's, and ARP conflicts). Will be corrected |
Denys Vlasenko | 2b0e957 | 2009-06-17 13:22:26 +0200 | [diff] [blame] | 13 | # if it's bigger than IP lease block, but it ok to make it |
| 14 | # smaller than lease block. |
| 15 | #max_leases 254 |
Russ Dill | 61fb489 | 2002-10-14 21:41:28 +0000 | [diff] [blame] | 16 | |
| 17 | # The time period at which udhcpd will write out a dhcpd.leases |
| 18 | # file. If this is 0, udhcpd will never automatically write a |
Denys Vlasenko | 2b0e957 | 2009-06-17 13:22:26 +0200 | [diff] [blame] | 19 | # lease file. Specified in seconds. |
| 20 | #auto_time 7200 |
Russ Dill | 61fb489 | 2002-10-14 21:41:28 +0000 | [diff] [blame] | 21 | |
Denys Vlasenko | 2b0e957 | 2009-06-17 13:22:26 +0200 | [diff] [blame] | 22 | # The amount of time that an IP will be reserved (leased to nobody) |
Denys Vlasenko | 87fa216 | 2010-03-20 18:06:23 +0100 | [diff] [blame] | 23 | # if a DHCP decline message is received (seconds) |
Denys Vlasenko | 2b0e957 | 2009-06-17 13:22:26 +0200 | [diff] [blame] | 24 | #decline_time 3600 |
Russ Dill | 61fb489 | 2002-10-14 21:41:28 +0000 | [diff] [blame] | 25 | |
Denys Vlasenko | 2b0e957 | 2009-06-17 13:22:26 +0200 | [diff] [blame] | 26 | # The amount of time that an IP will be reserved |
Denys Vlasenko | 87fa216 | 2010-03-20 18:06:23 +0100 | [diff] [blame] | 27 | # if an ARP conflict occurs (seconds) |
Denys Vlasenko | 2b0e957 | 2009-06-17 13:22:26 +0200 | [diff] [blame] | 28 | #conflict_time 3600 |
Russ Dill | 61fb489 | 2002-10-14 21:41:28 +0000 | [diff] [blame] | 29 | |
Denys Vlasenko | 87fa216 | 2010-03-20 18:06:23 +0100 | [diff] [blame] | 30 | # How long an offered address is reserved (seconds) |
Denys Vlasenko | 2b0e957 | 2009-06-17 13:22:26 +0200 | [diff] [blame] | 31 | #offer_time 60 |
Russ Dill | 61fb489 | 2002-10-14 21:41:28 +0000 | [diff] [blame] | 32 | |
Denys Vlasenko | 2b0e957 | 2009-06-17 13:22:26 +0200 | [diff] [blame] | 33 | # If client asks for lease below this value, it will be rounded up |
Denys Vlasenko | 87fa216 | 2010-03-20 18:06:23 +0100 | [diff] [blame] | 34 | # to this value (seconds) |
Denys Vlasenko | 2b0e957 | 2009-06-17 13:22:26 +0200 | [diff] [blame] | 35 | #min_lease 60 |
Russ Dill | 61fb489 | 2002-10-14 21:41:28 +0000 | [diff] [blame] | 36 | |
| 37 | # The location of the leases file |
Denys Vlasenko | 2b0e957 | 2009-06-17 13:22:26 +0200 | [diff] [blame] | 38 | #lease_file /var/lib/misc/udhcpd.leases |
Russ Dill | 61fb489 | 2002-10-14 21:41:28 +0000 | [diff] [blame] | 39 | |
| 40 | # The location of the pid file |
Denys Vlasenko | 2b0e957 | 2009-06-17 13:22:26 +0200 | [diff] [blame] | 41 | #pidfile /var/run/udhcpd.pid |
Russ Dill | 61fb489 | 2002-10-14 21:41:28 +0000 | [diff] [blame] | 42 | |
Denys Vlasenko | 87fa216 | 2010-03-20 18:06:23 +0100 | [diff] [blame] | 43 | # Every time udhcpd writes a leases file, the below script will be called |
Denys Vlasenko | 2b0e957 | 2009-06-17 13:22:26 +0200 | [diff] [blame] | 44 | #notify_file # default: no script |
| 45 | #notify_file dumpleases # useful for debugging |
Russ Dill | 61fb489 | 2002-10-14 21:41:28 +0000 | [diff] [blame] | 46 | |
Denys Vlasenko | 87fa216 | 2010-03-20 18:06:23 +0100 | [diff] [blame] | 47 | # The following are bootp specific options |
Denys Vlasenko | 2e7aa92 | 2010-03-21 02:22:07 +0100 | [diff] [blame] | 48 | # 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 Dill | 61fb489 | 2002-10-14 21:41:28 +0000 | [diff] [blame] | 54 | |
Denys Vlasenko | 87fa216 | 2010-03-20 18:06:23 +0100 | [diff] [blame] | 55 | # 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 Vlasenko | 777706c | 2010-03-19 23:42:23 +0100 | [diff] [blame] | 59 | # The remainder of options are DHCP options and can be specified with the |
Russ Dill | 61fb489 | 2002-10-14 21:41:28 +0000 | [diff] [blame] | 60 | # 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 Vlasenko | 2e7aa92 | 2010-03-21 02:22:07 +0100 | [diff] [blame] | 62 | # lines. |
Denys Vlasenko | 2b0e957 | 2009-06-17 13:22:26 +0200 | [diff] [blame] | 63 | # Examples: |
Russ Dill | 61fb489 | 2002-10-14 21:41:28 +0000 | [diff] [blame] | 64 | opt dns 192.168.10.2 192.168.10.10 |
| 65 | option subnet 255.255.255.0 |
| 66 | opt router 192.168.10.2 |
| 67 | opt wins 192.168.10.10 |
Denys Vlasenko | 777706c | 2010-03-19 23:42:23 +0100 | [diff] [blame] | 68 | option dns 129.219.13.81 # appended to above DNS servers for a total of 3 |
Russ Dill | 61fb489 | 2002-10-14 21:41:28 +0000 | [diff] [blame] | 69 | option domain local |
Denys Vlasenko | 2e7aa92 | 2010-03-21 02:22:07 +0100 | [diff] [blame] | 70 | option lease 864000 # default: 10 days |
Denys Vlasenko | 2903469 | 2010-04-04 15:38:22 +0200 | [diff] [blame] | 71 | # Arbitrary option in hex form: |
| 72 | option 0x08 01020304 # option 8: "cookie server IP addr: 1.2.3.4" |
Russ Dill | 61fb489 | 2002-10-14 21:41:28 +0000 | [diff] [blame] | 73 | |
Denys Vlasenko | 2b0e957 | 2009-06-17 13:22:26 +0200 | [diff] [blame] | 74 | # Currently supported options (for more info, see options.c): |
Denys Vlasenko | 0f62c4d | 2010-03-20 07:12:21 +0100 | [diff] [blame] | 75 | #opt lease NUM |
| 76 | #opt subnet IP |
| 77 | #opt broadcast IP |
| 78 | #opt router IP_LIST |
| 79 | #opt ipttl NUM |
| 80 | #opt mtu NUM |
Denys Vlasenko | 2e7aa92 | 2010-03-21 02:22:07 +0100 | [diff] [blame] | 81 | #opt hostname STRING # client's hostname |
| 82 | #opt domain STRING # client's domain suffix |
| 83 | #opt search STRING_LIST # search domains |
Denys Vlasenko | 0f62c4d | 2010-03-20 07:12:21 +0100 | [diff] [blame] | 84 | #opt nisdomain STRING |
Denys Vlasenko | 2e7aa92 | 2010-03-21 02:22:07 +0100 | [diff] [blame] | 85 | #opt timezone NUM # (localtime - UTC_time) in seconds. signed |
| 86 | #opt tftp STRING # tftp server name |
| 87 | #opt bootfile STRING # tftp file to download (e.g. kernel image) |
| 88 | #opt bootsize NUM # size of that file |
| 89 | #opt rootpath STRING # (NFS) path to mount as root fs |
Denys Vlasenko | 0f62c4d | 2010-03-20 07:12:21 +0100 | [diff] [blame] | 90 | #opt wpad STRING |
Denys Vlasenko | 2e7aa92 | 2010-03-21 02:22:07 +0100 | [diff] [blame] | 91 | #opt serverid IP # default: server's IP |
| 92 | #opt message STRING # error message (udhcpd sends it on success too) |
Denys Vlasenko | 0f62c4d | 2010-03-20 07:12:21 +0100 | [diff] [blame] | 93 | # Options specifying server(s) |
| 94 | #opt dns IP_LIST |
| 95 | #opt wins IP_LIST |
| 96 | #opt nissrv IP_LIST |
Denys Vlasenko | e5ce91b | 2010-03-21 00:43:11 +0100 | [diff] [blame] | 97 | #opt ntpsrv IP_LIST |
Denys Vlasenko | 0f62c4d | 2010-03-20 07:12:21 +0100 | [diff] [blame] | 98 | #opt lprsrv IP_LIST |
| 99 | #opt swapsrv IP |
Denys Vlasenko | e5ce91b | 2010-03-21 00:43:11 +0100 | [diff] [blame] | 100 | # Obsolete options, no longer supported |
Denys Vlasenko | 2e7aa92 | 2010-03-21 02:22:07 +0100 | [diff] [blame] | 101 | #opt logsrv IP_LIST # 704/UDP log server (not syslog!) |
| 102 | #opt namesrv IP_LIST # IEN 116 name server, obsolete (August 1979!!!) |
| 103 | #opt cookiesrv IP_LIST # RFC 865 "quote of the day" server, rarely (never?) used |
| 104 | #opt timesrv IP_LIST # RFC 868 time server, rarely (never?) used |