summaryrefslogtreecommitdiff
path: root/fr/install-methods/tftp/dhcp.xml
blob: 76c536c0acda0c279fd4778bc079dc683ede9e82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- original version 29400 -->


  <sect2 condition="supports-dhcp" id="dhcpd">
   <title>Configurer un serveur DHCP</title>
<para>

Il existe un seul serveur DHCP libre, <command>dhcpd</command> ISC. Dans
&debian;, il est disponible dans le paquet <classname>dhcp</classname>. 
Voici un exemple de fichier de configuration (habituellement
<filename>/etc/dhcpd.conf</filename>)&nbsp;:

<informalexample><screen>
option domain-name "example.com";
option domain-name-servers ns1.example.com;
option subnet-mask 255.255.255.0;
default-lease-time 600;
max-lease-time 7200;
server-name "servername";

subnet 192.168.1.0 netmask 255.255.255.0 {
  range 192.168.1.200 192.168.1.253;
  option routers 192.168.1.1;
}

host clientname {
  filename "/tftpboot/tftpboot.img";
  server-name "servername";
  next-server servername;
  hardware ethernet 01:23:45:67:89:AB; 
  fixed-address 192.168.1.90;
}
</screen></informalexample>

Note&nbsp;: dans le nouveau paquet <classname>dhcp3</classname>, ce fichier
s'appelle <filename>/etc/dhcp3/dhcpd.conf</filename>. 

</para><para>

Dans cet exemple, il y a un serveur <replaceable>servername</replaceable> 
qui joue le rôle de serveur DHCP, serveur TFTP et passerelle réseau. Vous 
devrez certainement changer les options de domain-name ainsi que le nom du 
serveur et les adresses matérielles du client. L'option
<replaceable>filename</replaceable> devrait être le nom du fichier extrait
via TFTP.

</para><para>

Après avoir modifié le fichier de configuration de <command>dhcpd</command>,
relancez <command>dhcpd</command> par 
<userinput>/etc/init.d/dhcpd restart</userinput>.

</para>

   <sect3 arch="i386">
   <title>Amorçage PXE et configuration de DHCP</title>
<para>
Voici un autre exemple de fichier <filename>dhcp.conf</filename> utilisant
la méthode de chargement du système d'exploitation par le réseau gérée par le 
matériel («&nbsp;Pre-boot Execution Environment&nbsp;») (PXE) de TFTP.

<informalexample><screen>
option domain-name "example.com";

default-lease-time 600;
max-lease-time 7200;

allow booting;
allow bootp;

# The next paragraph needs to be modified to fit your case
subnet 192.168.1.0 netmask 255.255.255.0 {
  range 192.168.1.200 192.168.1.253;
  option broadcast-address 192.168.1.255;
# the gateway address which can be different 
# (access to the internet for instance)
  option routers 192.168.1.1;
# indicate the dns you want to use
  option domain-name-servers 192.168.1.3;
}

group {
 next-server 192.168.1.3;
 host tftpclient {
# tftp client hardware address
  hardware ethernet  00:10:DC:27:6C:15;
  filename "/tftpboot/pxelinux.0";
 }
}
</screen></informalexample>

Veuillez noter que pour un démarrage PXE, le fichier du client 
<filename>pxelinux.0</filename> est un programme d'amorçage et non une image 
du noyau (voir <xref linkend="tftp-images"/> ci-dessous).

</para>
   </sect3>
  </sect2>