LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 925|回复: 2

求教关于GPRS模块通过PPP拨号上网的问题

[复制链接]
发表于 2007-1-24 00:35:07 | 显示全部楼层 |阅读模式
我修改了ppp-on,ppp-off和ppp-on-dialer三个脚本,现在已经显示连接上了,但是却打不开网页啊,请问这是怎么回事啊,谢谢!下面是ppp-on和ppp-on-dialer脚本
ppp-on:
#!/bin/sh
#
# Script to initiate a ppp connection. This is the first part of the
# pair of scripts. This is not a secure pair of scripts as the codes
# are visible with the 'ps' command.  However, it is simple.
#
# These are the parameters. Change as needed.
TELEPHONE=*99***1#        # The telephone number for the connection
ACCOUNT=                # The account name for logon (as in 'George Burns')
PASSWORD=                # The password for this account (and 'Gracie Allen')
LOCAL_IP=0.0.0.0        # Local IP address if known. Dynamic = 0.0.0.0
REMOTE_IP=0.0.0.0        # Remote IP address if desired. Normally 0.0.0.0
NETMASK=255.255.255.0        # The proper netmask if needed
#
# Export them so that they will be available at 'ppp-on-dialer' time.
export TELEPHONE ACCOUNT PASSWORD
#
# This is the location of the script which dials the phone and logs
# in.  Please use the absolute file name as the $PATH variable is not
# used on the connect option.  (To do so on a 'root' account would be
# a security hole so don't ask.)
#
DIALER_SCRIPT=/home/echo/ppp-on-dialer
#
# Initiate the connection
#
# I put most of the common options on this command. Please, don't
# forget the 'lock' option or some programs such as mgetty will not
# work. The asyncmap and escape will permit the PPP link to work with
# a telnet or rlogin connection. You are welcome to make any changes
# as desired. Don't use the 'defaultroute' option if you currently
# have a default route to an ethernet gateway.
#
exec /usr/sbin/pppd debug lock modem /dev/ttyS0 19200 \
        asyncmap 20A0000 escape FF kdebug 0 $LOCAL_IPREMOTE_IP \
        noipdefault netmask $NETMASK defaultroute connect $DIALER_SCRIPT

ppp-on-dialer:

#!/bin/sh
#
# This is part 2 of the ppp-on script. It will perform the connection
# protocol for the desired connection.
#
exec chat -v                                                \
        TIMEOUT                3                                \
        ABORT                '\nBUSY\r'                        \
        ABORT                '\nNO ANSWER\r'                        \
        ABORT                '\nRINGING\r\n\r\nRINGING\r'        \
        ''                \rAT                                \
        'OK-+++\c-OK'        ATH0                                \
        TIMEOUT                30                                \
        OK                ATDT$TELEPHONE                        \
        CONNECT                ''                        \       
        ogin:--ogin:        $ACCOUNT                        \
        assword:        $PASSWORD
发表于 2007-1-27 17:03:59 | 显示全部楼层
用ifconfig看看有没有P-t-P地址?如果有就ping这个地址看能否ping通.最好用ppp -l看看有没有获得DNS,如果有也ping看看.我开始跟你一样显像,后来多ppp -c几次就可以了
回复 支持 反对

使用道具 举报

发表于 2007-1-27 17:09:48 | 显示全部楼层
郁闷,回复半天又没有了.发邮件给我吧
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表