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 | 2b0e957 | 2009-06-17 13:22:26 +0200 | [diff] [blame] | 11 | # The maximim number of leases (includes addresses reserved |
| 12 | # by OFFER's, DECLINE's, and ARP conficts). Will be corrected |
| 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) |
| 23 | # if a DHCP decline message is received (seconds). |
| 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 |
| 27 | # if an ARP conflct occurs (seconds). |
| 28 | #conflict_time 3600 |
Russ Dill | 61fb489 | 2002-10-14 21:41:28 +0000 | [diff] [blame] | 29 | |
Denys Vlasenko | 2b0e957 | 2009-06-17 13:22:26 +0200 | [diff] [blame] | 30 | # How long an offered address is reserved (seconds). |
| 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 |
| 34 | # to this value (seconds). |
| 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 | |
| 43 | # Everytime 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 | 2b0e957 | 2009-06-17 13:22:26 +0200 | [diff] [blame] | 47 | # The following are bootp specific options, settable by udhcpd. |
Russ Dill | 61fb489 | 2002-10-14 21:41:28 +0000 | [diff] [blame] | 48 | #siaddr 192.168.0.22 #default: 0.0.0.0 |
Denys Vlasenko | 2b0e957 | 2009-06-17 13:22:26 +0200 | [diff] [blame] | 49 | #sname zorak #default: none |
| 50 | #boot_file /var/nfs_root #default: none |
Russ Dill | 61fb489 | 2002-10-14 21:41:28 +0000 | [diff] [blame] | 51 | |
| 52 | # The remainer of options are DHCP options and can be specifed with the |
| 53 | # keyword 'opt' or 'option'. If an option can take multiple items, such |
| 54 | # as the dns option, they can be listed on the same line, or multiple |
| 55 | # lines. The only option with a default is 'lease'. |
Denys Vlasenko | 2b0e957 | 2009-06-17 13:22:26 +0200 | [diff] [blame] | 56 | # Examples: |
Russ Dill | 61fb489 | 2002-10-14 21:41:28 +0000 | [diff] [blame] | 57 | opt dns 192.168.10.2 192.168.10.10 |
| 58 | option subnet 255.255.255.0 |
| 59 | opt router 192.168.10.2 |
| 60 | opt wins 192.168.10.10 |
| 61 | option dns 129.219.13.81 # appened to above DNS servers for a total of 3 |
| 62 | option domain local |
| 63 | option lease 864000 # 10 days of seconds |
| 64 | |
Denys Vlasenko | 2b0e957 | 2009-06-17 13:22:26 +0200 | [diff] [blame] | 65 | # Currently supported options (for more info, see options.c): |
Russ Dill | 920c1e8 | 2002-12-11 21:39:13 +0000 | [diff] [blame] | 66 | #opt subnet |
| 67 | #opt timezone |
| 68 | #opt router |
Denis Vlasenko | 1d61416 | 2007-12-25 15:32:56 +0000 | [diff] [blame] | 69 | #opt timesrv |
| 70 | #opt namesrv |
Russ Dill | 920c1e8 | 2002-12-11 21:39:13 +0000 | [diff] [blame] | 71 | #opt dns |
Denis Vlasenko | 1d61416 | 2007-12-25 15:32:56 +0000 | [diff] [blame] | 72 | #opt logsrv |
| 73 | #opt cookiesrv |
| 74 | #opt lprsrv |
Russ Dill | 920c1e8 | 2002-12-11 21:39:13 +0000 | [diff] [blame] | 75 | #opt bootsize |
| 76 | #opt domain |
Denis Vlasenko | 1d61416 | 2007-12-25 15:32:56 +0000 | [diff] [blame] | 77 | #opt swapsrv |
Russ Dill | 920c1e8 | 2002-12-11 21:39:13 +0000 | [diff] [blame] | 78 | #opt rootpath |
| 79 | #opt ipttl |
| 80 | #opt mtu |
| 81 | #opt broadcast |
| 82 | #opt wins |
| 83 | #opt lease |
| 84 | #opt ntpsrv |
| 85 | #opt tftp |
| 86 | #opt bootfile |
Eric Andersen | abf58d6 | 2004-10-08 08:49:26 +0000 | [diff] [blame] | 87 | |
Eric Andersen | abf58d6 | 2004-10-08 08:49:26 +0000 | [diff] [blame] | 88 | # Static leases map |
| 89 | #static_lease 00:60:08:11:CE:4E 192.168.0.54 |
| 90 | #static_lease 00:60:08:11:CE:3E 192.168.0.44 |