1
<!-- retain these comments for translator revision tracking -->
2
<!-- original version: 29400 -->
5
<sect2 condition="supports-dhcp" id="dhcpd">
6
<!-- <title>Setting up a DHCP server</title> -->
7
<title>Attivare un server DHCP</title>
11
<!-- One free software DHCP server is ISC <command>dhcpd</command>.
12
In &debian;, this is available in the <classname>dhcp</classname>
13
package. Here is a sample configuration file for it (usually
14
<filename>/etc/dhcpd.conf</filename>): -->
16
Un server DHCP libero è <command>dhcpd</command> di ISC. In &debian; è
17
disponibile nel pacchetto <classname>dhcp</classname>. Questo è un esempio
18
del file di configurazione per questo server (di solito
19
<filename>/etc/dhcpd.conf</filename>):
21
<informalexample><screen>
22
option domain-name "example.com";
23
option domain-name-servers ns1.example.com;
24
option subnet-mask 255.255.255.0;
25
default-lease-time 600;
27
server-name "servername";
29
subnet 192.168.1.0 netmask 255.255.255.0 {
30
range 192.168.1.200 192.168.1.253;
31
option routers 192.168.1.1;
35
filename "/tftpboot/tftpboot.img";
36
server-name "servername";
37
next-server servername;
38
hardware ethernet 01:23:45:67:89:AB;
39
fixed-address 192.168.1.90;
41
</screen></informalexample>
43
<!-- Note: the new (and preferred) <classname>dhcp3</classname> package uses
44
<filename>/etc/dhcp3/dhcpd.conf</filename>. -->
46
Nota: il nuovo (e da preferire) pacchetto <classname>dhcp3</classname> usa il
47
file <filename>/etc/dhcp3/dhcpd.conf</filename>.
51
<!-- In this example, there is one server
52
<replaceable>servername</replaceable> which performs all of the work
53
of DHCP server, TFTP server, and network gateway. You will almost
54
certainly need to change the domain-name options, as well as the
55
server name and client hardware address. The
56
<replaceable>filename</replaceable> option should be the name of the
57
file which will be retrieved via TFTP. -->
59
In questo esempio c'è una macchina <replaceable>servername</replaceable>
60
che fa da server DHCP, da server TFTP e da gateway di rete. Sicuramente è
61
necessario cambiare le opzioni domain-name e anche il nome del server e
62
l'indirizzo hardware del client. Il valore dell'opzione
63
<replaceable>filename</replaceable> deve essere il nome del file che
64
verrà recuperato tramite TFTP.
68
<!-- After you have edited the <command>dhcpd</command> configuration file,
69
restart it with <userinput>/etc/init.d/dhcpd restart</userinput>. -->
71
Dopo aver modificato il file di configurazione di <command>dhcpd</command>
72
riavviarlo con <userinput>/etc/init.d/dhcpd restart</userinput>.
77
<!-- <title>Enabling PXE Booting in the DHCP configuration</title> -->
78
<title>Abilitare l'avvio PXE nella configurazione di DHCP</title>
82
<!-- Here is another example for a <filename>dhcp.conf</filename> using the
83
Pre-boot Execution Environment (PXE) method of TFTP. -->
85
Questo è un altro esempio di <filename>dhcp.conf</filename> che usa il
86
metodo PXE (Pre-boot Execution Environment) di TFTP.
88
<informalexample><screen>
89
option domain-name "example.com";
91
default-lease-time 600;
97
# The next paragraph needs to be modified to fit your case
98
subnet 192.168.1.0 netmask 255.255.255.0 {
99
range 192.168.1.200 192.168.1.253;
100
option broadcast-address 192.168.1.255;
101
# the gateway address which can be different
102
# (access to the internet for instance)
103
option routers 192.168.1.1;
104
# indicate the dns you want to use
105
option domain-name-servers 192.168.1.3;
109
next-server 192.168.1.3;
111
# tftp client hardware address
112
hardware ethernet 00:10:DC:27:6C:15;
113
filename "/tftpboot/pxelinux.0";
116
</screen></informalexample>
118
<!-- Note that for PXE booting, the client filename
119
<filename>pxelinux.0</filename> is a boot loader, not a kernel image
120
(see <xref linkend="tftp-images"/> below). -->
122
Notare che con l'avvio PXE, il nome del file client
123
<filename>pxelinux.0</filename> è il bootloader, non l'immagine del kernel
124
(si consulti <xref linkend="tftp-images"/>).