Use wvdial to start ppp dial-up Internet access

Source: Internet
Author: User
Article title: use wvdial to start ppp dial-up Internet access. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Wvdial is an intelligent dialing tool in linux. using wvdial and ppp, you can easily access the Internet in linux. During the entire process, wvdial is used to dial and wait for the prompt, and enter the corresponding user name, password, and other authentication information as prompted; ppp is used to negotiate with the dial-in to transmit data and maintain the connection.

I. wvdial and its related configuration wvdial functions are very powerful. it will try to guess how to dial and log on to the server, and it will also handle common errors intelligently, unlike chat, you are required to write a logon script. Wvdial has only one configuration file/etc/wvdial. conf. The wvdial startup process is as follows: first load the wvdial. conf configuration file, then initialize the modem and dial up. after dialing, wait for the response from the dial-in. after receiving the response from the dial-in, start pppd.

You can use the wvdialconf program to automatically generate wvdial. conf configuration file. the program format is: wvdialconf/etc/wvdial. during the execution of the program, the program will automatically detect the configurations of your modem, including the available device file names, the baud rate of the modem, initialization characters, and other dial-up information, wvdial is automatically generated based on the information. conf configuration file. If the/etc/wvdial. conf file already exists, executing this command again will only change the options such as Modem, Band, and Init. A typical automatically generated configuration file may be like this:

[Dialer Defaults]

Modem =/dev/ttyS1 Baud = 115200

Init1 = ATZ

Init2 = ATQ0 V1 E1 S0 = 0 & C1 & D2 S11 = 55 + FCLASS = 0

; Phone =

; Username =

; Password =

The execution format of wvdial is wvdial -- help | -- version | section. The following describes how to run the command: -- help: displays simple help information -- version: displays the version number section of wvdial: the section here is a bit like the INI file in windows, a wvdial. the conf configuration file can have multiple sections, each of which consists of some variables, that is, statements with variable = value, as shown above. Common variables are automatically generated when the configuration file is automatically generated using wvdialconf:

Inherits = InheritedSection: [Dialer Defaults] is automatically generated when the configuration file is automatically generated using wvdialconf. In addition, you can customize your own section. When running the program, first load [Dialer ULTS], and then overwrite the corresponding options of [Dialer Defaults] with the corresponding options of the specified section. For example, in wvdial. the conf file also contains [Dialer Tom]. if we run wvdail Tom, the system will first read [Dialer Defaults] and then overwrite the corresponding options of [Dialer Defaults] with [Dialer Tom. If [Dialer 169] exists in addition to the preceding section, and the content is as follows: [Dialer Tom] Username = tom Password = xxx Inherits = 169 [Dialer 169] Phone = 169 if we execute wvdial Tom at this time, the system will first read [Dialer Defaults], then, use [Dialer Tom] to overwrite the corresponding options of [Dialer Defaults], and then use the corresponding options of [Dialer 169] to overwrite the corresponding options of the first two. We can see that using wvdial, we can easily move back and forth between different ISPs or modem (if you have several ISPs or medom ).

Medom =/dev/ttySx: specifies the medom used. the default value is/dev/medom. Of course, here our medom is automatically detected and configured by wvdialconf, so we can ignore this variable.

Band = 57600: the baud rate between wvdial and modem, which can be ignored above.

Area Code = xxxx: set the Area Code

Dial Prefix = x: If you are using an extension, you can set this value to 9 when you need to Dial 9 for an external line.

Username = xxxx: Username used for logon

Passwd = xxxxxx: logon password

Phone = xxxxx: number dialed

PPPP Path =: set the Path of pppd. the default value is/usr/sbin/pppd.

Force Address = x. x: sets a static IP Address. Generally, the isp will assign you a dynamic IP Address.

New PPPD = 1 or 0: pppd 2.3.0 and later versions require the/etc/ppp/peers/wvdial file. if your pppd version is 2.3.0 or later, set it to 1.

Auto Reconnect = on: whether to automatically Reconnect when disconnected. the default value is yes.

The above are only common options in wvdial. conf. for details, refer to the wvdial manual.

[1] [2] Next page

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.