自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

linux下用wvdial實(shí)現(xiàn)gprs撥號(hào)上網(wǎng)

運(yùn)維 系統(tǒng)運(yùn)維
本文講述了linux下用wvdial實(shí)現(xiàn)gprs撥號(hào)上網(wǎng)的方法......

1. 安裝wvdial

sudo apt-get install wvdial

2. 在/etc/wvdial.conf中寫入wvdial的配置信息: femacs /etc/wvdial.conf

Init1 = ATZ

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

Init3 = AT+CGDCONT=1,"IP","CMNET"  ##important! 否則無法使用DNS

Modem Type = Analog Modem

Baud = 115200  ##根據(jù)你的gprs modem來設(shè)定

New PPPD = yes

Modem = /dev/ttyS0 ##你所連接的串口

ISDN = 0

Phone = *99***1#  ##中國(guó)移動(dòng)的撥號(hào)號(hào)碼

Password = ***    ##其實(shí)沒什么用

Username = itlanger

這一步,可以首先運(yùn)行wvdial,這時(shí)會(huì)出現(xiàn)找不到modem,然后修改/etc/wvdial.conf, 增加

Baud = 115200  ##根據(jù)你的gprs modem來設(shè)定

Modem = /dev/ttyS0 ##你所連接的串口

然后再次運(yùn)行wvdial, 再手動(dòng)加入一下內(nèi)容到/etc/wvdial.conf:

Init3 = AT+CGDCONT=1,"IP","CMNET"

Phone = *99***1#  ##中國(guó)移動(dòng)的撥號(hào)號(hào)碼

Password = ***    ##其實(shí)沒什么用

Username = itlanger

這里Init3 = AT+CGDCONT=1,"IP","CMNET" 一定要加,否則wvdial撥號(hào)時(shí)會(huì)出現(xiàn):

warning, can't find address for `www.suse.de`

--> warning, address lookup does not work

--> Nameserver (DNS) failure, the connection may not work.

導(dǎo)致只能ping通IP,不能ping通域名

3. 配置ppp參數(shù): femacs /etc/ppp/options

noipdefault

ipcp-accept-local

ipcp-accept-remote

defaultroute

noauth

crtscts

debug

4.撥號(hào)上網(wǎng): sudo wvdial

--> WvDial: Internet dialer version 1.60

--> 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

--> Sending: AT+CGDCONT=1,"IP","CMNET"

AT+CGDCONT=1,"IP","CMNET"

OK

--> Modem initialized.

--> Sending: ATDT*99***1#

--> Waiting for carrier.

ATDT*99***1#

CONNECT

~[7f]}#@!}!}#} }9}"}&} }*} } }'}"}(}"}%}&K_{}$}#}%B#}%<e~

--> Carrier detected.  Waiting for prompt.

~[7f]}#@!}!}#} }9}"}&} }*} } }'}"}(}"}%}&K_{}$}#}%B#}%<e~

--> PPP negotiation detected.

--> Starting pppd at Tue Dec 15 11:19:14 2009

--> Pid of pppd: 6666

--> Using interface ppp0

--> Authentication (CHAP) started

--> Authentication (CHAP) successful

--> local  IP address 10.24.229.233

--> remote IP address 192.168.254.254

--> primary   DNS address 211.137.160.5

--> secondary DNS address 211.136.17.107

--> Script /etc/ppp/ip-up run successful

--> Default route Ok.

--> Nameserver (DNS) Ok.

--> Connected... Press Ctrl-C to disconnect

4. 斷開以太網(wǎng)連接:

sudo ifconfig eth0 down

sudo route add default gw 10.24.229.233 ##這里是ppp0的IP

5. 測(cè)試網(wǎng)絡(luò):

ping 60.28.166.84

ping www.chinaunix.net

如果ping不通域名,可以cat /etc/resolv.conf

然后寫入撥號(hào)獲得的DNS
 

【編輯推薦】

  1. Linux環(huán)境下雙網(wǎng)卡主機(jī)路由配置
  2. linux下如何破解windows密碼
  3. Linux下配置JDK和Tomcat
責(zé)任編輯:趙寧寧 來源: chinaitlab
相關(guān)推薦

2009-01-12 17:00:40

服務(wù)器虛擬化Linux

2010-04-26 14:22:03

Unix配置

2009-12-28 11:04:29

ADSL撥號(hào)上網(wǎng)

2009-01-07 09:19:00

2009-06-26 11:43:00

2015-05-14 14:27:39

撥號(hào)上網(wǎng)

2009-12-29 11:11:19

2010-01-08 15:21:06

Ubuntu ADSL

2009-09-10 11:01:51

如何路由器設(shè)置自動(dòng)撥號(hào)

2011-11-04 10:39:31

AOL撥號(hào)上網(wǎng)

2013-10-16 13:55:03

wi-fi無線網(wǎng)絡(luò)

2010-05-14 11:46:53

Windows 7撥號(hào)設(shè)置

2009-11-10 10:43:42

2009-12-09 11:45:51

SUSELinuxADSL

2009-11-16 09:50:59

2011-03-14 16:46:40

Linuxiptables上網(wǎng)

2009-06-25 09:49:00

Windows XPADSL撥號(hào)

2010-09-03 09:57:08

PPPDGPRS

2024-07-22 15:22:04

2009-06-22 10:09:18

LinuxADSL撥號(hào)
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)