Home

Feedback

Credits

About Raj

Linux

*
Introduction by Dr. Raj Mehta
*
Linux FAQ
*
Installing Linux on Your Machine
*
Software For Linux
*
Configuring PPP connection for Linux for connect to Internet via dialup connection

Related Links

1.
10 Questions About Linux -A Good Overview of Linux
2.
Linux Site - The main Linux site Online
3.
Linux Documentation - Complete Documentation
4.
Linux Documentation - Alternative link for Linux Documentation
5.
Linux Applications - Applications available for Linux
6.
Linux Headquarters - A Popular Linux site
7.
Alternatives to MS Windows Operating System
- A authoritative guide to other Operating Systems.
8.
Unix vs. NT - Extremely detailed report!
9.
Linux in News - Different IT industry learders are porting it on their machines.

Configuring Your Tcp/Ip Account in Linux: Switch over to Linux Now!

Well, that is one question that confronts every Linux user someday, sometime. PPP configuration in Linux has been quite a bit of a problem for the Linux newbie so far.

However, this is more of a psychological block against the command-line interface of Linux, which most Windows users label with 'arcane', 'obsolete' and other epithets. However, I find it the most convenient way to work; as you get used to Linux, I am sure that you too will fall in love with the command line :-)

However, Linux , as always has responded to the demands of its users. Now there are several convenient graphical interfaces to PPP and every distribution comes equipped with at least one.

In this article, I will try to guide you through a simple command line method. In addition, I shall also demonstrate the use of Xisp, a cool graphical interface to PPP. There are several others , as any popular Linux site will show, such as kppp (part of KDE), quickppp, dip etc. However, they are all similar to the ones discussed here.

  • Good ol' command line:

    The chief PPP workhorse in Linux is the PPP daemon pppd. This program handles dial-up tcp/ip connections. The dialup is carried out by a program called chat. The chat program dials according to a chatscript. We have to carry out the following steps:


    1. Create a file /etc/resolv.conf with the following in it:

      search
      nameserver 202.54.1.30

      In this above file , we set the name of the DNS server. Linux, unfortunately, requires you to provide the name of at least one nameserver ( AFAIK ).


    2. Create a chatscript. Here's mine ( with sensitive info deleted ;-)


      ABORT 'NO CARRIER'
      ABORT BUSY
      ECHO OFF
      SAY "Dialling your ISP...\n"
      ''ATM0
      '' ATDT(VSNL Phone Number)
      TIMEOUT 240
      SAY "Waiting up to 4 minutes for connection ... "
      CONNECT ''
      SAY "Connected, now logging in ..."
      name: (My UserName)
      ssword: (My Password)
      > ppp
      SAY "OK , Connected. Go on."

      Save the script as /root/.chatscript. What does all the above geekese mean? Simple really!! The first 2 lines tell chat not to dial if things are not ready. The ATM0 command just tells the modem to shut up. Of course , if you like to listen to the sweet tunes of modem dialup ;-) then replace it with ATM1 . Replace the appropriate Phone Number, and the username and password.


    3. Make your ppp daemon setuid. This is to allow pppd to write to devices which are owned by root. To do that, you login as root, type: chmod u+s /usr/sbin/pppd
    4. Add the following horror to your .bashrc( (ur home directory)/.bashrc):

      alias pppstart='/usr/sbin/pppd connect "/usr/sbin/chat -f /root/.chatscript" /dev/modem 38400 crtscts modem defaultroute'

      alias pppstop='kill -9 `ps aex|grep pppd|awk "{print $1}"` 2>/dev/null'

      Basically, we set things such that by typing commands 'pppstart' or 'pppstop' we can start or stop ppp. So type pppstart , wait for about half a minute and start using the net!!

      However, we must remember that chat is a really powerful script language , and the above script is only the tip of the iceberg. Do a man chat for further info.

  • Xisp:


    Xisp is a cool little interface to ppp. The options menu gives you a way to name different ISPs and numbers. A unique feature of this is that in the entry for Phone number, you can give several numbers separated by commas. The program tries each number in rotation if one does not connect. Start xisp in X windows. Click on the options menu. You will see various menu items like 'dialling and login', 'Accounts Information', and so on.


    1. Accounts Information:


      Set the name of your ISP and the Telephone Number(s) in the space provided. However, there is no need to set up your username or password here.


    2. Dialling and Login:


      Here, you can create a chat script as shown.


    3. Communication Options:


      In here, we can set baud rate, and other modem specific options.


    4. Tcp/Ip options:


      Here, we set up DNS, netmask as shown.


    5. Paths Setup:


      Here, we set the paths according to location of various files in the Xisp software.


      This article was written by Rajarshi Bandyopadhyay , 3rd year student in Dept of Computer Science and Eng at IIT Bombay. Mail him here



  • Copyright © 1996, 1997, 1998, 1999 Dr. Raj Mehta. All rights reserved.