Qualify for

DSL

Internet
Check Address Only
Phone Number:
Address:
Unit Type and #:
 
City:
State:
Zip Code:
This is a:
Residence Business
   

Connecting to eticomm.net using Linux

Assumptions

  1. Modem is working correctly under Linux.
  2. You have the latest versions of pppd and chat.
  3. PPP support is compiled directly into the kernel (not as a module).
  4. You know the actual device identifier of your modem. (It is not /dev/modem.)

Recommend Reading

Linux PPP-HOWTO. Available from the Linux Documentation Project or on most distribution CDs

General Info

Connecting to any ISP with Linux is fairly simple. It does not require specialized, GUI programs like kppp. While there are quite a few of these programs available, we do not recommend using them. Since the setup is so easy, the GUIs are really unnecessary.

For the most part, the scripts that follow cover an environment where a single user is connecting to a single ISP. A method for using these scripts in a multi-user environment is provided at the end of this document.

There are two configuration files and three script files that need to be created/modified in order for your Linux connection to work. All of these files are placed in the /etc/ppp directory. If this directory does not exist on your system then create it with owner/group of root.root and permissions of 750.

A word about case... All *NIX commands are case sensitive. For instance: In the 'Multi-User' instructions you will see the following:

usermod -G modem username

The above IS different from:

usermod -g modem username

WaTcH yOuR cAsE!

Configuration Files

There are two configuration files. The first is the file that gives pppd its options and the second is the file that tells pppd the username and password to use in order to log into the ISP.

File: /etc/ppp/options
Perms: 640 (-rw-r-----)
Owner: root.root

This is the pppd options file. It looks like the following (without the dashes):

---------------------------
updetach
modem
lock
crtscts
defaultroute
asyncmap 0
---------------------------

File: /etc/ppp/pap-secrets
Perms: 640 (-rw-r-----)
Owner: root.root

This is the file that contains the username and password for the ISP. The password must be in clear text. It should look like the following (without dashes):

---------------------------
username * password [static-ip-address-if-necessary]
---------------------------

The script files

These are the files that actually connect you to the ISP. There are a total of three scripts that connect and disconnect you from the Internet.

File: /etc/ppp/ppp-on
perms: 750
Owner root.root

This is the actual connect script. You will need to edit the script with your username and telephone number to dial in the correct locations, after which, run it and you should connect.

---------------------------
#!/bin/sh

USERNAME=               # Your username goes here
TELEPHONE=              # The telephone number you dial to connect
LOCAL_IP=0.0.0.0        # Local IP address if known. Dynamic = 0.0.0.0
REMOTE_IP=0.0.0.0       # Remote IP address if desired. Normally 0.0.0.0

export TELEPHONE ACCOUNT PASSWORD
DIALER_SCRIPT=/etc/ppp/ppp-on-dialer
exec /usr/sbin/pppd debug /dev/ttySx 38400 name $USERNAME \
        $LOCAL_IP:$REMOTE_IP \
        connect $DIALER_SCRIPT
----------------------------

File: /etc/ppp-on-dialer
Perms: 750
Owner: root.root

This script actually performs the dialing function. It receives the telephone number from ppp-on. If you wish, you may add a modem initialization string where indicated. If you do not wish for a initialization string then remove the line completely.

----------------------------
#!/bin/sh
exec /usr/sbin/chat -v                                  \
        TIMEOUT         3                               \
        ABORT           '\nBUSY\r'                      \
        ABORT           '\nNO ANSWER\r'                 \
        ABORT           '\nRINGING\r\n\r\nRINGING\r'    \
        ''              \rAT                            \
        'OK-+++\c-OK'   ATH0                            \
        OK              'modem initialization string'   \
        TIMEOUT         30                              \
        OK              ATDT$TELEPHONE                  \
        CONNECT         ''                              \
----------------------------

File: /etc/ppp/ppp-off
Perms: 750
Owner: root.root

This is the script that will disconnect you from the Internet. No modifications are necessary.

----------------------------
#!/bin/sh
if [ "$1" = "" ]; then
        DEVICE=ppp0
else
        DEVICE=$1
fi
if [ -r /var/run/$DEVICE.pid ]; then
        kill -INT `cat /var/run/$DEVICE.pid`
        if [ ! "$?" = "0" ]; then
                rm -f /var/run/$DEVICE.pid
                echo "ERROR: Removed stale pid file"
                exit 1
        fi
        echo "PPP link to $DEVICE terminated."
        exit 0
fi
echo "ERROR: PPP link is not active on $DEVICE"
exit 1
----------------------------

More experienced users may want to write a perl script to prompt you for whatever ISP you want to connect to. Something like the following will work well:

----------------------------
#!/usr/bin/perl

open(LIST,"/bin/ls /etc/ppp/ppp-on.* |") || die("ERROR: Can not get file list\n");
while() {
 ($blah,$name)=split("ppp-on\.",$_);
 push(@files,$name);
}
close(LIST);

$ctr=0;
$end=@files;
$end--;

while($selection le 0 || $selection gt 4) {
 for ($i=0;$i<=$end;$i++) {
  $j=$i+1;
  printf("%d %-10s",$j,$files[i]);
  $ctr++;
  if ($ctr ge 4) {
   print "\n";
   $ctr=0;
  }
 }
 print "\nEnter Selection: ";
 $selection=;
}

$selection--;
system("/etc/ppp/ppp-on.$files[$selection]");
exit 0;
----------------------------

   Return to the ETI Help Desk   


ETI Premier Strategic Partners (PSPs)
ETI Premier Strategic Partners: Cisco ETI Premier Strategic Partners: 3Com ETI Premier Strategic Partners: Dell
Copyright 1994-2008 ETI,L.L.C. | Privacy Statement
 
SSL