Configuring Dial-Up Internet Access


Most ISPs provide dial-up connections supporting PPP because it is a fast and efficient protocol for using TCP/IP over serial lines. PPP is designed for two-way networking; TCP/IP provides the transport protocol for data. One hurdle faced by new Fedora users is how to set up PPP and connect to the Internet. It is not necessary to understand the details of the PPP protocol in order to use it, and setting up a PPP connection is easy. You can configure the PPP connections manually using the command line or graphically during an X session using Fedora's Internet Configuration Wizard. Each approach produces the same results.

PPP uses several components on your system. The first is a daemon called pppd, which controls the use of PPP. The second is a driver called the high-level data link control (HDLC), which controls the flow of information between two machines. A third component of PPP is a routine called chat that dials the other end of the connection for you when you want it to. Although PPP has many tunable parameters, the default settings work well for most people.

Note

You can check to see whether PPP is installed on your system by running the pppd command as root from a command line with the --help argument, like this:

# pppd --help


That will list the current version number and describe a few available options if PPP is installed. If PPP isn't installed on your system, use the rpm command to install the PPP package from the Fedora DVD or use the Packages menu item from the System Settings menu. Chapter 7 covers the details of using rpm and the graphical package manager.


Configuring a Dial-Up Connection Manually

The first step in manually configuring PPP is to log in as root to copy and edit the necessary files. After you are logged in, you use the chat command, the pppd daemon, and several files to configure PPP:

/etc/ppp/ppp-on Used to start a PPP connection. This file contains the ISP's phone number, your username and password, as well as various options such as IP address options, the modem device, and its settings (such as baud rate) for the connection.

/etc/ppp/ppp-off Used to terminate a PPP connection.

/etc/ppp/ppp-on-dialer Used to perform dialing and connection with the chat command; this script contains error-handling and negotiation responses between the remote system and the chat command script.

Caution

Many software modems will not work with Linux because the manufacturers won't release programming information about them or provide Linux drivers. An external serial port modem or ISA bus modem will almost always work; USB and PCI modems are still problematic. It is suggested that you do a thorough Google search using your modem's name and model number to see how others have solved problems with that particular modem. Links to software modem compatibility sites appear at the end of this chapter.


Begin by copying the scripts from the /usr/share/doc/ppp*/scripts directory to the /etc/ppp directory, like so:

# cp -ar /usr/share/doc/ppp*/scripts/ppp-o* /etc/ppp


Using your favorite text editor, edit the ppp-on file (making sure to disable the line wrapping function in your editorthat varies from editor to editorand line-wrapping inserts carriage returns that cause these scripts to stop working) and change the first four entries to reflect your ISP's phone number and your username and password, like this:

TELEPHONE=555-1212      # The telephone number for the connection ACCOUNT=hudzilla          # The account name for logon PASSWORD=spasm         # The password for this account LOCAL_IP=0.0.0.0        # Local IP address if known. Dynamic = 0.0.0.0


Change the values for TELEPHONE, ACCOUNT, and PASSWORD, substituting your ISP's phone number and your username and password. Change the LOCAL_IP enTRy to an IP address only if your ISP provides one for use. (Dynamic IPs are typical of dial-up accounts.) Otherwise, leave the entry blank. Next, scroll through the script until you find the dialing setup, which can look like this:

exec /usr/sbin/pppd debug lock modem crtscts /dev/ttyS0 38400 \         asyncmap 20A0000 escape FF kdebug 0 $LOCAL_IP:$REMOTE_IP \         noipdefault netmask $NETMASK defaultroute connect $DIALER_SCRIPT


These lines (actually a single script line) contain modem options for the chat script used in the ppp-on-dialer script and will start the pppd daemon on your computer after establishing a connection. Using a text editor, change the modem device (/dev/ttyS0 in this example) to /dev/modem.

Caution

You can use /dev/modem only if Fedora's kudzu utility has recognized and configured the computer's modem. (If /dev/modem does not exist, use the ln command to create the file as a symbolic link pointing to the correct serial port.) To create the symlink (from /dev/ttyS2, for example):

# ln -s /dev/ttyS2 /dev/modem


If your modem was not automatically detected and the /dev/modem link configured, it is possible that you have a software modem, also known as a Winmodem or HSF modem (refer to the earlier note).


Set the baud rate (38400 in the default case) to the desired connection speedmost likely 115200 or 57600. When finished, save the file.

Next, use the chmod command to make these scripts executable, like this:

# chmod +x /etc/ppp/ppp-o*


To debug or check the progress of your modem connection, dialing, and connection to your ISP, monitor the syslog messages by using the tail command with its -f "loop forever" option, like this:

# /sbin/tail -f /var/log/messages


To connect to your ISP, run the ppp- script:

# /etc/ppp/ppp-on


Use the ppp-off script to stop the PPP connection like so:

# /etc/ppp/ppp-off


You can also move the ppp-on and ppp-off scripts to a recognized $PATH, such as /usr/local/bin. Enabling use of these scripts by normal users will entail changing permissions of the serial port and other files (which can be a security problem because unauthorized users can access it).

Tip

If your modem is installed and working, you can access it using a terminal program such as minicom, which usually is not installed by default. After you install it from the .rpm file or from source code, start it the very first time with the -s argument to configure it:

$ minicom -s


Set the serial port to that of your modem, and then save the configuration. You can then use minicom to communicate with your modem using the AT command set and see its responses.

If you do not want to go to that trouble, you can use the echo command to send commands to the modem, but the modem won't be capable of responding to you. For example, the AT&W command can be sent as follows:

# echo "AT&W" > /dev/modem



Using the Fedora Internet Configuration Wizard

The Fedora Modem Configuration Wizard can be used to set up the many kinds of network connection types that exist. Fedora provides wizards for the following connections:

IPSec (VPN) connection (Virtual Private Network using Crypto IP Encapsulation)

Ethernet connection

ISDN connection

Modem connection

Token ring connection

Wireless connection

xDSL connection

The example provided here uses the wizard to configure a modem connectionthe most commonly encountered home network connection. The other types are configured in essentially the same manner.

From the System menu, select the Administration sub-menu and click Network to open up the Network configuration tool. Enter the root password to gain access to the tool and click New in the toolbar to start the wizard. Select Modem Connection from the list of options, shown in Figure 18.4 and click Forward.

Figure 18.4. The Network Configuration tool can be used to quickly and easily configure many different kinds of Internet connections.


Select Modem Connection in the Device Type list, and then click the Forward button. You are then asked to select a provider, designate a name for the service, enter your ISP's phone number, and enter your username and password on the remote system, as shown in Figure 18.5. A dialing prefix (to disable call waiting, for example) can be added in the Prefix field. Additional special settings are also included for PPP users in various countries with different ISPs, as shown by the country flags on the left.

Figure 18.5. Enter a name for your ISP's service, along with the telephone number, username, and password for the service.


Enter the telephone number of your ISP's remote computer's modem. Enter a country code if needed, along with an area code and telephone number. Note that some areas require a 10-digit number for local telephone service. When finished, click the Forward button. You'll then be able to confirm the settings. Click the Finish button to create the interface. When you are done, you will see a new ppp0 enTRy in the Network Configuration window, as shown in Figure 18.6.

Figure 18.6. Your new PPP dial-up connection appears in the Network Configuration dialog, which also shows the status of the connection.


To edit the new connection identified as ppp0, select the interface, and then click the Edit button. A configuration dialog appears as shown in Figure 18.7 Each tab presents an easy-to-use interface for setting dial-up options.

Figure 18.7. Here you can edit the dial-up configuration if necessary to set IP addresses and other custom values; the defaults work for most people.


This window can be reached later from the System Settings menu as the Network menu item. Fedora also provides a simple control interface via the System Tools menu as the Network Device Control menu item, as shown in Figure 18.8.

Figure 18.8. The Network Device Control allows you to start and stop a network interface.


Launch a PPP connection by selecting the ppp0 interface and then clicking the Activate button.

You can also use the ifup command manually (only as root) to bring up the connection like this:

# /sbin/ifup ppp0


To close the connection manually, use ifdown:

# /sbin/ifdown ppp0


If you named the dial-up connection something other than ppp0, use that name instead. Because we named ours Cavtel, we can bring it up manually with

# /sbin/ifup Cavtel




Red Hat Fedora 5 Unleashed
Red Hat Fedora 5 Unleashed
ISBN: 067232847X
EAN: 2147483647
Year: 2004
Pages: 362

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net