📄 559-563.html
字号:
<HTML>
<HEAD>
<TITLE>Special Edition Using Linux, Fourth Edition:Using SLIP and PPP</TITLE>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>
-->
<!--ISBN=0789717468//-->
<!--TITLE=Special Edition Using Linux, Fourth Edition//-->
<!--AUTHOR=Jack Tackett//-->
<!--AUTHOR=Jr.//-->
<!--AUTHOR=Steve Burnett//-->
<!--PUBLISHER=Macmillan Computer Publishing//-->
<!--IMPRINT=Que//-->
<!--CHAPTER=29//-->
<!--PAGES=559-563//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//-->
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="../ch28/557-558.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="563-565.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<H2 ALIGN="CENTER"><FONT COLOR="#000077"><I>PART VI<BR>Using the Internet
</I></FONT></H2>
<DL>
<DT>29 Using SLIP and PPP
<DT>30 Accessing the Network with <I>telnet</I>, <I>ftp</I>, and the <I>r</I>-Commands
<DT>31 Surfing the Internet with the World Wide Web
<DT>32 Creating Web Documents with HTML
<DT>33 Using Electronic Mail
<DT>34 Surviving Usenet News
</DL>
<H2><A NAME="Heading1"></A><FONT COLOR="#000077">Chapter 29<BR>Using SLIP and PPP
</FONT></H2>
<P><I>Steve Burnett</I></P>
<DL>
<DT><B><BIG>I</BIG>n this chapter
</B><DT>Understanding the Requirements for SLIP and PPP
<DT>Using <TT>dip</TT> to Automate SLIP Operations
<DT>Using <TT>diplogin</TT> to Provide SLIP Service
<DT>Using PPP
</DL>
<P>The Linux kernel supports two serial-line protocols for transmitting Internet Protocol (IP) traffic: SLIP (Serial Line Internet Protocol) and PPP (Point-to-Point Protocol). These protocols were developed as a poor man’s alternative to expensive leased-line setups for getting Internet connectivity. Anyone with a reasonably high-speed modem and a service provider that supports these protocols can get their Linux machine IP-connected for a very low cost compared to leased-line systems. SLIP drivers for Linux were available soon after Linux was first released, and PPP support was added shortly thereafter. Although PPP has come to dominate the industry, the SLIP configuration is still helpful as a basis.
</P>
<H3><A NAME="Heading2"></A><FONT COLOR="#000077">Understanding the Requirements for SLIP and PPP</FONT></H3>
<P>You need to make sure that a few things are set up in your Linux kernel or configuration files. TCP/IP networking must be enabled and the loopback interface should be configured.
</P>
<BLOCKQUOTE>
<P><FONT SIZE="-1"><HR><B>See</B> “Configuring the Software Loopback Interface,” <B>p. 448</B><HR></FONT>
</BLOCKQUOTE>
<P>You’ll want the IP address of your Domain Name Service (DNS) server to be included in your /etc/resolv.conf file to make accessing other machines besides your dial-up host convenient. If your dial-up link is slow or error-prone, you might want to run a name server on your Linux box, to cache any DNS lookups and decrease the amount of DNS IP traffic on your dial-up link.
</P>
<BLOCKQUOTE>
<P><FONT SIZE="-1"><HR><B>See</B> “The /etc/resolv.conf File,” <B>p. 505</B><HR></FONT>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P><FONT SIZE="-1"><HR><B>See</B> “Using the <TT>named</TT> Daemon to Set Up the Server,” <B>p. 506</B><HR></FONT>
</BLOCKQUOTE>
<H3><A NAME="Heading3"></A><FONT COLOR="#000077">Using <I>dip</I> to Automate SLIP Operations
</FONT></H3>
<P>Linux offers a number of programs to manage your SLIP operations. <TT>dip</TT>, the Dial-Up IP Protocol driver, is one of the most versatile tools. It provides a scripting language for automating control of the modem and automatically sets up the SLIP network interface and kernel routing tables. You can use <TT>dip</TT> to initiate SLIP connections or provide dial-up SLIP service to other machines. The syntax for <TT>dip</TT> is as follows:</P>
<!-- CODE SNIP //-->
<PRE>
dip [-tvi] [-m <I>mtu</I>] [<I>scriptfile</I>]
</PRE>
<!-- END CODE SNIP //-->
<P>Table 29.1 describes <TT>dip</TT>’s most common command-line arguments.</P>
<TABLE WIDTH="100%"><CAPTION ALIGN=LEFT><B>Table 29.1</B> <TT>dip</TT> Common Command-Line Arguments
<TR>
<TH COLSPAN="2"><HR>
<TR>
<TH WIDTH="25%" ALIGN="LEFT">Argument
<TH WIDTH="75%" ALIGN="LEFT">Description
<TR>
<TH COLSPAN="2"><HR>
<TR>
<TD><TT>-a</TT>
<TD>Prompts the user for username and password.
<TR>
<TD VALIGN="TOP"><TT>-t</TT>
<TD>Runs <TT>dip</TT> in command mode. Command mode gives you full access to everything <TT>dip</TT> can do, allowing you to initiate a SLIP connection manually.
<TR>
<TD><TT>-v</TT>
<TD>Used with <TT>-t</TT> to display the current error level.
<TR>
<TD VALIGN="TOP"><TT>-i</TT>
<TD>Tells <TT>dip</TT> to operate in input mode. This flag is used when <TT>dip</TT> provides SLIP service for others dialing into your machine.
<TR>
<TD><TT>-m <I>mtu</I></TT>
<TD>Forces <TT>dip</TT> to use the specified MTU value.
<TR>
<TD><I><TT>scriptfile</TT></I>
<TD>Specifies the name of the <TT>dip</TT> script to run.
<TR>
<TD COLSPAN="2"><HR>
</TABLE>
<H4 ALIGN="LEFT"><A NAME="Heading4"></A><FONT COLOR="#000077">Using <I>dip</I> in Command Mode
</FONT></H4>
<P>Invoking <TT>dip</TT> with the <TT>-t</TT> option places it in command mode. This mode lets you control <TT>dip</TT> directly and is an excellent tool for developing and debugging <TT>dip</TT> scripts. The following shows you what <TT>dip</TT>’s command mode looks like:</P>
<!-- CODE SNIP //-->
<PRE>
$ <B>/sbin/dip -t</B>
DIP: Dialup IP Protocol Driver version 3.3.7i-uri (17 Apr 95)
Written by Fred N. van Kempen, MicroWalt Corporation.
DIP>
</PRE>
<!-- END CODE SNIP //-->
<P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="../ch28/557-558.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="563-565.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -