1. Connecting to the Internet via Your ISP

Introduction

The majority of home internet connections, as well as many small office/home office internet connections, are still established via Internet Service Provider (ISP) accounts, using dial-up modems over standard telephone lines.

OpenLinux has made the configuration of these accounts much more automated than before, and in fact many users will be able to successfully configure their ISP connections during installation. However, there are three circumstances in which users may have to manually configure their ISP connections:

This chapter covers:

Quickstart

If you successfully configured your modem and ISP during installation, you can use this easy method to immediately connect.

Within KDE, click on the start button, and follow this path: Internet|Kppp.

Kppp (See Kppp, or ksaferppp, the Internet Dial-up Tool), is the Internet dial-up tool.

 

Kppp, or ksaferppp, the Internet Dial-up Tool

Enter your login name, your password, and click the Connect button to initiate the connection process. A connection message (See A Successful Connection Message) will show you if the connection was successful.

 

A Successful Connection Message

By clicking the Show Stats button the Kppp Statistics window will open, showing you every detail of your connection (See The Kppp Statistics Window).

 

The Kppp Statistics Window

If, however, the connection did not work, then you will have to do some troubleshooting. The procedures for this are identical to those for setting up a new ISP connection, and begin with making sure that your modem has been correctly detected and configured.

 

Modem Detection and Configuration

The first step to configuring a dial-up modem Internet connection, is configuring the modem. Most of the time, the installation routine should do this automatically. However, if for some reason it fails, or if you install a new modem, you may have to configure the modem yourself.

Modems and Linux Compatibility Issues

Unfortunately not all modems on the market will work in Linux. To be more exact, many `PCI Modems' will not work, due to the interface being poorly supported at this time. And the so-called `winmodems' will generally not work. A winmodem is a modem stripped of much of its normal hardware, and which as a result depends on special emulation software in the Microsoft Windows operating system. Since this software is Windows-specific, such a modem will generally not work in Linux.

You can try to find out if your modem, or the modem you are thinking of buying, will work in Linux, by locating it in the Linux/Modem Compatibility Knowledge Base, found on the Web at:

www.o2.net/~gromitkc/winmodem.html.

External modems and PCMCIA modems are most likely to work in OpenLinux.

Configuring Modems in COAS using the Setup Modem Tool

From within KDE, click the Start button, and follow this path: Settings|COAS|Peripherals|Modem.

The Setup Modem tool (See The Setup Modem Tool), is normally seen first during the installation process, if for some reason the installation program cannot automatically detect the modem. If the modem is detected, this screen is bypassed.

This tool can be used to both troubleshoot a modem, and also to configure one installed after OpenLinux. The first four settings, Model, Device, Speed and Flowcontrol, all have drop-down menus, making it easy to change the configuration.

 

The Setup Modem Tool
  • Model. Check the model in the box for accuracy. If it's not correct, change the selection. If your exact model can't be found, then choose a generic model.
  • Device. For OpenLinux to correctly detect your modem, the operating system must be looking at the port (in Linux called the device), your modem is connected to. This can sometimes be misconfigured, but can be reconfigured simply by typing in another device number. Users coming from Windows may be confused at Linux's naming scheme. Table 8-1 shows Windows/Linux nomenclature and their correlation:

 

 

Windows

OpenLinux

COM1

/dev/ttyS0

COM2

/dev/ttyS1

COM3

/dev/ttyS2

COM4

/dev/ttyS3

 

  • Speed. Nearly all modems sold within the last few years have been 56K modems, but this can be adjusted down for older models.
  • Flowcontrol. This is generally hardware.
  • The Command and Initiation Strings should all be automatically set correctly to the modem you choose. However, if you still encounter problems, check the command strings in your modem documentation (or, increasingly, your modem manufacturer's Web-site).

Troubleshooting Modems Using Minicom

There may be times when it is difficult to establish if a problem exists in an automatically generated modem script, in the modem connection, or in the modem itself. Minicom is a communications program that you can use to double-check whether or not the computer actually is able to communicate in some way with the modem.

 

NOTE: Minicom may not be installed on your system. If it is not, follow this procedure:

 

Insert your OpenLinux Installation CD and mount the CD-ROM.

  1. From the Main Menu in KDE, choose System|kpackage.
  2. Click File, Open, and navigate to cdrom|Packages|RPMS.
  3. Find minicom, select it, and install.

Once Minicom is installed, at a terminal, type:

minicom

and press Enter. The Minicom welcome screen will come up (See The Minicom Welcome Screen).

 

The Minicom Welcome Screen

If the Minicom program is communicating with your modem properly, you should see an OK along the screen's left hand side. To make sure, type:

at

and press Enter. Another OK should appear. If this happens, then the modem port that Minicom is using is communicating correctly with the modem. To check which port the program is reading, press Ctrl + a, then z. The Minicom Command Summary window will come up. Press o for cOnfigure. The configuration menu should appear. Use your down arrow key to highlight Serial Port Setup, and press Enter.

The screen should look something like See Changing the Serial Device (Modem) Setting. Notice the first line:

Serial Device : /dev/ttyS1

This indicates that Minicom is looking at ttyS1 for the modem. If it in fact is working, then you at least have confirmation of the correct device. If it is not, then you can try other ports, by typing the letter A, and then changing the device number.

 

Changing the Serial Device (Modem) Setting

 

Configuring Dial-Up Networking With COAS

Once you have your modem correctly configured, the next step is to setup your ISP account in OpenLinux. To do this, you first need some configuration information from your current Internet Service Provider. You should know:

You can obtain this information from at least three sources: documentation provided you by your ISP; your ISP's own Internet setup program; or from Windows' Dial-Up Network. If your ISP is listed in the COAS ISP database, then the telephone number may be provided for you.

Obtaining ISP Configuration Information from Windows

From the desktop, double-click on the My Computer icon, and from within that, double-click the Dial-Up Networking icon. Position your mouse over the icon with your ISP's name, and use the right mouse button to open the menu. Choose `Properties'.

Click the Server Types tab, and then the TCP/IP Settings button (See Server Types, Showing the TCP/IP Settings Button).

 

Server Types, Showing the TCP/IP Settings Button

The resulting TCP/IP Settings window (See Primary and Secondary DNS IP Addresses), reveals the DNS IP addresses you need. In this typical example, there are two, a primary and a secondary (Table 8-2).

 

 

 

Primary DNS

165.87.201.244

Secondary DNS

165.87.194.244

 

 

Primary and Secondary DNS IP Addresses

Exiting from the TCP/IP window, and double-clicking on the ISP icon in the Dial-Up Networking window, should give you both your user name, and the telephone number to connect (See User Name and Telephone Number). Note that the user name may be very similar to your own name, or have no connection whatever. The password entry will be replaced with asterisks for security.

 

User Name and Telephone Number

Setting Up an ISP Account Using COAS

This utility offers a simple and clear graphical procedure to setup your ISP account.

From the Main Menu, follow this path: Settings|COAS|Network|Internet Provider. The Setup Internet Provider screen comes up (See The Setup Internet Provider Tool).

The user may select their ISP from the upper window, and then the Details button beneath the window. If your ISP is not listed, select the User Defined choice, and then click the Details button. The Provider Info screen, See The Provider Info Window will appear.

NOTE: When connecting to an ISP using the OpenLinux eDesktop ISP setup utility , it is important to understand that the local access phone numbers provided can be changed without notice by the ISP. If the number you selected has been changed, you may either select another local access number or use the supplied ISP 800 or 888 number to get access to the Internet and then find on the ISP web site the new local access number.

It is important to note that US-based ISPs will charge you for accessing the Internet anywhere from $.10 to $ .15 per minute while using their 800 or 888 access numbers. US-based ISPs will not charge you for using the local access numbers listed.

 

The Setup Internet Provider Tool

 

The Provider Info Window

The Name box is simply a convenient label for your ISP. The phone number is the local phone number you use to connect. In all cases, you will have to fill in yourself the primary and secondary DNS Servers--the same information found in See Primary and Secondary DNS IP Addresses above.

When you are finished with the provider information, make sure to enter your login name in the space provided, along with your password, and then check the Save Authentication Information box.

Please note that saving the authentication information will allow all users of your machine to dial out at will.

At this point you can attempt to log in to your ISP, using the Kppp tool--see Quick Start at the beginning of this chapter.

Configuring the Resolver

A final point is checking the configuration of the DNS Resolver, located, from the Main Menu, at: Settings|COAS|Network|TCP/IP|Resolver.

The Name Resolver Setup window (See Name Resolver Setup Window), is responsible for setting up the resolv.conf file, which is necessary for Netscape Navigator and other programs to run correctly.

 

Name Resolver Setup Window

The resolv.conf file will normally be configured automatically, but to make sure, check that the IP addresses in the DNS Servers line match those you have already entered. If they do not, click on the address button, and use the Edit menu to add or edit the addresses as required.

Connecting to the Internet Manually

The new KDE Internet tools should work for almost everyone. However, if for some reason they do not, it is a relatively simple matter to configure Internet access manually.

Traditionally, dial-up internet accounts have been accessed from Linux by manually editing several configuration files and Internet connection scripts.

Internet capability, and networking capability in general, is built-in to Linux--it is an inherent part of the operating system. There are several files which configure PPP connections, and most of them interact intimately with each other. As a result, there are many different combinations of files, file entries, and commands, that will all perform well the same job: establishing an Internet connection.

The following directions work well--but are only one method among many.

Setting Up a Script-Based PPP Connection

Using this method, there are five files which need to be written. They are:

/etc/resolv.conf

/etc/ppp/pap-secrets

/etc/ppp/options

/usr/sbin/ppp-on

/usr/sbin/ppp-off

The first file contains the addresses of your nameservers. The second provides the necessary information for PAP authentication. The third, options, provides both login information and also certain hardware information about your modem. The fourth and fifth are scripts which provide dial-up and disconnect instructions.

 

NOTE: The following scripts will work in most cases where the ISP uses the PPP protocol and PAP authentication. These are the standards today. However, some ISPs still use different protocols--some use SLIP instead of PPP, and some use other methods of authentication than PAP. If this is the case, you will have to obtain connection scripts directly from your Internet Service Provider.

This is not the problem it used to be: more and more ISPs, large and small, are providing support for the Linux operating system. A significant percentage of them use Linux themselves, for their own servers.

Script files can be written at a console, using the vi or other editors, or within KDE, using an X Windows editor. A good KDE editor is KEdit, listed in the Editors sub-menu under the simple name, `Text Editor'.

The resolv.conf File

 

NOTE: This file can be configured graphically, as shown above under `Configuring the Resolver'. Instructions for manually writing or editing it are also included below.

 

  1. From within KDE, open the Text Editor.

The Text Editor is similar to any standard Windows or X Windows wordprocessor. Basic open, save, cut and paste operations can be activated via the Menu Bar or the Tool Bar. Text editing is performed using standard procedures.

  1. Find the resolv.conf file by clicking the Open icon on the Tool Bar, then on the `etc' folder.
  2. Open the resolv.conf file by double-clicking. Your screen should resemble See The Resolv.conf File, Opened in the Text Editor.

A cautionary line at the bottom of the file warns the user not to manually edit it. Ignore the warning, and scroll down to the end of the file.

In a script file such as this, a number sign--known in Linux/UNIX as the `hash' symbol (#) --at the beginning of a line, indicates a remark, or comment. In other words, that line is not scanned when the script is read.

At the end of the file, delete any entries below the warning message, and type in your ISP's domain name, and below that its DNS addresses. An example is:

 

domain attglobal.net

nameserver 165.87.194.244

nameserver 165.87.201.244

 

 

The Resolv.conf File, Opened in the Text Editor

A close-up of the end of the resolv.conf file, in this example, would resemble See The End of the New Resolv.conf File.

 

The End of the New Resolv.conf File
  1. Save the file by clicking the Save icon on the Tool Bar.

The Pap-Secrets File

Use the Text Editor to open the /etc/ppp/pap-secrets file.

This is the file that handles authentication. It's contents may differ slightly from one ISP to another, but generally the file takes the form of:

"User Name or ID" * "Password"

In this example, your entry (the illustration includes the Title, Menu and Tool Bars of the Text Editor), would resemble See The Pap-Secrets File.

 

The Pap-Secrets File

 

Save the file by clicking the Save icon on the Tool Bar.

  1. Make the pap-secrets file secure by entering this command at any terminal:

 

chmod 600 /etc/ppp/pap-secrets

The Options File

 

Use the Text Editor to open the /etc/ppp/options file.

Like the pap-secrets file, the contents of the options file may differ somewhat from ISP to ISP. However, for most ISPs the entries below will establish a good connection:

 

[your port speed]

name [your account name or user ID, or sometimes a combination of both]

noauth

defaultroute

noipdefault

 

For a 56K modem, use 115200 for the port speed. An example of this file is shown in See The Options File.

 

The Options File

 

The PPP-on File

The /usr/sbin ppp-on file initiates the pppd daemon (the program that handles your actual PPP Internet connection, while running in the background). It is just one line, but must be typed perfectly--there is no room for error.

Please note the new directory as well: /usr/sbin. The file should be identical to the example below, except perhaps for the /dev/ttyS1 line, and of course the telephone number. Enter the port, or device, that your own modem is connected to, and your ISP's telephone number after the atdt. Also note that the whole command, or file, is one line long.

 

pppd /dev/ttyS1 connect 'chat -v "" atdt5551212 "CONNECT"'

 

The PPP-off File

Use this file to kill your Internet connection. It also goes into /usr/sbin.

 

DEVICE=ppp0

if [ -r /var/run/$DEVICE.pid ]; then

kill -INT `cat /var/run/$DEVICE.pid`

fi

 

Note the small but important usages of the single quote-- ' -- the double quotations-- " -- and the grave --` -- in the two scripts above. Make absolutely sure when you create this file, that you enter the correct symbols and spaces. The slightest mistake can disable the process.

 

Connecting to the Internet with PPP-on

First, from any console, or within KDE from any virtual terminal, enter:

 

tail -f /var/log/messages

 

This will give you a running screen print out of messages related to your internet connection.

Second, from a different console, or from a different virtual terminal within KDE, enter:

 

ppp-on

 

and press the Enter key.

The first screen, running the tail command, should read something similar toSee Typical Connection Messages from Tail when your modem establishes a connection to your ISP.

 

Typical Connection Messages from Tail

At this point, you can surf the Web using Netscape, send or receive e-mail using Netscape Messenger or KMail, upload or download files using FTP, or administer a remote site via Telnet.

To end your Internet connection, simply enter

 

ppp-off

 

in any terminal.