现在的位置: 首页 > 综合 > 正文

牛人告知的GPRS脚本拨号上网方法

2013年06月19日 ⁄ 综合 ⁄ 共 2177字 ⁄ 字号 评论关闭
Can work in RedHat 9.0 version,

1. edit /etc/resolv.conf, add DNS server like:

nameserver 211.136.20.203
nameserver 211.136.20.203

2. add gprs.conf in directory /etc/ppp/peers/ as following

3. pppd call gprs.conf &

Now, enjoy the internet.

/////////////////////////////////////////////////////////////////////////////////////////

# File:
# gprs.conf
#
# Keep pppd attached to the terminal:
# Comment this to get daemon mode pppd
nodetach

# Debug info from pppd:
# Comment this off, if you don't need more info
#debug kdebug 7

# Show password in debug messages
show-password

connect "/usr/bin/wvdial --chat --config /etc/ppp/peers/gprs-wvdial.conf GPRS"

# Serial device to which the GPRS phone is connected:
/dev/ttyS0# virtual data port

# Serial port line speed
115200# fast enough

# Hardware flow control:
# Use hardware flow control with cable, Bluetooth and USB but not with IrDA.
#crtscts # serial cable, Bluetooth and USB
nocrtscts # IrDA

# Ignore carrier detect signal from the modem:
local

# IP addresses:
# - accept peers idea of our local address and set address peer as 10.0.0.1
# (any address would do, since IPCP gives 0.0.0.0 to it)
# - if you use the 10. network at home or something and pppd rejects it,
# change the address to something else
#:10.0.0.1

# pppd must not propose any IP address to the peer!
noipdefault

# Accept peers idea of our local address
ipcp-accept-local

# Add the ppp interface as default route to the IP routing table
defaultroute

# DNS servers from the phone:
# some phones support this, some don't.
usepeerdns

# ppp compression:
# ppp compression may be used between the phone and the pppd, but the
# serial connection is usually not the bottleneck in GPRS, so the
# compression is useless (and with some phones need to disabled before
# the LCP negotiations succeed).
novj
nobsdcomp
novjccomp
nopcomp
noaccomp

# The phone is not required to authenticate:
noauth

# Username and password:
# If username and password are required by the APN, put here the username
# and put the username-password combination to the secrets file:
# /etc/ppp/pap-secrets for PAP and /etc/ppp/chap-secrets for CHAP
# authentication. See pppd man pages for details.
# Example, Radiolinja operator pap-secrets:
# "rlnet" * "internet"*
user "cmnet"

# Asyncmap:
# some phones may require this option.
asyncmap 0xa0000
#asyncmap 0

# No magic:
# some phones may require this option.
nomagic

# Require PAP authentication:
# some phones may require this option.
#require-pap

//////////////////////////////////////////////////////////////////////////////////////////

抱歉!评论已关闭.