cvs commit: BLFS/packages/d dhcpcd-config.xml

markh at markh at
Sat Apr 20 14:06:36 PDT 2002

markh       02/04/20 14:06:36

  Modified:    .        index.xml
               chapter01 changelog.xml
               chapter06 dhcp.xml
               packages/d dhcpcd-config.xml
  Added:       chapter06 dhcpclient.xml
  add dhcp client configuration details
  Revision  Changes    Path
  1.67      +1 -0      BLFS/index.xml
  Index: index.xml
  RCS file: /home/cvsroot/BLFS/index.xml,v
  retrieving revision 1.66
  retrieving revision 1.67
  diff -u -r1.66 -r1.67
  --- index.xml	20 Apr 2002 20:09:50 -0000	1.66
  +++ index.xml	20 Apr 2002 21:06:36 -0000	1.67
  @@ -103,6 +103,7 @@
   <!ENTITY chapter06 SYSTEM "chapter06/chapter06.xml">
   <!ENTITY ch06-intro SYSTEM "chapter06/intro.xml">
   <!ENTITY ch06-dhcp SYSTEM "chapter06/dhcp.xml">
  +<!ENTITY ch06-dhcpclient SYSTEM "chapter06/dhcpclient.xml">
   <!ENTITY ch06-dialup SYSTEM "chapter06/dialup.xml">
   <!ENTITY ch06-cabledsl SYSTEM "chapter06/cabledsl.xml">
   <!ENTITY ch06-iptables SYSTEM "chapter06/iptables.xml">
  1.64      +3 -0      BLFS/chapter01/changelog.xml
  Index: changelog.xml
  RCS file: /home/cvsroot/BLFS/chapter01/changelog.xml,v
  retrieving revision 1.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- changelog.xml	20 Apr 2002 20:07:10 -0000	1.63
  +++ changelog.xml	20 Apr 2002 21:06:36 -0000	1.64
  @@ -10,6 +10,9 @@
  +<listitem><para>April 20th, 2002 [markh]: Chapter 06 - We now have DHCP
  +client configuration instructions.</para></listitem>
   <listitem><para>April 20th, 2002 [markh]: Chapter 08 and Appendix A -
   Update to postfix-1.1.7 and keep runlevels list in sync with LFS-1.9
   (from Larry).</para></listitem>
  1.5       +18 -1     BLFS/chapter06/dhcp.xml
  Index: dhcp.xml
  RCS file: /home/cvsroot/BLFS/chapter06/dhcp.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- dhcp.xml	28 Mar 2002 00:48:11 -0000	1.4
  +++ dhcp.xml	20 Apr 2002 21:06:36 -0000	1.5
  @@ -9,15 +9,26 @@
   in order to connect to it.  DHCP is also used by some cable modems.</para>
   <para>We currently provide installation instructions for two DHCP
  -clients, those from the dhcp and dhcpcd packages..</para>
  +clients, those from the dhcp and dhcpcd packages.  Before we discuss 
  +installing the packages, we will also discuss how to
  +configure your bootscripts to allow you to use dhcp as a client.</para>
  +<listitem><para><xref linkend="dhcpclient"/></para></listitem>
   <listitem><para><xref linkend="dhcp"/></para></listitem>
   <listitem><para><xref linkend="dhcpcd"/></para></listitem>
  +<sect1 id="ch06-dhcpclient">
  +<?dbhtml filename="dhcpclient.html" dir="chapter06"?>
  +<title>Configuring dhcp for a client</title>
   <sect1 id="ch06-dhcpd">
   <?dbhtml filename="dhcpd.html" dir="chapter06"?>
   <title>Installing dhcp-&dhcp-version;</title>
  @@ -32,6 +43,12 @@
   You only need to run the DHCP server however, if you're providing this
   service to a network, and it's likely that you'll know if that's the
   case; if it isn't, don't run the server!</para>
  +<para>To configure the client, you need to modify the
  +<filename>/etc/sysconfig/network-devices/ifconfig.eth0</filename> file
  +(or the appropriate one for the interface you are running DHCP on)
  +you created earlier by adding the appropriate <userinput>DHCP_PROG
  +</userinput> and <userinput>DHCP_OPT</userinput> values.</para>
  1.1                  BLFS/chapter06/dhcpclient.xml
  Index: dhcpclient.xml
  <sect2 id="dhcpclient" xreflabel="Configuring dhcp for a client">
  <title>Configuring dhcp for a client</title>
  <sect3><title>Config files</title>
  <sect3><title>Configuration Information</title>
  <para>Note that we use <userinput>eth0</userinput> as the interface
  throughout these instructions.  If you want to configure a different (or
  more than one) interface, simply replace <userinput>eth0</userinput>
  with the interface you wish to use.</para>
  <para>These instructions will convert the configuration files from LFS
  (a static configuration) to a DHCP configuration.  Note that static and
  DHCP interfaces can co-exist on a LFS system, only make the
  alterations to those interfaces which need to support DHCP.</para>
  <para>The first step is to remove the GATEWAY and GATEWAY_IF variables 
  from <filename>/etc/sysconfig/network</filename>.  This should only be done
  if the default interface you intend to use will be using DHCP and only
  needs to be done once; regardless of how many interfaces you are setting
  <para><screen><userinput>cd /etc/sysconfig &&
  cp network network.bak &&
  sed "s/GATEWAY/# GATEWAY/" network.bak > network</userinput></screen></para>
  <para>Now you can create the appropriate <filename>ifconfig.eth0</filename> 
  file with the following commands (note that this will overwrite any
  existing file):
  <screen><userinput>cd /etc/sysconfig/network-devices &&
  cat > ifconfig.eth0 << "EOF"</userinput>
  DHCP_PROG=<path to dhcp>
  DHCP_OPT=<optional parameters>
  <para>You then need to create DHCP specific scripts.  First, the
  <filename>ifup-eth0</filename> script:</para>
  <para><screen><userinput>cat > ifup-eth0 << "EOF" </userinput>
  source /etc/sysconfig/rc || exit
  source $rc_functions || exit
  source $network_devices/ifconfig.eth0 || exit
  echo "Bringing up the eth0 interface..."
  modprobe eth0
  loadproc $DHCP_PROG $DHCP_OPT
  <para>Then the <filename>ifdown-eth0</filename> script:</para>
  <para><screen><userinput>cat > ifdown-eth0 << "EOF" </userinput>
  source /etc/sysconfig/rc || exit
  source $rc_functions || exit
  source $network_devices/ifconfig.eth0 || exit
  echo "Bringing down the eth0 interface..."
  ifconfig eth0 down
  killproc $DHCP_PROG
  <para>Finally, we need to make these scripts executable:</para>
  <para><screen><userinput>chmod 755 ifup-eth0 &&
  chmod 755 ifdown-eth0</userinput></screen></para>
  1.2       +5 -1      BLFS/packages/d/dhcpcd-config.xml
  Index: dhcpcd-config.xml
  RCS file: /home/cvsroot/BLFS/packages/d/dhcpcd-config.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- dhcpcd-config.xml	15 Feb 2002 17:01:21 -0000	1.1
  +++ dhcpcd-config.xml	20 Apr 2002 21:06:36 -0000	1.2
  @@ -7,7 +7,11 @@
   <sect4><title>Configuration Information</title>
  -<para>More information will appear here later.</para>
  +<para>To configure the client, you need to modify the
  +<filename>/etc/sysconfig/network-devices/ifconfig.eth0</filename> file
  +(or the appropriate one for the interface you are running DHCP on)
  +you created earlier by adding the appropriate <userinput>DHCP_PROG
  +</userinput> and <userinput>DHCP_OPT</userinput> values.</para>
Unsubscribe: send email to listar at
and put 'unsubscribe blfs-book' in the subject header of the message

More information about the blfs-book mailing list