⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 0161-0163.html

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTML
字号:






<HTML>

<HEAD>

<TITLE>Sams Teach Yourself Linux in 24 Hours:Connecting to the Internet:EarthWeb Inc.-</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=0672311623 //-->

<!-- TITLE=Sams Teach Yourself Linux in 24 Hours//-->

<!-- AUTHOR=Bill Ball//-->

<!-- PUBLISHER=Macmillan Computer Publishing//-->

<!-- IMPRINT=Sams//-->

<!-- CHAPTER=10 //-->

<!-- PAGES=0161-0172 //-->

<!-- UNASSIGNED1 //-->

<!-- UNASSIGNED2 //-->







<P><CENTER>

<a href="../ch09/0157-0160.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0164-0166.html">Next</A>

</CENTER></P>



<A NAME="PAGENUM-161"><P>Page 161</P></A>









<H3><A NAME="ch10_ 2">

Hour 10

</A></H3>



<H2>

<A NAME="ch10_ 3">

Connecting to the Internet

</A>

</H2>



<P>In this hour, you'll learn how to set up your Linux system to connect to

the Internet by using the serial line Point-to-Point Protocol,

known as PPP. After following the directions in this lesson, you should be able to connect to

the Internet through your Internet service provider (ISP) to

do email, Web browsing, or file transfers. This hour's lesson not only shows you how to

do this in the simplest, most basic way possible, but also points you to

sources of information for more details so that you can troubleshoot or fine-tune

your connection.

</P>



<P>I'm recommending that you use a PPP connection for several reasons:

</P>



<UL>

<LI>          Although it's complex, it's easy to set up.

<LI>          You'll find documentation and details on the protocol.

<LI>          You can read the comp.protocols.ppp newsgroup for information.

<LI>          It offers security on both ends of the connection.

<LI>          It's a common protocol supported by nearly all ISPs.

<LI>          It's flexible enough to accommodate different types of connections.

</UL>





<A NAME="PAGENUM-162"><P>Page 162</P></A>



<P>This hour starts by listing some of the hardware and software prerequisites for Linux,

and then asking you for some necessary information you'll need from your ISP. With

that information, you'll create a set of customized scripts you can use to start or stop

your connection. You'll also learn about some handy utilities you can use to diagnose

your connection, and some other programs you can use to monitor your sessions.

</P>



<H3><A NAME="ch10_ 4">

Hardware You'll Need

</A></H3>



<P>You probably already have all the hardware you need: a modem, a modem cable if

your modem is external, and a phone line. But there are other considerations, such as your

serial port or modem speed.

</P>



<P>One great thing about Linux is that it runs well, even on older computers.

Although graphics-intensive applications such as X can tax the capabilities of older, slower PCs,

you don't need X, a fancy display monitor, or a 16MB VRAM accelerated 3D video card

to use PPP. You will, however, need a serial card to support First-In-First-Out

serial buffering.

</P>



<P>If you can use your modem under Linux to dial out and connect by using

the minicom program or C-Kermit, chances are you won't have any problems. If you're using a PC

Card modem, and the cardmgr PCMCIA device manager recognizes and initializes your

modem, you should be OK. One way to check is to use

the dmesg program, which displays the file <BR>

/var/log/dmesg created when you start Linux. Run the

dmesg program (piped through the less command), and look for lines in the output similar to the following:

</P>



<!-- CODE //-->

<PRE>

# dmesg | less

....

tty00 at 0x03f8 (irq = 4) is a 16550A

tty01 at 0x02f8 (irq = 5) is a 16550A

tty03 at 0x02e8 (irq = 3) is a 16550A

....

</PRE>

<!-- END CODE //-->



<P>Another consideration is your modem's speed. Some of you may remember when

2400 or 9600-baud modems were the greatest innovation since touch-tone dialing. If you're

still using a 9600 or 14.4 modem, and refuse to upgrade to the newer 56K modems until

the industry protocols shake out and model prices drop to $25, you can still

connect to the Internet with PPP, as your modem will

autosynchronize with the newer models lodged in your ISP's modem bank.

</P>



<P>If you want to listen to radio stations, watch live video, or upgrade your Red Hat Linux 

system through your phone connection, you'll want the fastest modem you can

afford. Although I don't advocate that you try to get any work done through a 1200 or

(shudder) 300-baud connection (which borders on masochism, but can be done, as ATM

machines prove), you can use email, FTP, and text-only Web browsing at 9600 speeds.

</P>





<A NAME="PAGENUM-163"><P>Page 163</P></A>







<P>It's up to you&#151;besides, isn't freedom of choice what Linux is all about?

</P>



<H3><A NAME="ch10_ 5">

Linux Software You'll Need

</A></H3>



<P>To set up your PPP connection, you need to make sure that your Linux kernel

supports PPP. You may have PPP support compiled into the kernel or loaded as a module when

you start Linux. One way to check to see whether PPP support exists on your system is to

again use dmesg:

</P>



<!-- CODE //-->

<PRE>

# dmesg | less

...

PPP: version 2.2.0 (dynamic channel allocation)

TCP compression code copyright 1989 Regents of the University of California

PPP Dynamic channel allocation code copyright 1995 Caldera, Inc.

PPP line discipline registered.

...

</PRE>

<!-- END CODE //-->



<P>

You should see similar lines. If you don't, you must recompile the kernel with built-in

PPP support, or build the PPP module and use the

insmod command to load the driver. You'll also need networking support enabled, especially TCP/IP.



</P>



<P>

Another piece of software you'll need is the

chat program, found under the /usr/sbin directory, and part of

the pppd daemon software package. The chat program is used during the

dialing process to dial out and connect to your ISP's modem. Along with

chat, you need the pppd daemon, also installed in the

/usr/sbin/ directory. If pppd is installed, you should find a

ppp directory under the /etc directory containing some or all of the following files:

</P>



<!-- CODE //-->

<PRE>

# ls /etc/ppp

chap-secrets     options          ppp-on-dialer

connect-errors   pap-secrets      ppp-on

ip-up            ppp-off



</PRE>

<!-- END CODE //-->



<P>If you don't see the ppp-on or ppp-on-dialer files, you can copy them from the

/usr/doc/ppp-2.2.0f-3/scripts directory.

</P>



<P>The setup you'll learn during this hour will require you to make changes to the

ppp-on file, which is an executable script. Next, you may want to check to see if the file

resolv.conf exists under the /etc directory. If it doesn't, don't worry, because it's a short file containing

one or two lines.

</P>



<P>Finally, you may want to see if you have the

ifconfig, minicom, netstat, ping, or route

commands on your system. You'll use these later to run some tests on your connection.

</P>



<H3><A NAME="ch10_ 6">

Information You'll Need from Your ISP

</A></H3>



<P>To connect to the Internet by using PPP through your ISP, you should first, obviously,

have a PPP account. When you sign up for your service, your ISP account representative

will most likely assume that you want a setup and software for a Windows or Macintosh

system.

</P>





<P><CENTER>

<a href="../ch09/0157-0160.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0164-0166.html">Next</A>

</CENTER></P>











</td>
</tr>
</table>

<!-- begin footer information -->









</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -