|
Home > Archive > Linux/Unix > August 2001 > Azam: Internet Instructions
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Azam: Internet Instructions
|
|
|
| You will need:
1) The IP address of your ISP's name servers.
2) Your ISP's dial-up phone number.
3) Your username and password.
In DOS, the srial ports are mapped to COM1 through COM4. In Linux, they are designated a little bit differently:
DOS or Windows Linux Linux (Old)
COM1 /dev/ttyS0 /dev/cua0
COM2 /dev/ttyS1 /dev/cua2
COM3 /dev/ttyS2 /dev/cua2
COM4 /dev/ttyS3 /dev/cua3
Avoid using the cuax designations for your serial devices -- they are generally referred to as
"callout" devices and are obsolete as of Linux kernel version 2.2. The ttySx naming convention
strikes Windows users as very odd usually, but the logic behind it is simple: a tty can refer to almost any device (usually a serial device or a terminal), the "S" stands for "serial" and in Linux, you start numbering things at zero usually, and not at one.
The resolv.conf File
--------------------
The resolv.conf file is located in the /etc directory. It contains the information necessary for your machine to locate your ISP's domain name servers, which convert the IP addresses to sensible names that you can use to locate various web sites. Your resolv.conf file should be in this format:
domain {domain}
search {name of your ISP}
nameserver {IP address of your ISP nameserver}
I use earthlink, so my resolv.conf file looks like this:
domain earthlink.net
search earthlink.net
nameserver 207.217.77.82
nameserver 207.217.120.83
nameserver 207.217.126.81
If it doesn't work, review /var/log/messages for details concerning the attempt. Use these details to troubleshoot the interface or to get help online.
The /etc/HOSTNAME File
-----------------------
Make sure that you have the name of your machine in this file. That's all you need. Mine looks like:
gsibbery
The /etc/ppp/options File
----------------------------
The options file is used to specify certain options (big surprise there!) for your method of connexion. Mine looks like this:
###
# /etc/ppp/options - options for pppd
#
#!/bin/sh
/dev/ttyS0
115200
connect /etc/ppp/earthlink-connect
user ELN/gsibbery
lock
crtscts
defaultroute
noipdefault
The first line is the serial port that your modem is on. My modem is on serial port ttyS0 (or COM1
in Windows). By the way, make sure you only have one device specified as your modem. Some people get confused and try to use both /dev/ttyS0 and /dev/modem as the device file for their modem. This will produce an error. It would be OK, however, to make /dev/modem a symbolic link
(shortcut) to refer to your modem. The "connect" line specifies the name and location of the chat
script that I will describe below. You may have to figure which one yours is on by trial and error, or with t a tool like kermit or minicom. The next line specifies the speed at which the transmissions are to take place . . . I have a Rockwell 56K modem and the standard speed for a 56K is 115200. The "lock" option writes out a lock file to the /var/lock directory that ensures that no one else can use the modem while I am using it. Linux does this with a number of devices; if you use a device like a modem once and then find that when you try to dial out a second time, you get an error message, chances are that your modem lock file is not being deleted when you relinquish control of the device. This may seem a bit uncalled for, but remember, that Linux is a multi-user system -- only one person can have exclusive access to some devices at a time. My ISP uses a version of PAP and so I need the line "user {username}". If your ISP uses a different authentication protocol, you may not need this line. The line "crtscts" means that the modem is using hardware flow control (this is almost always true under Linux). The "defaultroute" option adds a default route to your local routing table using the remote IP address as the gateway. The "noipdefault" line is used because I connect using a modem and not a cable, and my machine does not have one fixed IP address, but is assigned one from a pool of available IP addresses each time I dial in to Earthlink. If you have problems connecting, then place "debug" at the end of this file and it will write out error messages to the /var/log/ppp log and if you read over it, you will get some idea of what is going wrong. Once you've found the problem, however, remove the "debug" line from this file or it will keep writing out
messages to your log file and it will get larger and larger, taking up more space without performing any useful function. (By the way, you are generally best off by using as few of these "options" as is necessary to get your PPP connexion to work . . . if you don't need it, don't use it!)
The Chat Script File
-----------------------
The chat script is the file that actually does the handshaking with your ISP. Unfortunately, it is
rather difficult to say exactly what information you need in this file as the details depend somewhat on your ISP. This script can have a variety of names, but is located in the /etc/ppp directory. The name of this chat script will need to be placed in your options file after the "connect" command. I use Earthlink as my ISP, so I call my chat script earthlink-connect, but I could
have chosen any name I wanted to as long as I specified it in the options file. Your ISP may be of some help in telling you what their authentication daemon expects to see in this file -- you may want to ask them whether their server requires the use of a script with certain specific expect/send pairs (what you send must be what the authenticating server expects to receive -- otherwise the server won't understand the information you are sending to it) -- if so, ask them to specify exactly what they are, so that you can configure your script correctly. Again, do not be surprised if you are given some incorrect information -- this sometimes requires a good bit of trial and error in order to figure out exactly what the server expects. by the way, this was the most annoying aspect of the whole operation to me, but once you figure out the correct options to be used, you'll find that it was rather simple all along. These expect/send pairs represent command responses that must be passed by the script in order to turn on the PPP server at the ISP but it usually looks something like this:
#!/bin/sh
# earthlink-connect: a script for dialing into Earthlink
exec /usr/sbin/chat -v
TIMEOUT 120
ABORT BUSY
ABORT 'NO CARRIER'
'' ATZ
OK ATDT344-0514
CONNECT ''
ogin: ELN/gsibbery
ssword: topsecret
This probably looks a little mysterious, so let me try to explain it a little. The crunches (#) signify that the line is a comment. The "exec /usr/sbin/chat -v" line means that the program called chat, located in /usr/sbin will be executed (this is necessary for connexion to take place). The -v option stands for verbose -- this specifies that any output in the logs will be more easily readable by humans -- extremely helpful when reading trying to troubleshoot the connexion by reading the message logs. The next few lines deal with the modem. "TIMEOUT" is the time (in seconds) before the dial-up attempt is aborted (OK, I'll admit that two minutes is a bit excessive, but if you have problems, you may want to increase the number . . . the default is usually like 30 seconds or something -- usually, but not always enough). The next two lines tell the chat program to "abort" the attempted dial-up if the phone line is busy or if there is no dial tone. The next line resets the modem to the factory defaults. The next line actually dials the ISP phone number (keep in mind that this number can change with little warning). If this line doesn't work, you may want to check your ISP's dial-up number, or if you have a pulse rather than a tone telephone line, replace the "ATDT" with "ATPT". I don't think the hyphen separating the two sections of the number is
necessary . . . remember to include the area code if you are dialing long-distance. The next line is
the instruction to actually complete the connexion, and the next two lines are my login and
password. With Earthlink, you need to prefix ELN/ to your username -- this is just one of the peculiarities of dealing with that ISP; this is because the Earthlink server that I dial into is an Windows NT server and it requires that
requires that you put the domain name before your username and Earthlink's domain name happens to be "ELN". Others may not require this, or may expect something different, so try to find out what your ISP expects. The reason the initial letter is left off of "login" and "password" is to allow for the fact that your ISP may use upper-case or lower-case initial letters for these words. By
truncating the first letter, you avoid this difficulty. Again, there may be some difficulty here, as your ISP may expect "Name" or "userid" instead of "login". If you try a number of these and nothing works, ask them and find out. mentioning "AOL" in your conversation with a rep often works wonders, by the way.
If you try to connect, but are unsuccessful, add the "debug" line at the end of yout /etc/ppp/options file like I mentioned above, then check your your /var/log/ppp and /var/log/messages files. If you see something like "auth pap" or "auth chap", then you need to use those authentication protocols. CHAP and PAP are "authentication protocols" which determine that you are really the person who should be using your account. Your pap-secrets and chap-secrets files are located in the /etc/ppp directory and should look something like this (with the appropriate username and password, of course):
#!/bin/sh
# /etc/pap-secrets
#username password
ELN/gsibbery topsecret
I think I should mention that there are many versions of each of these protocols and this might not work for each and every one, and of course some ISP's may require you to log on using more than one of these authentication schemes, so if none of this works, ask them.
The ppp-on File
------------------
One last file that you have to add is your ppp-on file, which will be located in your /usr/sbin or /
directory. This is what actually turns on PPP. I couldn't start my PPP services without this file, and as it turned out, this was my main problem in getting connected. The same rules apply as before,
but you need to know the subnet mask of your ISP (most are class "C" masks nowadays; that is,
255.255.255.0).
TELEPHONE=344-0514
ACCOUNT=ELN/gsibbery
PASSWORD=topsecret
LOCAL_IP=
REMOTE_IP=0.0.0.0
NETMASK=255.255.255.0
That should get you online. | |
| carlitos 2001-07-26, 8:42 pm |
| i been trying to figure that one out | |
|
| That was a guide I wrote to help people get online some time ago. Let me know if you have any more probs. | |
|
| Thanks for the reply Randy,
I'll try that out and see if it works.
Azam | |
| Randy 2001-07-27, 11:10 am |
| OK, let me know what happens. | |
|
| Hey Randy,
Well, I did everything you said and still get this exact msg when I use kppp,
"Timeout in Chat Script"
I'm using Netzero. I found out there name server ip addresses which are:
209.247.162.20
209.247.163.12
208.184.153.20
etc.
Do you think my modem isn't repsonding? I tried all the drivers for it, and still get the same response.
Any ideas bro?
Azam | |
|
| BTW, Caldera is sweet! I love the KDE desktop and the Kdevelopment program where you make C/C++ apps. Very Cool! Also, caldera is fast as hell, I didn't even notice one slow down or even a glitch yet when opening tons of programs one after the other 
Azam | |
|
| Go to an xterm and fire up minicom . . . a communications program that will talk to your modem. This is a common error. I think your ksaferppp may think that your modem is on a different serial port than it may be on. Do Ctrl A-Z I think it is to configure minitab options. Then you will be given a menu to configure your modem port. You may have to play with the serial port settings to get it right. There are only four choices you can have anyway. Then to try to talk to your modem, do the ATDT123-4567 (subsititute your ISP phone no. here) line and if your modem can talk to minitab you should get an "OK" on the screen. You can use kermit to do this as well, but he's more difficult to deal with. If that doesn't work we may have to increase your time in the chat script. But the reason it is probably timing out is because your modem isn't getting the data because it's on a different serial port. Let's see if this is the prob as I had this error before. Let me know if this does anything. | |
|
| quote: Originally posted by Azam
BTW, Caldera is sweet! I love the KDE desktop and the Kdevelopment program where you make C/C++ apps. Very Cool! Also, caldera is fast as hell, I didn't even notice one slow down or even a glitch yet when opening tons of programs one after the other 
Azam
Caldera with KDE is one of the most polished desktops available. The speed and stability is just Linux . . . you will get comparable performance with the others as well, but few are as slick as Caldera. You'll also find this an ideal development environment for C. Try going to the FSF or Slashdot and d/l'ing whatever programs look interesting to you . . . they come with the source (almost always in C), so you can get an idea of how these apps work, and maybe make some improvements yourself. Happy hacking! | |
|
| Thanks for the reply Randy,
I'll try that stuff you told me, and I'll get back to you.
Happy Hacking, lol
Azam | |
|
| OK, let me know if this works for you. I have had the same error a number of times and it was usually a misconfigured modem. | |
| ccieToBe 2001-07-29, 1:08 am |
| quote: Originally posted by Azam
...
I'm using Netzero....
AFAIK NetZero only has a Windows client so that's probably your problem. NetZero's trying to open up its client and isn't able to, so you never connect. | |
|
| Actually I dont even use the netzero client in windows Just plain old username/password and telephone #.
Azam | |
| ccieToBe 2001-08-01, 3:26 pm |
| I take it you have the paid service? |
|
|
|
|