Dialup
From www.hserus.net
This is a very old howto that I wrote, based on an even older howto. There are plenty of GUI ways to do this now, such as KPPP and the Gnome PPP dialer, and you'd probably use these to dial into a broadband provider these days, rather than a dialup provider. Anyhow, this is what its all based on, and it is still fun (or sometimes, even necessary), to do this stuff by hand. So, here goes.
The instructions are to connect to DOT Hyderabad (a state owned telco which provides ISP services in several Indian cities). Again, it's reasonably easy to customize this for use with any ISP you like.
Most of the words below are Bhyrava Prasad's, but I've edited / modified the wording / instructions as necessary.
Please read the following HOWTO carefully and modify the lines where needed. Be careful when working as root. Take care to make backup copies of any file before editing/changing it , so you can at least restore it back to the previous state in case something does not work.
There are many approaches to connect your machine to the net using ppp. You can use Xisp (from X windows), kppp (if you are using KDE), rp3 (the redhat ppp dialer) if you use gnome, and so on , but using this method , you never need to use X at all. Also , you can invoke and shutdown your ppp from a cronjob or shell script if you need that.
You can use the info in this howto to similarly configure kppp or dip or xisp or whatever. Some of the steps are indeed unchanged. The appendix has some info how to do this.
The LINESPEED used to connect to the modem has been assumed to be 115200 bps. If your system is older, you may need to use a slower speed such as 38400 or 19200.
- Login as root.
- Use modemtool to set /dev/modem to the right port for your modem. If your modem gives you a NO-DIALTONE error , you will need to set ATX1 on your modem using minicom and write this using AT&W.
- Edit the /etc/resolv.conf file to have the following information. Set the nameserver entries as needed (get this important information from your ISP if it is other than DOT Hyderabad).
mjollnir# cat /etc/resolv.conf search vsnl.net.in nameserver 202.54.30.1 nameserver 202.54.1.30
- Edit the following files to have the lines as below. Be sure to make these modifications as per your requirements.
- In chat-ppp0, make sure you use the actual username and password instead of the dummy xyz and secret used (yeah, obvious, but still ...) :)
- Also remember to change the telephone number as needed (172222 is the access number for DOT Hyderabad).
- If your telephone exchange does not support tone dialling (also called DTMF or fast dialling), change the string ATDT to ATDP in the chat-ppp0 script. Yeah, we do still have a few such "crossbar" exchanges - direct descendants of the original developed by a Kansas undertaker called Almon Strowger, over a hundred years ago (not all that many of them, to be sure, but these dinosaurs do exist).
- If you have an older machine and modem, it may not support a speed of 115.2 kbps. In that case , you will have to change the LINESPEED line - try 57600, 33600, 19200 or whatever works on your machine. Anything above an old 486 shouldn't matter.
- You will need to dial up from minicom and check what are needed and tailor the following files accordingly. This is very important as the chat script will fail if you do not have the right 'expect' and 'send' sequences.
Here are the files.
/etc/sysconfig/network-scripts/chat-ppp0
'ABORT' 'BUSY' 'ABORT' 'ERROR' 'ABORT' 'NO CARRIER' 'ABORT' 'NO DIALTONE' 'ABORT' 'Invalid Login' 'ABORT' 'Login incorrect' 'ATZ' 'OK' 'ATDT172222' 'CONNECT' 'name:' 'xyz@dummy.vsnl.net.in' 'ord:' 'secret' '>' 'ppp' 'TIMEOUT' '5'
/etc/sysconfig/network-scripts/ifcfg-ppp0
PERSIST=yes DEFROUTE=yes ONBOOT=no INITSTRING=ATZ MODEMPORT=/dev/modem LINESPEED=115200 ESCAPECHARS=no DEFABORT=yes HARDFLOWCTL=yes DEVICE=ppp0 PPPOPTIONS= DEBUG=no PAPNAME= REMIP= IPADDR= BOOTPROTO=none MTU= MRU= DISCONNECTTIMEOUT= RETRYTIMEOUT=10 USERCTL=yes
- Now set the modes for the files using the commands
chmod 0600 /etc/sysconfig/network-scripts/chat-ppp0 chmod 0644 /etc/sysconfig/network-scripts/ifcfg-ppp0
- You can start ppp by running
/usr/sbin/usernetctl ppp0 up
and stop it with
/usr/sbin/usernetctl ppp0 down
- If you are still unable to get connected, in the network menu in the Redhat control panel , check 'debug connection' for the ppp0 interface and try to connect again. You should see error messages in /var/log/messages. After rectifying the cause and testing it out, uncheck 'debug connection'.
- One usual reason that the modem lights flicker a bit and then nothing happens is if your modem is unable to recognise the dial tone. As mentioned in step 1, you will need to set ATX1 in this case.
- Instead of using the commands above, you can also activate the ppp interface from RedHat's control panel by clicking on the activate button. Or by selecting Start->Programs->Networking->Usernet in KDE
For your convenience , here are alternate ways of dialing into an ISP
Using WvDial
WvDial is a command line dialer for linux, available from http://www.worldvisions.ca/wvdial/. I strongly recommend downloading it if it is not available on your system / linux CD as an RPM / deb / slackware package (or whatever)
To automatically configure wvdial for your modem, run wvidalconf (as root) -
mjollnir# wvdialconf /etc/wvdial.conf
and edit the /etc/wvdial.conf file to fill in details about your ISP access number etc. It's far simpler than using chat scripts :) See http://librenix.com/?inode=314 for more on configuring wvdial (though it's quite easy, really).
Using kppp (KDE's PPP program)
This is as simple as it gets! Assuming you have kde already installed and running , simply use kppp to configure your modem (fill in some easy point and click forms with all the data kppp asks for). For a more detailed howto, take a look at http://lppcfom.sourceforge.net/fom-serve/cache/484.html
Dial On Demand
This will dial out to your ISP whenever there's an outgoing request (say when you check / send mail, open a website, connect to an ftp site etc).
Check out the howto at http://www.nleaudio.com/bnotes/dialondemand.htm. It has been implemented on Mandrake 7.1 but should work just as well on any reasonably recent linux which has a demand dialing capable pppd. You can also try this PC Quest howto by Nikhil Datta - http://www.pcquest.com/content/linux/198010108.asp
