大家好,我在使用redhat 9 的pppd拨号时,总是无法拨上去,提示信息如下:
[root@localhost /]# pppd file /etc/ppp/peers/gprs
pppd options in effect:
debug           # (from /etc/ppp/peers/gprs)
kdebug 7                # (from /etc/ppp/peers/gprs)
nodetach                # (from /etc/ppp/peers/gprs)
dump            # (from /etc/ppp/peers/gprs)
-pap            # (from /etc/ppp/peers/gprs)
papcrypt                # (from /etc/ppp/peers/gprs)
/dev/ttyS0              # (from /etc/ppp/peers/gprs)
115200          # (from /etc/ppp/peers/gprs)
lock            # (from /etc/ppp/options)
connect /etc/ppp/peers/gprs-connect-chat                # (from /etc/ppp/peers/gprs)
disconnect /etc/ppp/peers/gprs-disconnect-chat          # (from /etc/ppp/peers/gprs)
-crtscts                # (from /etc/ppp/peers/gprs)
local           # (from /etc/ppp/peers/gprs)
asyncmap 0              # (from /etc/ppp/peers/gprs)
nomagic         # (from /etc/ppp/peers/gprs)
receive-all             # (from /etc/ppp/peers/gprs)
novj            # (from /etc/ppp/peers/gprs)
novjccomp               # (from /etc/ppp/peers/gprs)
ipcp-accept-local               # (from /etc/ppp/peers/gprs)
ipcp-accept-remote              # (from /etc/ppp/peers/gprs)
defaultroute            # (from /etc/ppp/peers/gprs)
usepeerdns              # (from /etc/ppp/peers/gprs)
:               # (from /etc/ppp/peers/gprs)
nodeflate               # (from /etc/ppp/peers/gprs)
Press CTRL-C to close the connection at any stage!
defining PDP context...
AT
OK
ATS0
OK
AT+CGDCONT=1,"IP","UNIWAP"
OK
AT+CGCLASS="B"
OK
waiting up to 2 mintues for connect...

ATDT*99***1#
CONNECT
Connected. now logging in...

If the following ppp negotiations fail,
try restarting the phone.

Serial connection established.
using channel 48
Using interface ppp0
Connect: ppp0 <--> /dev/ttyS0
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <pcomp> <accomp>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x1 <mru 1500> <asyncmap 0x0> <pcomp> <accomp> <auth pap>]
sent [LCP ConfRej id=0x1 <auth pap>]
rcvd [LCP ConfReq id=0x2 <mru 1500> <asyncmap 0x0> <pcomp> <accomp>]
sent [LCP ConfAck id=0x2 <mru 1500> <asyncmap 0x0> <pcomp> <accomp>]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
rcvd [LCP TermReq id=0x3]
LCP terminated by peer
sent [LCP TermAck id=0x3]
Connection terminated.
Serial link disconnected.
[root@localhost /]#


其中:
rcvd [LCP ConfReq id=0x1 <mru 1500> <asyncmap 0x0> <pcomp> <accomp> <auth pap>]
sent [LCP ConfRej id=0x1 <auth pap>]
两句信息提示配置pap验证总是发出拒绝,不知错在哪里?请大家帮忙,谢谢。
还有,我下面的脚本该如何修改?才能正确配置pppd的选项,脚本如下:

gprs文件:

# File:
# /etc/ppp/gprs
#
# Description:
# This file holds the serial cable and IrDA pppd options for GPRS phones
# Tell the ppp-daemon to accept mangled data

receive-all
# Give some debug info
debug
kdebug 7
# Print out all the option values which have been set.
dump
# Serial device to which terminal is connected;
# with serial port (COM1 in Windows) use /dev/ttyS0
# and with IrDA use /dev/ircomm0.
#/dev/ircomm0 # IrDA

/dev/ttyS0 # serial cable (NOTE: 这个为真正用的串口,比如/dev/ttyS0)

# Serial port line speed
115200
# Turn off waiting of carrier detect or flow control signal
# With IrDA it should be disabled with nocrtscts option.

-crtscts # serial cable
#nocrtscts # IrDA
# Ignore carrier detect signal from the modem

local
# To keep pppd on the terminal
nodetach
# Accept the peer's idea of our local IP address
ipcp-accept-local
# Accept the peer's idea of its (remote) IP address
ipcp-accept-remote
# 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

0.0.0.0:0.0.0.0
#-chap
-pap
# pppd must not propose any IP address to the peer!
#noipdefault
# No ppp compression

novj
novjccomp
papcrypt
nodeflate
#No ppp magic number
nomagic
# no asyn cmap
asyncmap 0
# Add default route
defaultroute
#Auto get IP address
usepeerdns
# Connect script
connect /etc/ppp/peers/gprs-connect-chat
# Disconnect script
disconnect /etc/ppp/peers/gprs-disconnect-chat

gprs-connect-chat文件:

#!/bin/sh
#
# File:
# /etc/ppp/gprs-connect-chat
#
# Description:
# chat script to open Sonera GPRS service with GPRS phones. If ppp
# negotiation stalls, try restarting the phone. To try with other GPRS
# operator setting, change the PDP contex setting. The settings work with
# all Ericsson models, but Nokia 8310 does not suppor QoS parameters with
# AT commands, so just delete those lines and it'll work.
#
# Set PDP context CID=1, protocol=IP, APN=internet:
# AT+CGDCONT=1,"IP","internet","",0,0
#
# Set CID=1 QoS requirements from the network, not supported by 8310:
# AT+CGQREQ=1,0,0,0,0,0
#
# Set CID=1 minimum acceptable QoS parameters, not supported by 8310:
# AT+CGQMIN=1,0,0,0,0,0
#
# 'Call' CID=1 (activate PDP context one, perform GPRS attach):
# ATD*99***1#
#
# ogin:-BREAK-ogin:
# TIMEOUT 5
# assword:
# SAY "\nLogged in OK...\n"
# The actual chat script:

exec chat \
TIMEOUT 5 \
ECHO ON \
ABORT 'BUSY' \
ABORT 'ERROR' \
ABORT 'NO ANSWER' \
ABORT 'NO CARRIER' \
ABORT 'NO DIALTONE' \
ABORT 'RINGING' \
'' AT \
TIMEOUT 12 \
SAY "Press CTRL-C to close the connection at any stage!" \
SAY "\ndefining PDP context...\n" \
OK ATE0 \
OK ATS0 \
OK 'AT+CGDCONT=1,"IP","UNIWAP"' \
OK 'AT+CGCLASS="B"' \
OK ATDT*99***1# \
TIMEOUT 120 \
SAY "\nwaiting up to 2 mintues for connect...\n" \
CONNECT "" \
SAY "\nConnected. now logging in...\n" \
SAY "\nIf the following ppp negotiations fail,\n" \
SAY "try restarting the phone.\n" \
# NOTE: PDP context可能会因你的猫不同而有所区别,查它的手册来写吧

gprs-disconnect-chat文件:

#!/bin/sh
#
# File:
# /etc/ppp/gprs-disconnect-chat
#
# send break

exec /usr/sbin/chat -V -s -S
ABORT "BUSY"
ABORT "ERROR"
ABORT "NO DIALTONE"
SAY "\nSending break to the modem\n"
"" "\K"
"" "+++ATH"
SAY "\nPDP context detached\n"

pap-secrets文件:

# File:
#/etc/ppp/pap-secrets
# Secrets for authentication using PAP
# client server secret IP addresses
####### redhat-config-network will overwrite this part!!! (begin) ##########
####### redhat-config-network will overwrite this part!!! (end) ############

foo * "" *

options文件:

# File:
# /etc/ppp/options
#
receive-all
nopcomp
noaccomp
nomagic
debug
# Mobile is connected to the first serial port
/dev/ttyS0 # (NOTE: 这个地方你要改为真正的你用的串口,比如/dev/ttyS0)
115200
connect '/usr/sbin/chat -e -f /etc/ppp/gprs-connect-chat -v'
disconnect '/usr/sbin/chat -e -f /etc/ppp/chat-disconnect -v'
modem
noauth
noccp
novj
novjccomp
defaultroute
noipdefault
user foo #(NOTE:这个很重要,windows下拨号可以不用用户名,但Linux不行,所以我们骗linux一下,设一个假的好了,另外,还要参见/etc/pap-secrets,呵呵)
lock

-------------------------------------------------------------------------------------------
 
 
问题解决了,我放错目录了。