mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-01-24 15:12:11 +08:00
update intro to ppp
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@1144 af4574ff-66df-0310-9fd7-8a98e5e911e0
This commit is contained in:
parent
110ec35a84
commit
36f9a236ce
@ -2,10 +2,10 @@
|
||||
<?dbhtml filename="connect.html" dir="connect"?>
|
||||
<title>Connecting to a Network</title>
|
||||
|
||||
<partintro><para>The LFS book covers setting up networking with a static
|
||||
IP. There are however, other methods which are used to connect to networks and
|
||||
importantly the internet. We cover the most popular methods in this
|
||||
chapter.</para></partintro>
|
||||
<partintro><para>The <acronym>LFS</acronym> book covers setting up networking
|
||||
with a static <acronym>IP</acronym>. There are however, other methods which
|
||||
are used to connect to networks and importantly the internet. We cover the
|
||||
most popular methods in this chapter.</para></partintro>
|
||||
|
||||
&connect-dialup;
|
||||
&connect-dhcp;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<sect1 id="dhcpclient" xreflabel="Configuring the LFS bootscripts to support DHCP clients">
|
||||
<?dbhtml filename="configdhcp.html" dir="connect"?>
|
||||
<title>Configuring the LFS bootscripts to support DHCP clients</title>
|
||||
<title>Configuring the <acronym>LFS</acronym> bootscripts to support <acronym>DHCP</acronym> clients</title>
|
||||
|
||||
<sect2><title>Config files</title>
|
||||
<para><filename>/etc/sysconfig/network</filename>,
|
||||
@ -12,33 +12,36 @@
|
||||
<sect2><title>Configuration Information</title>
|
||||
|
||||
<para>Note that on this and the following pages, we
|
||||
use <userinput>eth0</userinput> as the example interface.
|
||||
use <emphasis role="strong">eth0</emphasis> as the example interface.
|
||||
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>
|
||||
replace <emphasis role="strong">eth0</emphasis> with the interface you wish to
|
||||
use.</para>
|
||||
|
||||
<para>These instructions will convert the configuration files from LFS
|
||||
(a static configuration) to a configuration using the DHCP protocol.
|
||||
Note that static and DHCP-based interfaces can co-exist on a LFS system. To
|
||||
do this, you should only make the alterations to those interfaces which
|
||||
need to support DHCP. All of the instructions on this page are applicable
|
||||
no matter which DHCP client you intend to use.</para>
|
||||
<para>These instructions will convert the configuration files from
|
||||
<acronym>LFS</acronym> (a static configuration) to a configuration using the
|
||||
<acronym>DHCP</acronym> protocol. Note that static and
|
||||
<acronym>DHCP</acronym>-based interfaces can co-exist on a
|
||||
<acronym>LFS</acronym> system. To do this, you should only make the
|
||||
alterations to those interfaces which need to support
|
||||
<acronym>DHCP</acronym>. All of the instructions on this page are applicable
|
||||
no matter which <acronym>DHCP</acronym> client you intend to use.</para>
|
||||
|
||||
<para>If the interface you intend to use as your default gateway is going to
|
||||
use DHCP, the first step is to remove the <envar>GATEWAY</envar> and
|
||||
<envar>GATEWAY_IF</envar> variables
|
||||
use <acronym>DHCP</acronym>, the first step is to remove the <envar>GATEWAY
|
||||
</envar> and <envar>GATEWAY_IF</envar> variables
|
||||
from <filename>/etc/sysconfig/network</filename>. This will only need to be
|
||||
done once.</para>
|
||||
|
||||
<para><screen><userinput>cd /etc/sysconfig &&
|
||||
<screen><userinput><command>cd /etc/sysconfig &&
|
||||
cp network network.bak &&
|
||||
sed "s/GATEWAY/# GATEWAY/" network.bak > network</userinput></screen></para>
|
||||
sed "s/GATEWAY/# GATEWAY/" network.bak > network</command></userinput></screen>
|
||||
|
||||
<para>You then need to create scripts which will override the default
|
||||
network scripts and provide DHCP support. These two scripts are generic and
|
||||
so for use with both DHCP clients. First, the
|
||||
<filename>ifup-eth0</filename> script:</para>
|
||||
network scripts and provide <acronym>DHCP</acronym> support. These two scripts
|
||||
are generic and so for use with both <acronym>DHCP</acronym> clients. First,
|
||||
the <filename>ifup-eth0</filename> script:</para>
|
||||
|
||||
<para><screen><userinput>cat > /etc/sysconfig/network-devices/ifup-eth0 << "EOF" </userinput>
|
||||
<screen><userinput><command>cat > /etc/sysconfig/network-devices/ifup-eth0 << "EOF" </command>
|
||||
#!/bin/sh
|
||||
|
||||
source /etc/sysconfig/rc || exit
|
||||
@ -48,11 +51,11 @@ source $network_devices/ifconfig.eth0 || exit
|
||||
echo "Bringing up the eth0 interface..."
|
||||
modprobe eth0
|
||||
loadproc $DHCP_PROG $DHCP_START
|
||||
<userinput>EOF</userinput></screen></para>
|
||||
<command>EOF</command></userinput></screen>
|
||||
|
||||
<para>Then the <filename>ifdown-eth0</filename> script:</para>
|
||||
|
||||
<para><screen><userinput>cat > /etc/sysconfig/network-devices/ifdown-eth0 << "EOF" </userinput>
|
||||
<screen><userinput><command>cat > /etc/sysconfig/network-devices/ifdown-eth0 << "EOF" </command>
|
||||
#!/bin/sh
|
||||
|
||||
source /etc/sysconfig/rc || exit
|
||||
@ -62,12 +65,12 @@ source $network_devices/ifconfig.eth0 || exit
|
||||
echo "Bringing down the eth0 interface..."
|
||||
$DHCP_PROG $DHCP_STOP
|
||||
evaluate_retval
|
||||
<userinput>EOF</userinput></screen></para>
|
||||
<command>EOF</command></userinput></screen>
|
||||
|
||||
<para>Finally, we need to make these scripts executable:</para>
|
||||
|
||||
<para><screen><userinput>chmod 755 /etc/sysconfig/network-devices/ifup-eth0 &&
|
||||
chmod 755 /etc/sysconfig/network-devices/ifdown-eth0</userinput></screen></para>
|
||||
<screen><userinput><command>chmod 755 /etc/sysconfig/network-devices/ifup-eth0 &&
|
||||
chmod 755 /etc/sysconfig/network-devices/ifdown-eth0</command></userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -2,19 +2,20 @@
|
||||
<?dbhtml filename="dhcpclient.html" dir="connect"?>
|
||||
<title>dhcp-&dhcp-version;</title>
|
||||
|
||||
<para>The dhcp package comes with both a client (called dhclient) and a
|
||||
server program for using DHCP. If you want to install this package,
|
||||
<para>The <application>dhcp</application> package comes with both a client
|
||||
(called <command>dhclient</command>) and a server program for using
|
||||
<acronym>DHCP</acronym>. If you want to install this package,
|
||||
the instructions can be found at <xref linkend="dhcp"/>.
|
||||
Note that if you only want to use the client, you
|
||||
do <emphasis>not</emphasis> need to run the server and so do not need
|
||||
the startup script and links provided for the server daemon.
|
||||
You only need to run the DHCP server if you're providing this
|
||||
service to a network, and it's likely that you'll know if that's the
|
||||
You only need to run the <acronym>DHCP</acronym> server 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! Once you have installed the
|
||||
package, return here for information on how to configure the client
|
||||
(dhclient).</para>
|
||||
(<command>dhclient</command>).</para>
|
||||
|
||||
<para>To configure dhclient, you need to create two files,
|
||||
<para>To configure <command>dhclient</command>, you need to create two files,
|
||||
<filename>/etc/sysconfig/network-devices/ifconfig.eth0</filename> and
|
||||
<filename>/etc/dhclient.conf</filename>.</para>
|
||||
|
||||
@ -22,22 +23,22 @@ package, return here for information on how to configure the client
|
||||
file with the following commands (note that this will overwrite any
|
||||
existing file):</para>
|
||||
|
||||
<para><screen><userinput>cd /etc/sysconfig/network-devices &&
|
||||
cat > /etc/sysconfig/network-devices/ifconfig.eth0 << "EOF"</userinput>
|
||||
<screen><userinput><command>cd /etc/sysconfig/network-devices &&
|
||||
cat > /etc/sysconfig/network-devices/ifconfig.eth0 << "EOF"</command>
|
||||
ONBOOT=yes
|
||||
DHCP_PROG=/sbin/dhclient
|
||||
DHCP_START=<appropriate start parameters>
|
||||
DHCP_STOP=-r
|
||||
<userinput>EOF</userinput></screen></para>
|
||||
<command>EOF</command></userinput></screen>
|
||||
|
||||
<para>For more information on the appropriate
|
||||
<envar>DHCP_START</envar> and <envar>DHCP_STOP</envar>
|
||||
values, examine the man page for dhclient.</para>
|
||||
values, examine the man page for <command>dhclient</command>.</para>
|
||||
|
||||
<para>Next, you should then create
|
||||
the <filename>/etc/dhclient.conf</filename> using the following command:</para>
|
||||
|
||||
<para><screen><userinput>cat > /etc/dhclient.conf << "EOF"</userinput>
|
||||
<screen><userinput><command>cat > /etc/dhclient.conf << "EOF"</command>
|
||||
# dhclient.conf
|
||||
|
||||
interface "eth0"{
|
||||
@ -47,6 +48,6 @@ request subnet-mask, broadcast-address, time-offset, routers,
|
||||
require subnet-mask, domain-name-servers;
|
||||
}
|
||||
# end dhclient.conf
|
||||
<userinput>EOF</userinput></screen></para>
|
||||
<command>EOF</command></userinput></screen>
|
||||
|
||||
</sect1>
|
||||
|
@ -1,20 +1,22 @@
|
||||
<chapter id="connect-dhcp">
|
||||
<?dbhtml filename="dhcp.html" dir="connect"?>
|
||||
<title>DHCP Clients</title>
|
||||
<title><acronym>DHCP</acronym> Clients</title>
|
||||
|
||||
<para>DHCP stands for Dynamic Host Configuration Protocol. It is a
|
||||
protocol which is used by many sites to automatically provide
|
||||
information such as IP addresses, subnet masks and routing information
|
||||
to computers. If your network uses DHCP, you will need a DHCP client
|
||||
in order to connect to it. DHCP is also used by some cable
|
||||
modems.</para>
|
||||
<para><acronym>DHCP</acronym> stands for Dynamic Host Configuration Protocol.
|
||||
It is a protocol which is used by many sites to automatically provide
|
||||
information such as <acronym>IP</acronym> addresses, subnet masks and routing
|
||||
information to computers. If your network uses <acronym>DHCP</acronym>, you
|
||||
will need a <acronym>DHCP</acronym> client in order to connect to it.
|
||||
<acronym>DHCP</acronym> is also used by some cable modems.</para>
|
||||
|
||||
<para>We currently provide installation instructions for two DHCP
|
||||
clients, dhclient (from the dhcp package) and dhcpcd. We begin with a page
|
||||
which shows how to alter the LFS bootscripts for generic DHCP support.
|
||||
We then present the two sets of installation instructions which also discuss
|
||||
<para>We currently provide installation instructions for two
|
||||
<acronym>DHCP</acronym> clients, <command>dhclient</command> (from the
|
||||
<application>dhcp</application> package) and <command>dhcpcd</command>. We
|
||||
begin with a page which shows how to alter the <acronym>LFS</acronym>
|
||||
bootscripts for generic <acronym>DHCP</acronym> support. We then present the
|
||||
two sets of installation instructions which also discuss
|
||||
how to create an appropriate configuration file to work with the
|
||||
DHCP client of your choice.</para>
|
||||
<acronym>DHCP</acronym> client of your choice.</para>
|
||||
|
||||
&connect-dhcp-bootscripts;
|
||||
&connect-dhcp-client;
|
||||
|
@ -1,5 +1,5 @@
|
||||
<sect2>
|
||||
<title>Configuring ppp</title>
|
||||
<title>Configuring <application>ppp</application></title>
|
||||
|
||||
<sect3><title>Config files</title>
|
||||
<para><filename>/etc/ppp/*</filename></para>
|
||||
@ -8,7 +8,7 @@
|
||||
<sect3><title>Configuration Information</title>
|
||||
|
||||
<para>The ppp daemon itself requires very little configuration. The
|
||||
main trick is script the connection. This can be done either using the
|
||||
main trick is scripting the connection. This can be done either using the
|
||||
chat program which comes with this package or by using <xref
|
||||
linkend="wvdial"/>.</para>
|
||||
</sect3>
|
||||
|
@ -1,29 +1,33 @@
|
||||
<sect2>
|
||||
<title>Contents</title>
|
||||
|
||||
<para>The ppp package contains the <userinput>chat</userinput>,
|
||||
<userinput>pppd</userinput>, <userinput>pppdump</userinput> and
|
||||
<userinput>pppstats</userinput> programs.</para>
|
||||
<para>The <application>ppp</application> package contains the
|
||||
<command>chat</command>,
|
||||
<command>pppd</command>, <command>pppdump</command> and
|
||||
<command>pppstats</command> programs.</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2><title>Description</title>
|
||||
|
||||
<sect3><title>chat</title>
|
||||
<para>The chat program defines a conversational exchange between the
|
||||
computer and the modem. Its primary purpose is to establish the connection
|
||||
between the Point-to-Point Protocol Daemon (pppd) and the remote's
|
||||
pppd process.</para></sect3>
|
||||
<para>The <command>chat</command> program defines a conversational exchange
|
||||
between the computer and the modem. Its primary purpose is to establish the
|
||||
connection between the Point-to-Point Protocol Daemon
|
||||
(<acronym>pppd</acronym>) and the remote's <command>pppd</command> process.
|
||||
</para></sect3>
|
||||
|
||||
<sect3><title>pppd</title>
|
||||
<para>pppd is the Point to Point Protocol daemon.</para></sect3>
|
||||
<para><command>pppd</command> is the Point to Point Protocol daemon.</para></sect3>
|
||||
|
||||
<sect3><title>pppdump</title>
|
||||
<para>pppdump is used to convert PPP record files
|
||||
<para><command>pppdump</command> is used to convert
|
||||
<acronym>PPP</acronym> record files
|
||||
to a readable format.</para></sect3>
|
||||
|
||||
<sect3><title>pppstats</title>
|
||||
<para>pppstats is used to print PPP statistics.</para></sect3>
|
||||
<para><command>pppstats</command> is used to print
|
||||
<acronym>PPP</acronym> statistics.</para></sect3>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -1,11 +1,15 @@
|
||||
<sect2>
|
||||
<title>Installation of ppp</title>
|
||||
<title>Installation of <application>ppp</application></title>
|
||||
|
||||
<para>Install ppp by running the following commands:</para>
|
||||
<note><para><acronym>PPP</acronym> support must be compiled into the
|
||||
kernel or available as a kernel module.</para></note>
|
||||
|
||||
<para><screen><userinput>./configure &&
|
||||
<para>Install <application>ppp</application> by running the following commands:
|
||||
</para>
|
||||
|
||||
<screen><userinput><command>./configure &&
|
||||
make &&
|
||||
make install</userinput></screen></para>
|
||||
make install</command></userinput></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
@ -1,17 +1,26 @@
|
||||
<sect2>
|
||||
<title>Introduction to ppp</title>
|
||||
<title>Introduction to <application>ppp</application></title>
|
||||
|
||||
<screen>Download location (HTTP): <ulink url="&ppp-download-http;"/>
|
||||
Download location (FTP): <ulink url="&ppp-download-ftp;"/>
|
||||
Version used: &ppp-version;
|
||||
Package size: &ppp-size;
|
||||
Estimated Disk space required: &ppp-buildsize;</screen>
|
||||
|
||||
<para>The ppp package contains the pppd daemon and the chat program.
|
||||
<para>The <application>ppp</application> package contains the <command>pppd
|
||||
</command> daemon and the <command>chat</command> program.
|
||||
This is used for connecting to other machines; often for connecting to
|
||||
the Internet via a dial-up connection to an ISP.</para>
|
||||
the Internet via a dial-up connection to an <acronym>ISP</acronym>.</para>
|
||||
|
||||
<sect3><title>Package information</title>
|
||||
<itemizedlist spacing='compact'>
|
||||
<listitem><para>Download (HTTP): <ulink
|
||||
url="&ppp-download-http;"/></para></listitem>
|
||||
<listitem><para>Download (FTP): <ulink
|
||||
url="&ppp-download-ftp;"/></para></listitem>
|
||||
<listitem><para>Download size: &ppp-size;</para></listitem>
|
||||
<listitem><para>Estimated Disk space required:
|
||||
&ppp-buildsize;</para></listitem>
|
||||
<listitem><para>Estimated build time:
|
||||
&ppp-time;</para></listitem></itemizedlist>
|
||||
</sect3>
|
||||
|
||||
<!--
|
||||
<screen>ppp needs nothing to compile but you must have PPP support
|
||||
either compiled in or as a kernel module to use it.</screen>
|
||||
either compiled in or as a kernel module to use it.</screen> -->
|
||||
|
||||
</sect2>
|
||||
|
@ -8,3 +8,4 @@
|
||||
<!ENTITY ppp-download-http "">
|
||||
<!ENTITY ppp-download-ftp "ftp://cs.anu.edu.au/pub/software/ppp/ppp-2.4.1.tar.gz">
|
||||
<!ENTITY ppp-size "524 KB">
|
||||
<!ENTITY ppp-time "">
|
||||
|
Loading…
Reference in New Issue
Block a user