Andrew McRory - email@example.com
Before you can create your pppd script there are several things you MUST check to ensure the best quality connection over analog lines.
1) What DTE baud (computer-to-modem) rate can the modem handle?
115200 or higher is recommended for maximum performance. Experiment to find the highest speed useable. Once you have established the maximum, set the modem with setserial (assuming com3, irq 5):
linux-2.2.x 460800 baud (with
You'll only be able to get 230400+ baud with a special serial card of if you patch your kernel with shsmod and have a supported onbard serial controller. (I'll be releasing a kernel upgrade with shsmod next week if interested)
Only use the "uart" option when you are sure of the capabilities of your serial port. See setserial man page...
2) What speed can your phone line handle?
Depending on your location you lines may not be able to handle 56k. Listen on your phone line for static - you should hear "electronic air" with no hum, pops or clicks. If you phone company offers ISDN or DSL see if your line qualifies for those services. If so, you have a better chance of getting a true 56k connection.
Initialize your modem so it reports the DCE (modem-to-modem) rate and not the DTE (computer-to-modem) rate. "ATW2" will force most modems to report the DCE rate - see the manual. Run minicom (or cu from the uucp package), type ATDT<isp_number> and note the connect rate. CONNECT rates of 26400, 31200 and 24000 are common V.34 rates. CONNECT rates higher than 33600 are either X2, K56Flex or V.90 connections. Be wary of connect rates of 38400, 57600 and 115200 because they are the DTE connection rate and not the modem-to-modem (DCE) rate we want to see.
3) What hardware does your ISP use?
If they support V.90 and you have a V.90 modem read your manual and be SURE to setup the modem to connect in V.90 mode. Several V.90 modems I've used default to K56Flex and connect slower than they do in V.90 mode! V.90 is in most cases the best protocol to use. Here are some init strings to help you see what to do.
This init string sets the modem to do hardware handshaking, fast dial 55ms, verbose result codes, report DCE, default to V.90 protocol.
This Lucent init is basically the same as the Rockwell example above except the V.90 parameter is set by "S109=?" instead of "+MS=12,1". Some Lucent chipsets require S109=2 to connect in V.90 mode by default.
Most modern modems can be software upgraded. Check your manufacturers FTP site for Flash ROM upgrades; always try to run the latest code for your modem.
4) Are you running the stock kernel?
If you really want the best performance from your system you should bite the bullet and recompile your kernel to support your specific hardware. The kernel that ships with COL is FAT, FAT, FAT!!! Forget modules and install support for the features you need directly into the kernel. The only time you want modules is for devices you will rarely use AND your really worried about saving memory. (Of course you could be making a Linux distribution and you want out of the box support for all/most hardware configurations... :-)
On the other hand, trying to do things too perfectly isn't good if you're not sure what options to choose. You could make a mess so maybe this step should be ommited. Beware.
By now you should know whether have a solid foundation for which to build a high performance data connection.
Now we create the scripts to build our optimized connection. pppd is simple yet hard to understand for a beginner so I'm going to hand you the script(s) I've used since my first copy of slackware (before redhat ;). They've worked with ppp-(old???) through ppp-2.3.11.
The above script goes in any
directory in your path, preferably in /usr/sbin.
Substitute "<loginname>" with the login
name you setup with
Next create the /etc/chat script. Chat scripts define the conversation the computer will have with the modem.
For best performance, use your own init string in place of "ATZ". Replace "xxxxxxx" with the your ISP's phone number.
Now you need to put your name
Here's the example.
That's all it takes! Now run /usr/sbin/ppp-up as root. To see what's happening run:
tail -f /var/log/messages
on another VT to see the connection results.
If your ISP supports bsd_comp
and ppp_deflate compression, you will want to disable
modem-to-modem (DCE) compression (add "%c0" to
the init string
Using ppp_deflate I've gotten over 30Kbps on highly compressable text files - believe it or not. Of course I'm dialing from our office to the dialup located in our office - only 1000ft of copper to screw things up...anywhere else I get a lousy 15-20Kbps ;-). Using modem compression brings the same transfer down to ~10Kbps. Uncompressable data gets 5.5Kbps under optimum conditions and 4-5Kbps on good lines. Check you modems compression rate by downloading ftp://ftp.iron-bridge.net/pub/testing/500k - thats the file I get 30K with.
If you want to "set it and
forget it", download the diald RPM from my FTP site (
update /etc/diald.chat, /etc/diald.options,
/etc/ppp/pap-secrets following the instructions and
get a trouble free, automated Internet connection that
you'll never have to mess with again. If you install
diald, be sure to install the network tap and slip