~qbalazs/installation-guide/lp1030336

« back to all changes in this revision

Viewing changes to en/install-methods/tftp/dhcp.xml

  • Committer: joeyh
  • Date: 2005-10-07 19:51:38 UTC
  • Revision ID: vcs-imports@canonical.com-20051007195138-c3d57b2617a79a4f
move manual to top-level directory, split out of debian-installer package

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!-- retain these comments for translator revision tracking -->
 
2
<!-- $Id: dhcp.xml 29400 2005-07-23 20:21:50Z fjp $ -->
 
3
 
 
4
  <sect2 condition="supports-dhcp" id="dhcpd">
 
5
   <title>Setting up a DHCP server</title>
 
6
<para>
 
7
 
 
8
One free software DHCP server is ISC <command>dhcpd</command>.
 
9
In &debian;, this is available in the <classname>dhcp</classname> package.
 
10
Here is a sample configuration file for it (usually
 
11
<filename>/etc/dhcpd.conf</filename>):
 
12
 
 
13
<informalexample><screen>
 
14
option domain-name "example.com";
 
15
option domain-name-servers ns1.example.com;
 
16
option subnet-mask 255.255.255.0;
 
17
default-lease-time 600;
 
18
max-lease-time 7200;
 
19
server-name "servername";
 
20
 
 
21
subnet 192.168.1.0 netmask 255.255.255.0 {
 
22
  range 192.168.1.200 192.168.1.253;
 
23
  option routers 192.168.1.1;
 
24
}
 
25
 
 
26
host clientname {
 
27
  filename "/tftpboot/tftpboot.img";
 
28
  server-name "servername";
 
29
  next-server servername;
 
30
  hardware ethernet 01:23:45:67:89:AB;
 
31
  fixed-address 192.168.1.90;
 
32
}
 
33
</screen></informalexample>
 
34
 
 
35
Note: the new (and preferred) <classname>dhcp3</classname> package uses
 
36
<filename>/etc/dhcp3/dhcpd.conf</filename>.
 
37
 
 
38
</para><para>
 
39
 
 
40
In this example, there is one server
 
41
<replaceable>servername</replaceable> which performs all of the work
 
42
of DHCP server, TFTP server, and network gateway.  You will almost
 
43
certainly need to change the domain-name options, as well as the
 
44
server name and client hardware address.  The
 
45
<replaceable>filename</replaceable> option should be the name of the
 
46
file which will be retrieved via TFTP.
 
47
 
 
48
</para><para>
 
49
 
 
50
After you have edited the <command>dhcpd</command> configuration file,
 
51
restart it with <userinput>/etc/init.d/dhcpd restart</userinput>.
 
52
 
 
53
</para>
 
54
 
 
55
   <sect3 arch="i386">
 
56
   <title>Enabling PXE Booting in the DHCP configuration</title>
 
57
<para>
 
58
Here is another example for a <filename>dhcp.conf</filename> using the
 
59
Pre-boot Execution Environment (PXE) method of TFTP.
 
60
 
 
61
<informalexample><screen>
 
62
option domain-name "example.com";
 
63
 
 
64
default-lease-time 600;
 
65
max-lease-time 7200;
 
66
 
 
67
allow booting;
 
68
allow bootp;
 
69
 
 
70
# The next paragraph needs to be modified to fit your case
 
71
subnet 192.168.1.0 netmask 255.255.255.0 {
 
72
  range 192.168.1.200 192.168.1.253;
 
73
  option broadcast-address 192.168.1.255;
 
74
# the gateway address which can be different
 
75
# (access to the internet for instance)
 
76
  option routers 192.168.1.1;
 
77
# indicate the dns you want to use
 
78
  option domain-name-servers 192.168.1.3;
 
79
}
 
80
 
 
81
group {
 
82
 next-server 192.168.1.3;
 
83
 host tftpclient {
 
84
# tftp client hardware address
 
85
  hardware ethernet  00:10:DC:27:6C:15;
 
86
  filename "/tftpboot/pxelinux.0";
 
87
 }
 
88
}
 
89
</screen></informalexample>
 
90
 
 
91
Note that for PXE booting, the client filename <filename>pxelinux.0</filename>
 
92
is a boot loader, not a kernel image (see <xref linkend="tftp-images"/>
 
93
below).
 
94
 
 
95
</para>
 
96
   </sect3>
 
97
  </sect2>