LinuxSir.cn,穿越时空的Linuxsir!

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

S3C2410+linux2.4下GPRS拨号能通,却PING不到外网,何解?

[复制链接]
发表于 2008-7-21 17:47:50 | 显示全部楼层 |阅读模式
S3C2410+linux2.4,使用PPPD和CHAT实现GPRS拨号,手机卡是动感地带的,接入点选了CMNET
PPP0的IP都已经成功分配了,为何还PING不通,默认路由也加了(route add default ppp0),请教各位大大!

# ifconfig
ppp0      Link encapoint-Point Protocol  
          inet addr:10.165.203.49  P-t-P:221.177.160.162  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:64 (64.0 b)  TX bytes:1937 (1.8 kb)

# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
221.177.160.162 *               255.255.255.255 UH    0      0        0 ppp0
default         221.177.160.162 0.0.0.0         UG    0      0        0 ppp0

# ping 10.165.203.49
PING 10.165.203.49 (10.165.203.49): 56 data bytes
ping: sendto: Invalid argument

# ping 221.177.160.162
PING 221.177.160.162 (221.177.160.162): 56 data bytes
--- 221.177.160.162 ping statistics ---
22 packets transmitted, 0 packets received, 10000000000acket loss


拨号相关脚本:

options:

/dev/ttyS0
115200
lock
modem
defaultroute
nocrtscts
connect "/root/ppp/ppp-on"
noipdefault
usepeerdns
user "pap"
password "pap"

ppp-on:

#!/bin/sh
TELEPHONE=*99***1#
LOCAL_IP=0.0.0.0
REMOTE_IP=0.0.0.0
NETMASK=255.255.255.0
export TELEPHONE
DIALER_SCRIPT=/root/ppp/ppp-on-dialer
exec /usr/sbin/pppd debug /dev/ttyS0 115200 \
$LOCAL_IPREMOTE_IP connect $DIALER_SCRIPT

PS:能拨通的话,脚本应该没有问题吧?
发表于 2008-9-24 21:42:22 | 显示全部楼层
路由添加不对
应该是route add default gw 221.177.160.162 netmask 255.255.255.255 dev ppp0
Destination         Gateway    Genmask          Flags Metric Ref   Use Iface
221.177.160.162  *        255.255.255.255 UH 0 0 0 ppp0
default         221.177.160.162   0.0.0.0      UG 0 0 0 ppp0

一般来说拨号之后都是点到点,掩码是4个255的。我用的cdma,拨号就是这样的,我想gprs应该差不多吧
回复 支持 反对

使用道具 举报

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

本版积分规则

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