You need to set up a dial-up Internet account on your Linux box, but you don't know what dialer or configuration utility to use. Or, you know about KPPP and Gnome-PPP, which are good utilities, but KPPP requires KDE libraries, Gnome-PPP requires Gnome libraries, and both require X Windows. You don't want to down-load all the baggage that comes with them; you just want a simple standalone dialer, or you want a command-line dialer.
The WvDial dial-up program runs from the command line, and runs on any Linux distribution. These are the steps to configure a single account:
Then, make sure that /etc/ppp/options contains a basic set of options. You can copy this exactly:
asyncmap 0 crtscts lock hide-password modem proxyarp lcp-echo-interval 30 lcp-echo-failure 4 noipx
As root, start up the WvDial configuration script, giving it the name of the configuration file, exactly as shown here:
# wvdialconf /etc/wvdial.conf
Scanning your serial ports for a modem.
ttyS0<*1>: ATQ0 V1 E1 -- OK
ttyS0<*1>: ATQ0 V1 E1 Z -- OK
ttyS0<*1>: ATQ0 V1 E1 S0=0 -- OK
[...]
Found a modem on /dev/ttyS0.
Modem configuration written to /etc/wvdial.conf.
ttyS0<Info>: Speed 115200; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
This writes the modem defaults to /etc/wvdial.conf. Now, open /etc/wvdial.conf, and add your login information, using your own dial-up number, login, and password:
[Dialer Defaults] Modem = /dev/ttyS0 Baud = 115200 Init1 = ATZ Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 ISDN = 0 Modem Type = Analog Modem Phone = 123-4567 Username = alrac Password = passfoo
Save your changes, and try dialing in by running the wvdial
command:
# wvdial
--> WvDial: Internet dialer version 1.54.0
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Modem initialized.
--> Sending: ATDT9322744
--> Waiting for carrier.
ATDT9322744
CONNECT 115200
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Thu March 13 13:54:09 2007
--> pid of pppd: 7754
--> Using interface ppp0
--> local IP address 68.169.174.170
--> remote IP address 68.169.174.12
--> primary DNS address 68.169.174.2
--> secondary DNS address 68.169.174.3
Test your connection by surfing the Web or pinging some reliable hosts:
$ ping -C2 yahoo.com
PING yahoo.com (216.109.112.135) 56(84) bytes of data.
64 bytes from w2.rc.vip.dcn.yahoo.com (216.109.112.135): icmp_seq=1 ttl=50 time=133
ms
64 bytes from w2.rc.vip.dcn.yahoo.com (216.109.112.135): icmp_seq=2 ttl=50 time=138
ms
There you go, all ready to web surf at the speed of dial-up.
S0=0
tells the modem to
answer the phone immediately, so delete this if you don't want to
enable dial-in access. Or, change the value to 1, 2, 3
,or 4
to answer on the first, second, etc.
ring.
It is better to use /dev/ttyS* than /dev/modem. On some Linux distributions, /dev/modem is supposed to be a softlink to the modem, but it isn't always correct. It is better to name it explicitly.
Modern modems are good at auto-negotiating line speeds. 115200 is a safe default. If you have problems sustaining a connection, try lower speeds:
9,600 bps |
19,200 bps |
38,400 bps |
57,600 bps |
See man wvdial.conf
to see
what the default configuration values are.
man 1 wvdial