| ||||||||||
Dialing Up with GNU/LinuxIntroductionGNU/Linux is a collection of operating systems that have become a popular alternative to Windows in recent years. Unlike Windows, GNU/Linux is available for free with sourcecode. In testing this document, Red Hat Linux 7.0 and Slackware 8.0 were used to set up the connection. Best results from this document are to be gained from Red Hat Linux 7.x or above, or Slackware Linux 8.x or above. Hopefully the directions in here will carry over very well to other Linux flavors. DisclaimerMegapipe presently offers no official technical support for operating systems other than Windows and Macintosh. These directions may help you, but any damage you do to your Linux filesystem is yours to repair. These directions come with no warrenty, express nor implied. Background InformationIn preparing these directions, the dialer configuration tools in GNOME and KDE were not used. These directions are designed to allow you to use your terminal to set up a dial-up connection using GNU's pppd, which comes standard with many versions of UNIX. If you feel you know your system well, have experience in GNU/Linux, or are at least confident your modem is functioning properly with GNU/Linux, you may be able to skip straight to the configuration. Red Hat Linux 7.0 and Slackware Linux 8.0 were the distributions these directions were tested with and are used only as examples. These directions should carry over to other Linux distributions, but it is the user's responsibility to fill in any gaps. Other popular Linux distributions include Debian GNU/Linux and SuSE Linux. Problems may arise if you're using an older version of pppd available with an older Linux distribution. It may be best to upgrade if you're using a version of Linux predating the year 2001. Notes on Style
What You Need to KnowThe aim of this document is to help you set up a dial-up connection using a modem and standard phoneline. Because of the lack of support available for Linux at present (December 2002), there are many details you will likely need to know about your system that couldn't possibly be covered in one short document. This document will not help you configure DSL, ISDN, or Centrex. This document requires you to know/do at least the following:
Comments. It would also help to know that anything coming after a hash mark (#) in the scripts and
configuration files mentioned below is just a comment. For instance, if the
line If you need additional help, you should look at the documentation made available on Linux.org. If you bought a commercial GNU/Linux distribution, you may be entitled to technical support. Sadly, making GNU/Linux work on some computers requires buying additional hardware. Tips on Possible PitfallsDialing in with GNU/Linux is not too difficult. The most difficult factor in dialing in with GNU/Linux often is configuring your hardware properly. Red Hat Linux is known to configure very easily because it can detect most hardware during installation or when rebooting. In fact, most distributions of Linux have made great strides in detecting hardware. First, here are some things to look out. Be very attentive about the following, especially if you don't know what kind of modem you have.
Network Configuration Filesdomain megapipe.net nameserver 208.195.115.14 #primary Megapipe nameserver nameserver 208.244.242.2 #secondary Megapipe nameserver The Dial-Up ScriptNow, you need to create the dial-up, which is the script that tells the modem to dial in. This script should work with any generic modem. We're going to assume the phone number you're dialing into is is (703) 779-1000. The hypothetical login name we're going to use is mjohnson and the password is goldfish. You will need to change the login, password, phone number, and modem path accordingly. /dev/modem is used below and will work assuming you have the modem device properly linked to this path. If your modem's path is not linked to /dev/modem, simply supply the correct path (for example, /dev/ttyS0). If you don't know that path, you may need to do some searching (try /dev/ttyS0, /dev/ttyS1, /dev/ttyS3, and /dev/ttyS4). The script looks like this: #!/bin/sh pppd connect \ 'chat -v "" ATDT7037791000 CONNECT "" ogin: mjohnson word: goldfish' \ /dev/modem \ 38400 \ debug \ crtscts \ defaultroute \ 0.0.0.0:0.0.0.0 Just copy the script above into your favorite text editor and make the necessary changes. Save the file as /etc/ppp/ppp-on and then make it executable. Type "cd /etc/ppp" and hit enter. Then type "chmod +x ppp-on" and hit enter again. What does all this mean and why the strange characters?
Now just type "./ppp-on" and hit enter. Assuming your kernel, hardware, configuration files, and modem are set up correctly, your modem should now start dialing. Testing your ConnectionNow, your modem should have dialed in. If your modem speaker is turned up, you should have heard the modem making noise, as it would in any other operating system. Now, to test the connection, try pinging a machine on the Internet: type ping netgate.anent.com and hit Enter. You should see something that looks like this: 64 bytes from 63.65.99.2: icmp_seq=0 ttl=122 time=15.283 ms 64 bytes from 63.65.99.2: icmp_seq=1 ttl=122 time=16.891 ms 64 bytes from 63.65.99.2: icmp_seq=2 ttl=122 time=20.187 ms 64 bytes from 63.65.99.2: icmp_seq=3 ttl=122 time=11.617 ms 64 bytes from 63.65.99.2: icmp_seq=4 ttl=122 time=12.714 ms If you get that response, you should be good to go. Otherwise, you may need to review your connection scripts to make sure you didn't make any typographical errors. Shutting Down Your PPP ConnectionThe script below will allow you to shut down your PPP connection. Copy the script below to a file named ppp-off and set that file to be executable (chmod +x ppp-off). (The script was taken from the official Linux PPP-Howto.) #!/bin/sh ###################################################################### # # Determine the device to be terminated. # if [ "$1" = "" ]; then DEVICE=ppp0 else DEVICE=$1 fi ###################################################################### # # If the ppp0 pid file is present then the program is running. Stop it. if [ -r /var/run/$DEVICE.pid ]; then kill -INT `cat /var/run/$DEVICE.pid` # # If the kill did not work then there is no process running for this # pid. It may also mean that the lock file will be left. You may wish # to delete the lock file at the same time. if [ ! "$?" = "0" ]; then rm -f /var/run/$DEVICE.pid echo "ERROR: Removed stale pid file" exit 1 fi # # Success. Let pppd clean up its own junk. echo "PPP link to $DEVICE terminated." exit 0 fi # # The ppp process is not running for ppp0 echo "ERROR: PPP link is not active on $DEVICE" exit 1 |