2 !== DHCP-Server-Configuration.txt for Samba release 2.2.0-alpha3 24 Mar 2001
4 Subject: DHCP Server Configuration for SMB Clients
7 Contributor: John H Terpstra <jht@samba.org>
8 Support: This is an unsupported document. Refer to documentation that is
9 supplied with the ISC DHCP Server. Do NOT email the contributor
11 ===============================================================================
16 We wish to help those folks who wish to use the ISC DHCP Server and provide
17 sample configuration settings. Most operating systems today come ship with
18 the ISC DHCP Server. ISC DHCP is available from:
19 ftp://ftp.isc.org/isc/dhcp
21 Incorrect configuration of MS Windows clients (Windows9X, Windows ME, Windows
22 NT/2000) will lead to problems with browsing and with general network
23 operation. Windows 9X/ME users often report problems where the TCP/IP and related
24 network settings will inadvertantly become reset at machine start-up resulting
25 in loss of configuration settings. This results in increased maintenance
26 overheads as well as serious user frustration.
28 In recent times users on one mailing list incorrectly attributed the cause of
29 network operating problems to incorrect configuration of Samba.
31 One user insisted that the only way to provent Windows95 from periodically
32 performing a full system reset and hardware detection process on start-up was
33 to install the NetBEUI protocol in addition to TCP/IP. This assertion is not
36 In the first place, there is NO need for NetBEUI. All Microsoft Windows clients
37 natively run NetBIOS over TCP/IP, and that is the only protocol that is
38 recognised by Samba. Installation of NetBEUI and/or NetBIOS over IPX will
39 cause problems with browse list operation on most networks. Even Windows NT
40 networks experience these problems when incorrectly configured Windows95
41 systems share the same name space. It is important that only those protocols
42 that are strictly needed for site specific reasons should EVER be installed.
44 Secondly, and totally against common opinion, DHCP is NOT an evil design but is
45 an extension of the BOOTP protocol that has been in use in Unix environments
46 for many years without any of the melt-down problems that some sensationalists
47 would have us believe can be experienced with DHCP. In fact, DHCP in covered by
48 rfc1541 and is a very safe method of keeping an MS Windows desktop environment
49 under control and for ensuring stable network operation.
51 Please note that MS Windows systems as of MS Windows NT 3.1 and MS Windows 95
52 store all network configuration settings a registry. There are a few reports
53 from MS Windows network administrators that warrant mention here. It would appear
54 that when one sets certain MS TCP/IP protocol settings (either directly or via
55 DHCP) that these do get written to the registry. Even though a subsequent
56 change of setting may occur the old value may persist in the registry. This
57 has been known to create serious networking problems.
59 An example of this occurs when a manual TCP/IP environment is configured to
60 include a NetBIOS Scope. In this event, when the administrator then changes the
61 configuration of the MS TCP/IP protocol stack, without first deleting the
62 current settings, by simply checking the box to configure the MS TCP/IP stack
63 via DHCP then the NetBIOS Scope that is still persistent in the registry WILL be
64 applied to the resulting DHCP offered settings UNLESS the DHCP server also sets
65 a NetBIOS Scope. It may therefore be prudent to forcibly apply a NULL NetBIOS
66 Scope from your DHCP server. The can be done in the dhcpd.conf file with the
68 option netbios-scope "";
70 While it is true that the Microsoft DHCP server that comes with Windows NT
71 Server provides only a sub-set of rfc1533 functionality this is hardly an issue
72 in those sites that already have a large investment and commitment to Unix
73 systems and technologies. The current state of the art of the DHCP Server
74 specification in covered in rfc2132.
76 This document aims to provide enough background information so that the
77 majority of site can without too much hardship get the Internet Software
78 Consortium's (ISC) DHCP Server into operation. The key benefits of using DHCP
81 1) Automated IP Address space management and maximised re-use of available IP
84 2) Automated control of MS Windows client TCP/IP network configuration,
86 3) Automatic recovery from start-up and run-time problems with Windows95.
90 Client Configuration for SMB Networking:
91 ========================================
92 SMB network clients need to be configured so that all standard TCP/IP name to
93 address resolution works correctly. Once this has been achieved the SMB
94 environment provides additional tools and services that act as helper agents in
95 the translation of SMB (NetBIOS) names to their appropriate IP Addresses. One
96 such helper agent is the NetBIOS Name Server (NBNS) or as Microsoft called it
97 in their Windows NT Server implementation WINS (Windows Internet Name Server).
99 A client needs to be configured so that it has a unique Machine (Computer)
102 This can be done, but needs a few NT registry hacks and you need to be able to
103 speak UNICODE, which is of course no problem for a True Wizzard(tm) :)
104 Instructions on how to do this (including a small util for less capable
105 Wizzards) can be found at
107 http://www.unixtools.org/~nneul/sw/nt/dhcp-netbios-hostname.html
110 All remaining TCP/IP networking parameters can be assigned via DHCP. These include:
114 c) Gateway (Router) Address,
116 e) DNS Server addresses,
117 f) WINS (NBNS) Server addresses,
123 Other assignments can be made from a DHCP server too, but the above cover the
126 Note: IF ever an entry has has been made to the NetBIOS Scope field of the
127 TCP/IP configuration panel on an MS Windows machine, and it has then been
128 committed, then that setting may become persistent. In such a c ase it is better
129 to configure the DHCP server with a NetBIOS Scope consisting of an empty string
133 DHCP Server Installation:
134 =========================
135 It is assumed that you will have obtained a copy of the GPL'd ISC DHCP server
136 source files from ftp://ftp.isc.org/isc/dhcp, it is also assumed that you have
137 compiled the sources and have installed the binary files.
139 The following simply serves to provide sample configuration files to enable
140 dhcpd to operate. The sample files assume that your site is configured to use
141 private IP network address space using the Class B range of 172.16.1.0 -
142 172.16.1.255 and is using a netmask of 255.255.255.0 (ie:24 bits). It is
143 assumed that your router to the outside world is at 172.16.1.254 and that your
144 Internet Domain Name is bestnet.com.au. The IP Address range 172.16.1.100 to
145 172.16.1.240 has been set aside as your dynamically allocated range. In
146 addition, bestnet.com.au have two print servers that need to obtain settings
147 via BOOTP. The machine linux.bestnet.com.au has IP address 172.16.1.1 and is
148 you primary Samba server with WINS support enabled by adding the parameter to
149 the /etc/smb.conf file: [globals] wins support = yes. The dhcp lease time will
154 Before dhcpd will run you need to install a file that speifies the
155 configuration settings, and another that holds the database of issued IP
156 addresses. On many systems these are stored in the /etc directory on the Unix
159 Example /etc/dhcpd.conf:
160 ========================
161 server-identifier linux.bestnet.com.au;
163 subnet 172.16.1.0 netmask 255.255.255.0 {
164 range 172.16.1.100 172.16.1.240;
165 default-lease-time 72000;
166 max-lease-time 144000;
167 option subnet-mask 255.255.255.0;
168 option broadcast-address 172.16.1.255;
169 option routers 172.16.1.254;
170 option domain-name-servers 172.16.1.1, 172.16.1.2;
171 option domain-name "bestnet.com.au";
172 option time-offset 39600;
173 option ip-forwarding off;
174 option netbios-name-servers 172.16.0.1, 172.16.0.1;
175 option netbios-dd-server 172.16.0.1;
176 option netbios-node-type 8;
177 option netbios-scope "";
180 ; Note: The above netbios-scope is purposely an empty (NULL) string.
183 next-server 172.16.1.10;
184 option subnet-mask 255.255.255.0;
185 option domain-name "bestnet.com.au";
186 option domain-name-servers 172.16.1.1, 172.16.0.2;
187 option netbios-name-servers 172.16.0.1, 172.16.0.1;
188 option netbios-dd-server 172.16.0.1;
189 option netbios-node-type 8;
190 option netbios-scope "SomeCrazyScope";
191 option routers 172.16.1.240;
192 option time-offset 39600;
194 hardware ethernet 06:07:08:09:0a:0b;
195 fixed-address 172.16.1.245;
198 hardware ethernet 01:02:03:04:05:06;
199 fixed-address 172.16.1.242;
204 Creating the /etc/dhcpd.leases file:
205 ====================================
206 At a Unix shell create an empty dhcpd.leases file in the /etc directory.
207 You can do this by typing: cp /dev/null /etc/dhcpd.leases
210 Setting up a route table for all-ones addresses:
211 ================================================
212 Quoting from the README file that comes with the ISC DHCPD Server:
216 In order for dhcpd to work correctly with picky DHCP clients (e.g.,
217 Windows 95), it must be able to send packets with an IP destination
218 address of 255.255.255.255. Unfortunately, Linux insists on changing
219 255.255.255.255 into the local subnet broadcast address (here, that's
220 192.5.5.223). This results in a DHCP protocol violation, and while
221 many DHCP clients don't notice the problem, some (e.g., all Microsoft
222 DHCP clients) do. Clients that have this problem will appear not to
223 see DHCPOFFER messages from the server.
225 It is possible to work around this problem on some versions of Linux
226 by creating a host route from your network interface address to
227 255.255.255.255. The command you need to use to do this on Linux
228 varies from version to version. The easiest version is:
230 route add -host 255.255.255.255 dev eth0
232 On some older Linux systems, you will get an error if you try to do
233 this. On those systems, try adding the following entry to your
236 255.255.255.255 all-ones
240 route add -host all-ones dev eth0
243 For more information please refer to the ISC DHCPD Server documentation.