Sonic.net

Services

Resources

Search

Google

Company

Sonic.net, Inc.
2260 Apollo Way
Santa Rosa, CA 95407

(707) 522-1000 Voice
(707) 547-2199 Fax
(707) 547-3400 Help

support@sonic.net

Partners


Akamai



HACKER SAFE certified sites prevent over 99.9% of hacker crime.

Generic chat+pppd Linux PPP Setup

With many distributions of Linux, the most universal way to set up PPP networking is with the chat(8) and pppd(8) utilities. Most commonly these utilities are distributed with Linux -- if not, they can be retrieved in source form from ftp://sunsite.unc.edu/pub/Linux/system/network/serial/ppp/.

RedHat 5.0 and 5.1 users should use the Redhat-specific instructions instead -- they are considerably easier and less likely to be adversely affected by subsequent distribution upgrades. These generic instructions are suitable for RedHat 4.2 and earlier.
To get PPP networking set up on your system, follow these steps. Note that it is assumed that you have the ppp package installed on your system. You will need to be root to perform most of these steps.
  1. Save the following somewhere in root's path, typically in /usr/local/sbin or /usr/sbin, as ppp-on. If you already have such a file, make a copy of it in a safe place before proceeding.

    /usr/sbin/ppp-on
    
    #!/bin/bash
    
    DEVICE=/dev/modem
    
    setserial $DEVICE spd_vhi
    (
    	stty tostop
    	if chat -v -f sonic.chat ; then
    		sleep 2
    		pppd $DEVICE 115200 defaultroute modem rtscts asyncmap 0
    	fi
    ) < $DEVICE > $DEVICE
    

  2. Open ppp-on (the file you just saved) into the editor of your choice (vi, joe, emacs, etc), make the following changes, as applicable for your system:

    If you have a modem slower than 28,800bps:
  3. Change the line 'setserial $DEVICE spd_vhi' to read 'setserial $DEVICE spd_hi'. This will instruct Linux to use a computer-to-modem speed of 57,600bps, the highest speed supported by most 14.4 modems. If you have a 9600bps modem or slower, change the line to read 'setserial $DEVICE spd_normal' instead.
  4. Change the '115200' in the line "pppd $DEVICE 115200..." to '57600' for 14,400bps modems, or '38400' for 9600bps modems.
    If you do not have a symlink /dev/modem to the apropriate modem device:
    Change the line 'DEVICE=/dev/modem' to reflect the apropriate device. Typically the device will be one of /dev/ttyS[0-3] or /dev/cua[0-3]. In general, you should have a symlink from the real device to /dev/modem. You should have been asked on which serial port Linux should look for your modem during setup. To check whether /dev/modem exists and where it points, use the command 'ls -l /dev/modem'.
  5. Save the file.

  6. Save the following into the same directory where you put ppp-on, under the filename sonic.chat:

    /usr/sbin/sonic.chat
    
    '' 'ATZ'
    'OK' 'AT V1 E1 L1 M1 S11=50 Q0'
    'OK' 'ATDT522-1001'
    'CONNECT' ''
    'ogin:' 'myname.ppp'
    'word: 'mypassword'
    

  7. Open sonic.chat (the file you just saved) into an editor. Make the following changes, as applicable for your system and Sonic account:

    Set your username and password:
    On the last two lines, change 'myname.ppp' to 'username.ppp', where username is your Sonic login name; change 'mypassword' to 'password', where password is your Sonic password. Make sure to keep the single-quotes intact.
    If you have an X2, v.90, K56flex, or other nonstandard analog modem:
    On the third line, change 'ATDT522-1001' to 'ATDTNNN-NNNN', where NNN-NNNN is the number you dial to reach the apropriate Sonic dialup. See the quick-reference sheet for the apropriate numbers for your area and modem type.
    If you have/require a specific modem inititialization string for your modem:
    On the second line, change 'AT V1 E1 L1 M1 S11=50 Q0' to the apropriate initialization string for your modem. The given string will work with all Hayes-compatible analog modems, but some modems require specific initialization strings to get reliable connections to Sonic's modems. If in doubt, try these settings first, and change them if you have a problem staying connected.

    Save the file.

  8. Set the access permissions on sonic.chat to a setting apropriate for your system. Typically this will be mode 0640, meaning -rw-r-----, or user read+write, group read, world nothing. Since this file contains your unencrypted Sonic password, it should not be world-readable. Use the command 'chmod 640 sonic.chat' to do this. See the manpage for chmod(1) for a detailed explanation of file permissions.

  9. Set the access permissions on ppp-on to allow execution. Typically this will be mode 0751, meaning -rwxr-x--x, or user read+write+execute, group read+execute, world execute. Use the command 'chmod +x sonic.chat' to do this.

  10. To activate PPP, run the command ppp-on as root. You can check its progress with the command 'tail -f /var/log/messages'. When you see two lines marked 'Remote IP Address:' and 'Local IP Address:', your connection was successful.

  11. To deactivate PPP, or interrupt a PPP connection during dialing, run the command 'killall -1 pppd' as root.


Visit this site
Home | Sales | About Us | Jobs | Member Tools | Support | Web Mail | Find Dialups | Live Help | Contact Us