ubuntu -- mf210v拨号流程

 

1 脚本建立

Root权限进入Ubuntu,在 /etc/ppp/ 下面建立两个目录,如果有就不需要建立了。直接把脚本放进去或者建立新文件即可。

cd /etc/ppp

mkdir peers chat

cd peers

touch wcdma-mf210

vim wcdma-mf210

wcdma-mf210里填写脚本如下:

 

#******************************************************************#

# /etc/ppp/peers/wcdma-mf210                                       #

# this is ppp script for use chinaunicom's WCDMA data service      #

#                                                                  #

# Hangzhou Visure Electronics Technology Co., Ltd                  #

# Room 606, Zijingang business Building, #656 Gudun Road, Hangzhou #

# TEL: 0571-81021669                                               #

# FAX: 0571-81021670                                               #

# More information: manuals, hardware and software on:             #

# www.visure.com.cn                                                #

#******************************************************************#

 

/dev/ttyUSB3

115200

crtscts

connect '/usr/sbin/chat -v -f /etc/ppp/chat/wcdma-connect-chat'

debug

nodetach

ipcp-accept-local

ipcp-accept-remote

defaultroute

usepeerdns

 

# end of wcdma-mf210

 

 

cd chat

touch wcdma-connect-chat

vim wcdma-connect-chat

wcdma-connect-chat里填写如下:

 

#******************************************************************#

# /etc/ppp/chat/wcdma-connect-chat                                 #

# this is the chat script for unicom                               #

#                                                                  #

# Hangzhou Visure Electronics Technology Co., Ltd                  #

# Room 606, Zijingang business Building, #656 Gudun Road, Hangzhou #

# TEL: 0571-81021669                                               #

# FAX: 0571-81021670                                               #

# More information: manuals, hardware and software on:             #

# www.visure.com.cn                                                #

# *****************************************************************#

 

ABORT "NO CARRIER"

ABORT "NO DIALTONE"

ABORT "ERROR"

ABORT "NO ANSWER"

ABORT "BUSY"

TIMEOUT 120

"" AT

OK "AT+CGDCONT=1,\"IP\",\"3GNET\""

OK ATD*99#

CONNECT

 

# end of wcdma-connect-chat

 

在终端输入 pppd call wcdma-mf210 Enter(回车)即可。

测试拨号成功与否,在终端里(需要另开一终端!!!)打入ifconfig,查看是否有ppp0连接,如图3-3所示:

 

2 拨号成功后,设置域名服务器

cd /etc

vim resolv.conf

 /etc/resolv.conf文件是存放域名服务器地址的地方,它的内容看起来是这样的:

-------------------------------------------

domain   your.isp.domain.name

nameserver   202.96.171.92

nameserver   202.96.171.133

-------------------------------------------

你所需做的就是把你的ISP的域名服务器地址填到这个文件里。DNS是拨号以后自动

分配的,从图3-2 ppp协商过程中最后几行可以得到DNS, 因所在地方而异,在我这里设置为:

 nameserver  211.136.17.108

nameserver  211.136.20.204

 

ping 命令测试,此命令需要设置DNS。请确认在/etc/resolv.conf里已经正确设置DNS

 

你可能感兴趣的:(ubuntu)