Editorial pass through Configuring DHCP section.
Sponsored by: iXsystems
This commit is contained in:
parent
a56e5fb7f8
commit
ba74cf0ffc
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=44135
1 changed files with 31 additions and 53 deletions
|
@ -4098,36 +4098,23 @@ Received 264951 bytes in 0.1 seconds</screen>
|
|||
<secondary>diskless operation</secondary>
|
||||
</indexterm>
|
||||
|
||||
<para><acronym>PXE</acronym> requires a <acronym>TFTP</acronym>
|
||||
and a <acronym>DHCP</acronym> server to be set up. The
|
||||
<para>The
|
||||
<acronym>DHCP</acronym> server does not need to be the same
|
||||
machine as the <acronym>TFTP</acronym> server, but it needs
|
||||
machine as the <acronym>TFTP</acronym> and <acronym>NFS</acronym> server, but it needs
|
||||
to be accessible in the network.</para>
|
||||
|
||||
<para>The <application>ISC DHCP</application> server can
|
||||
answer both <acronym>BOOTP</acronym> and
|
||||
<acronym>DHCP</acronym> requests.</para>
|
||||
|
||||
<para><application>ISC DHCP</application> is not part of the
|
||||
base system. Install the
|
||||
<para><acronym>DHCP</acronym> is not part of the &os;
|
||||
base system but can be installed using the
|
||||
<package>net/isc-dhcp42-server</package> port or
|
||||
package, following the instructions documented at <xref
|
||||
linkend="network-dhcp-server"/>. Make sure that
|
||||
<filename>/etc/rc.conf</filename> and
|
||||
<filename>/usr/local/etc/dhcpd.conf</filename> are
|
||||
correctly configured..</para>
|
||||
package.</para>
|
||||
|
||||
<para>Once <application>ISC DHCP</application> is installed,
|
||||
edit its configuration file,
|
||||
<para>Once installed,
|
||||
edit the configuration file,
|
||||
<filename>/usr/local/etc/dhcpd.conf</filename>. Configure
|
||||
the <literal>next-server</literal>,
|
||||
<literal>filename</literal>, and
|
||||
<literal>option root-path</literal> settings to specify
|
||||
the <acronym>TFTP</acronym> server <acronym>IP</acronym>
|
||||
address, the path to <filename>/boot/pxeboot</filename>
|
||||
in <acronym>TFTP</acronym>, and the path to the
|
||||
<acronym>NFS</acronym> root file system. Here is a sample
|
||||
<filename>dhcpd.conf</filename> setup:</para>
|
||||
<literal>root-path</literal> settings as seen in this
|
||||
example:</para>
|
||||
|
||||
<programlisting>subnet 192.168.0.0 netmask 255.255.255.0 {
|
||||
range 192.168.0.2 192.168.0.3 ;
|
||||
|
@ -4138,14 +4125,13 @@ Received 264951 bytes in 0.1 seconds</screen>
|
|||
option domain-name "example.com";
|
||||
|
||||
# IP address of TFTP server
|
||||
next-server 192.168.0.1 ;
|
||||
next-server <replaceable>192.168.0.1</replaceable> ;
|
||||
|
||||
# path of boot loader obtained
|
||||
# via tftp
|
||||
filename "FreeBSD/install/boot/pxeboot" ;
|
||||
# path of boot loader obtained via tftp
|
||||
filename "<replaceable>FreeBSD/install/boot/pxeboot</replaceable>" ;
|
||||
|
||||
# pxeboot boot loader will try to NFS mount this directory for root FS
|
||||
option root-path "192.168.0.1:/b/tftpboot/FreeBSD/install/" ;
|
||||
option root-path "<replaceable>192.168.0.1:/b/tftpboot/FreeBSD/install/</replaceable>" ;
|
||||
|
||||
}</programlisting>
|
||||
|
||||
|
@ -4160,37 +4146,29 @@ Received 264951 bytes in 0.1 seconds</screen>
|
|||
inside the <literal>host</literal> declarations.</para>
|
||||
-->
|
||||
|
||||
<para>The <literal>next-server</literal> directive
|
||||
designates the <acronym>TFTP</acronym> or
|
||||
<acronym>NFS</acronym> server to use for loading
|
||||
&man.loader.8; or the kernel file. The default is to
|
||||
use the same host as the <acronym>DHCP</acronym>
|
||||
<para>The <literal>next-server</literal> directive is used
|
||||
to specify the <acronym>IP</acronym> address of the
|
||||
<acronym>TFTP</acronym>
|
||||
server.</para>
|
||||
|
||||
<para>The <literal>filename</literal> directive defines
|
||||
the file that <acronym>PXE</acronym> will load for the
|
||||
next execution step. It must be specified according
|
||||
to the transfer method used.
|
||||
<acronym>PXE</acronym> uses <acronym>TFTP</acronym>,
|
||||
which is why a relative filename is used here. Also,
|
||||
<acronym>PXE</acronym> loads
|
||||
<filename>pxeboot</filename>, not the kernel. There are
|
||||
other interesting possibilities, like loading
|
||||
<filename>pxeboot</filename> from a &os; CD-ROM
|
||||
<filename>/boot</filename> directory.
|
||||
Since &man.pxeboot.8; can load a
|
||||
<filename>GENERIC</filename> kernel, it is possible to
|
||||
use <acronym>PXE</acronym> to boot from a remote
|
||||
CD-ROM.</para>
|
||||
the path to <filename>/boot/pxeboot</filename>. A
|
||||
relative filename is used, meaning that
|
||||
<filename>/b/tftpboot</filename> is not included in the
|
||||
path.</para>
|
||||
|
||||
<para>The <literal>root-path</literal> option defines
|
||||
the path to the root file system, in usual
|
||||
<acronym>NFS</acronym> notation. When using
|
||||
<acronym>PXE</acronym>, it is possible to leave off the
|
||||
host's <acronym>IP</acronym> address as long as the
|
||||
<acronym>BOOTP</acronym> kernel option is not enabled.
|
||||
The <acronym>NFS</acronym> server will then be the
|
||||
same as the <acronym>TFTP</acronym> one.</para>
|
||||
the path to the <acronym>NFS</acronym> root file system.</para>
|
||||
|
||||
<para>Once the edits are saved, enable
|
||||
<acronym>NFS</acronym> at boot time by adding the
|
||||
following line to <filename>/etc/rc.conf</filename>:</para>
|
||||
|
||||
<programlisting>dhcpd_enable="YES"</programlisting>
|
||||
|
||||
<para>Then, start the <acronym>DHCP</acronym> service:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>service isc-dhcpd start</userinput></screen>
|
||||
</sect2>
|
||||
<!--
|
||||
Are these sections still needed?
|
||||
|
|
Loading…
Reference in a new issue