global change from samba.anu.edu.au to samba.org
[samba.git] / docs / textdocs / DHCP-Server-Configuration.txt
1 !==
2 !== DHCP-Server-Configuration.txt for Samba release 2.0.0-beta1 13 Nov 1998
3 !==
4 Subject:        DHCP Server Configuration for SMB Clients
5 Date:           March 1, 1998
6 Contributor:    John H Terpstra <jht@samba.org>
7 Support:        This is an unsupported document. Refer to documentation that is
8                 supplied with the ISC DHCP Server. Do NOT email the contributor
9                 for ANY assistance.
10 ===============================================================================
11
12 Background:
13 ===========
14
15 We wish to help those folks who wish to use the ISC DHCP Server and provide
16 sample configuration settings. Red Hat Linux 5.0 is one operating system that
17 comes supplied with the ISC DHCP Server. ISC DHCP is available from
18                 ftp://ftp.isc.org/isc/dhcp
19
20 Incorrect configuration of MS Windows clients (Windows95, Windows NT Server and
21 Workstation) will lead to problems with browsing and with general network
22 operation. Windows 95 users often report problems where the TCP/IP and related
23 network settings will inadvertantly become reset at machine start-up resulting
24 in loss of configuration settings. This results in increased maintenance
25 overheads as well as serious user frustration.
26
27 In recent times users on one mailing list incorrectly attributed the cause of
28 network operating problems to incorrect configuration of Samba.
29
30 One user insisted that the only way to provent Windows95 from periodically
31 performing a full system reset and hardware detection process on start-up was
32 to install the NetBEUI protocol in addition to TCP/IP.
33
34 In the first place, there is NO need for NetBEUI. All Microsoft Windows clients
35 natively run NetBIOS over TCP/IP, and that is the only protocol that is
36 recognised by Samba. Installation of NetBEUI and/or NetBIOS over IPX will
37 cause problems with browse list operation on most networks. Even Windows NT
38 networks experience these problems when incorrectly configured Windows95
39 systems share the same name space. It is important that only those protocols
40 that are strictly needed for site specific reasons should EVER be installed.
41
42 Secondly, and totally against common opinion, DHCP is NOT an evil design but is
43 an extension of the BOOTP protocol that has been in use in Unix environments
44 for many years without any of the melt-down problems that some sensationalists
45 would have us believe can be experienced with DHCP. In fact, DHCP in covered by
46 rfc1541 and is a very safe method of keeping an MS Windows desktop environment
47 under control and for ensuring stable network operation.
48
49 While it is true that the Microsoft DHCP server that comes with Windows NT
50 Server provides only a sub-set of rfc1533 functionality this is hardly an issue
51 in those sites that already have a large investment and commitment to Unix
52 systems and technologies. The current state of the art of the DHCP Server
53 specification in covered in rfc2132.
54
55 This document aims to provide enough background information so that the
56 majority of site can without too much hardship get the Internet Software
57 Consortium's (ISC) DHCP Server into operation. The key benefits of using DHCP
58 includes:
59
60 1) Automated IP Address space management and maximised re-use of available IP
61 Addresses,
62
63 2) Automated control of MS Windows client TCP/IP network configuration,
64
65 3) Automatic recovery from start-up and run-time problems with Windows95.
66
67
68
69 Client Configuration for SMB Networking:
70 ========================================
71 SMB network clients need to be configured so that all standard TCP/IP name to
72 address resolution works correctly. Once this has been achieved the SMB
73 environment provides additional tools and services that act as helper agents in
74 the translation of SMB (NetBIOS) names to their appropriate IP Addresses. One
75 such helper agent is the NetBIOS Name Server (NBNS) or as Microsoft called it
76 in their Windows NT Server implementation WINS (Windows Internet Name Server).
77
78 A client needs to be configured so that it has a unique Machine (Computer)
79 Name. This can NOT be done via DHCP and must be assigned when MS Windows
80 networking is first installed. All remaining TCP/IP networking parameters can
81 be assigned via DHCP. These include:
82
83 a) IP Address,
84 b) Netmask,
85 c) Gateway (Router) Address,
86 d) DNS Domain Name,
87 e) DNS Server addresses,
88 f) WINS (NBNS) Server addresses,
89 g) IP Forwarding,
90 h) Timezone offset, 
91 i) Node Type,
92
93 Other assignments can be made from a DHCP server too, but the above cover the
94 major needs.
95
96
97 DHCP Server Installation:
98 =========================
99 It is assumed that you will have obtained a copy of the GPL'd ISC DHCP server
100 source files from ftp://ftp.isc.org/isc/dhcp, it is also assumed that you have
101 compiled the sources and have installed the binary files.
102
103 The following simply serves to provide sample configuration files to enable
104 dhcpd to operate. The sample files assume that your site is configured to use
105 private IP network address space using the Class B range of 172.16.1.0 -
106 172.16.1.255 and is using a netmask of 255.255.255.0 (ie:24 bits). It is
107 assumed that your router to the outside world is at 172.16.1.254 and that your
108 Internet Domain Name is bestnet.com.au. The IP Address range 172.16.1.100 to
109 172.16.1.240 has been set aside as your dynamically allocated range. In
110 addition, bestnet.com.au have two print servers that need to obtain settings
111 via BOOTP. The machine linux.bestnet.com.au has IP address 172.16.1.1 and is
112 you primary Samba server with WINS support enabled by adding the parameter to
113 the /etc/smb.conf file: [globals] wins support = yes. The dhcp lease time will
114 be set to 20 hours.
115
116 Configuration Files:
117 ====================
118 Before dhcpd will run you need to install a file that speifies the
119 configuration settings, and another that holds the database of issued IP
120 addresses. On many systems these are stored in the /etc directory on the Unix
121 system.
122
123 Example /etc/dhcpd.conf:
124 ========================
125 server-identifier linux.bestnet.com.au;
126
127 subnet 172.16.1.0 netmask 255.255.255.0 {
128         range 172.16.1.100 172.16.1.240;
129         default-lease-time 72000;
130         max-lease-time 144000;
131         option subnet-mask 255.255.255.0;
132         option broadcast-address 172.16.1.255;
133         option routers 172.16.1.254;
134         option domain-name-servers 172.16.1.1, 172.16.1.2;
135         option domain-name "bestnet.com.au";
136         option time-offset 39600;
137         option ip-forwarding off;
138         option netbios-name-servers 172.16.0.1;
139         option netbios-dd-server 172.16.0.1;
140         option netbios-node-type 8;
141 }
142
143 group {
144         next-server 172.16.1.10;
145         option subnet-mask 255.255.255.0;
146         option domain-name "bestnet.com.au";
147         option domain-name-servers 172.16.1.1, 172.16.0.2;
148         option netbios-name-servers 172.16.0.1;
149         option netbios-dd-server 172.16.0.1;
150         option netbios-node-type 8;
151         option routers 172.16.1.240;
152         option time-offset 39600;
153         host lexmark1 {
154                 hardware ethernet 06:07:08:09:0a:0b;
155                 fixed-address 172.16.1.245;
156         }
157         host epson4 {
158                 hardware ethernet 01:02:03:04:05:06;
159                 fixed-address 172.16.1.242;
160         }
161 }
162
163
164 Creating the /etc/dhcpd.leases file:
165 ====================================
166 At a Unix shell create an empty dhcpd.leases file in the /etc directory.
167 You can do this by typing:      cp /dev/null /etc/dhcpd.leases
168
169
170 Setting up a route table for all-ones addresses:
171 ================================================
172 Quoting from the README file that comes with th eISC DHCPD Server:
173
174                               BROADCAST
175
176 In order for dhcpd to work correctly with picky DHCP clients (e.g.,
177 Windows 95), it must be able to send packets with an IP destination
178 address of 255.255.255.255.  Unfortunately, Linux insists on changing
179 255.255.255.255 into the local subnet broadcast address (here, that's
180 192.5.5.223).  This results in a DHCP protocol violation, and while
181 many DHCP clients don't notice the problem, some (e.g., all Microsoft
182 DHCP clients) do.  Clients that have this problem will appear not to
183 see DHCPOFFER messages from the server.
184
185 It is possible to work around this problem on some versions of Linux
186 by creating a host route from your network interface address to
187 255.255.255.255.   The command you need to use to do this on Linux
188 varies from version to version.   The easiest version is:
189
190         route add -host 255.255.255.255 dev eth0
191
192 On some older Linux systems, you will get an error if you try to do
193 this.   On those systems, try adding the following entry to your
194 /etc/hosts file:
195
196 255.255.255.255 all-ones
197
198 Then, try:
199
200         route add -host all-ones dev eth0
201
202
203 For more information please refer to the ISC DHCPD Server documentation.