Linux Help

PPP Setup Guide   
Printable Version

Janou's Red Hat Linux PPP setup  HOWTO
v1.00, 16 May 1999

For this document to work on your system you need to have PPP support in your kernel and have your modem installed on a serial port with a symbolic link from the serial port to /dev/modem. If you are unsure of the above information,
please refer to the Linux HOWTOs for detailed setup instructions.

The basic networking information files you need to edit are located in your /etc directory.

* /etc/hosts
* /etc/host.conf
* /etc/resolv.conf
* /etc/hosts.deny
* /etc/hosts.allow
* /etc/ppp/options

Modify your /etc/hosts file so that it resembles the following:

127.0.0.1 localhost.localdomain    localhost
0.0.0.0     UserID.your.ISP.com

Your IP address is dynamic, so you must set it to 0.0.0.0. For the mnemonic address, replace UserID in the example above with your User ID. Setting the name here will not make your machine known to the world as "UserID".your.ISP.com, but it doesn't hurt to use it.

Modify your /etc/host.conf (if necessary) to the following:

order hosts,bind
multi on

Modify /etc/resolv.conf to include your ISP's DNS servers:

search domain.com
nameserver 207.69.188.185
nameserver 207.69.188.186

Replace domain with your ISP's as per your account and the IP addresses with your ISPs address(es)

Add the following line to your /etc/hosts.deny file:

ALL: ALL

Add the following line to your /etc/hosts.allow file:

ALL: 127.0.0.1

Add the following to your /etc/ppp/options file (if it doesn't exist, then create one):

#----/etc/ppp/options----
#
defaultroute /dev/modem 57600
netmask 255.255.255.0
mtu 1500
connect "/usr/sbin/chat -v ABORT BUSY ABORT 'NO CARRIER' ' '
ATS11=40 OK ATDTphoneno ogin msXXXXX word PASSWORD"
#
#------------------------

You will need to make a few changes to this file. The first one being the DTE speed, which is currently set to 57600. DTE is the speed between your computer and modem. The following should be followed :

14.4 Modem : 19200
28.8 Modem : 38400 or 57600
33.6 Modem : 38400 or 57600
56K Modem : 57600 or 115200

The next variable you will need to take a look at is the init string.  The init string in this case is ATS11=40, which is a basic init string. Use the init string recommended by your modem manufacturer.

The telephone number you dial to access your ISP is the next thing we need to take a look at. Directly after the 'ATDT', replace phoneno with your access number. (Example: ATDT7177703500 or ATDT*70,7177703500 to disable call waiting)

 Now you are ready to enter your login and password. After 'ogin', enter your User ID. Your password will go after 'word'.
(Example: ogin ms92234 word zm234bb) Make sure to include the quotes (" ") in the connect line. This text must also appear on the same line. If you are using pico, it will wrap around.

connect "/usr/sbin/chat -v ABORT BUSY ABORT 'NO CARRIER' ' '
ATS11=40 OK ATDTphoneno ogin msXXXXX word PASSWORD"

That's all of the file modifications. Now, we need to set up your modem. as root in a console, type:

ln -s /dev/cuaX /dev/modem

The "X" is the com port # that the modem will be assigned to. Be advised that cuaX is used in kernels 2.0.36-x and 2.1.x. For 2.2.x kernels, you should make a symbolic link to /dev/modem using "ttySx" where the "x" is the com port #.

After the symlink is made, you need to set the serial port parameters:

setserial /dev/modem auto_irq skip_test autoconfig

The above line sets up your modem through "probing" for the irq and other settings.
 

Now, you need to setup ppp0. as root, open linuxconf (type --> linuxconf at the console). Goto Newtork --> PPP/SLIP/PLIP and click the "add" button. This will add ppp0 meaning  the first dialup connection.

Now, choose "hardware and as the modem port, choose /dev/modem. Then go to the communications tab and enter the modem init string-- it should have ATZ in there, but I use ATS11=40 because it dials much faster and it is a factory standard. make sure that "debug connection" is enabled and enter the dialup number. Now, it's time to enter the "send/Expect parameters. >From the first Expect variable, type:

Expect: ogin:
Send: your login name
Expect: ord:
Send: your password
Expect: TIMEOUT
Send: 5
Expect: ~--

When done, click "OK" then accept all the changes. You have now set up PPP to dial out.

The last thing you need now is a script to dial if you do not wish to use the ppp0 activation and deactivation feature in netcfg. Download ppp-up and read Joey's guide on setting it up.

Once you set up the script, use it and if all goes well, you should be able to dial and connect to the Internet through your ISP.

If you need to debug your connection, type:

tail -f /var/log/messages

then run the ppp script. You should see something similar to the lines below:

------BOF------
May 13 14:58:14 acres-homes pppd[83]: pppd 2.2.0 started by root, uid 0
May 13 14:58:16 acres-homes chat[84]: abort on (BUSY)
May 13 14:58:16 acres-homes chat[84]: abort on (NO CARRIER)
May 13 14:58:16 acres-homes chat[84]: send (ATS11=40^M)
May 13 14:58:16 acres-homes chat[84]: expect (OK)
May 13 14:58:16 acres-homes chat[84]: ATS11=40^M^M
May 13 14:58:16 acres-homes chat[84]: OK -- got it
May 13 14:58:16 acres-homes chat[84]: send (ATDT7703500^M)
May 13 14:58:16 acres-homes chat[84]: expect (ogin)
May 13 14:58:16 acres-homes chat[84]: ^M
May 13 14:58:32 acres-homes chat[84]: ATDT7703500^M^M
May 13 14:58:32 acres-homes chat[84]: CONNECT 33600/ARQ/V34/LAPM/V42BIS^M
May 13 14:58:34 acres-homes chat[84]: your ISP Dialup Service^M
May 13 14:58:34 acres-homes chat[84]: ^M
May 13 14:58:34 acres-homes chat[84]: netserv-3.hbg (s17) login -- got it
May 13 14:58:34 acres-homes chat[84]: send (ms123456^M)
May 13 14:58:34 acres-homes chat[84]: expect (word)
May 13 14:58:35 acres-homes chat[84]: : ms123456^M
May 13 14:58:35 acres-homes chat[84]: Password -- got it
May 13 14:58:35 acres-homes chat[84]: send (testing1^M)
May 13 14:58:35 acres-homes pppd[83]: Serial connection established.
May 13 14:58:36 acres-homes pppd[83]: Using interface ppp0
May 13 14:58:36 acres-homes pppd[83]: Connect: ppp0 <--> /dev/modem
May 13 14:58:39 acres-homes pppd[83]: local IP address 207.69.148.145
May 13 14:58:39 acres-homes pppd[83]: remote IP address 168.121.1.1
------EOF------

SirPlaya
05/16/99 - Revised for #LinuxHelp.net
 


Having trouble? Got questions? Require further assistance? If so please feel free to visit our Help Forums and ask the experts!


Copyright © 1997 - 2008 Private World Domination Inc. All rights reserved.
Linux is a registered trademark of Linus Torvalds. All other trademarks and copyrights are the property of their respective owners.
| Contact Us | Link to Us | RSS Feed | Staff |

DNS Hosting by easyDNS