LinuxSir.cn,穿越时空的Linuxsir!

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

ppp拨号只能动态获取ip?,认证成功后,还作了些什么?

[复制链接]
发表于 2006-12-14 15:50:45 | 显示全部楼层 |阅读模式
在开发板进行拨号测试
在/var/log/messages下的log如下
remote messages: login ok
could not determine remote ip address  /*未知远程ip*/
removing resolv.conf for 0.0.0.0
unable to create temporary file
connect terminated
connect time 0.1 minutes
sent 112 bytes,recieved 112 bytes
exit.


曾经试过通过
10.142.27.66:10.142.0.1
指定ip,但是,ppp0是up了,ip地址确ping不通任何一个外网ip.
所以,是不是linux下,gprs拨号,只能动态的获取ip ?

最初看这个错误,小弟怀疑是因为根文件系统read-only的缘故。
但是,有些时候,又莫名其妙拨得上去了。所以,应该是不是上述缘故。
所以,小弟请教:pap认证成功后,pppd进程还作了什么?ppp0 up,设置ip,gw ,dns
unable to create temporary file


要创建什么临时文件?
还请大侠们帮帮忙啊!!
 楼主| 发表于 2006-12-15 08:44:20 | 显示全部楼层
忘记贴出options文件了

  1. receive-all
  2. /dev/ttyS1
  3. 38400
  4. -mn
  5. debug
  6. nocrtscts
  7. local
  8. ipcp-accept-local
  9. ipcp-accept-remote
  10. asyncmap 20A0000
  11. escape FF
  12. kdebug 0
  13. lcp-max-configure 30
  14. auth
  15. -chap
  16. user john_doe
  17. usepeerdns
  18. noipdefault
  19. defaultroute
  20. netmask 255.255.255.0
  21. connect '/etc/ppp/ppp-on-dialer'
  22. lock
复制代码
回复 支持 反对

使用道具 举报

发表于 2006-12-15 09:59:20 | 显示全部楼层
ppp可以指定ip地址。

ppp协议up之后,会自动生成一条到对端的静态路由。看messages,并没有获取到对端的IP地址,问题应该就出在这里。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-12-15 10:21:54 | 显示全部楼层
Post by xw_xiao
ppp可以指定ip地址。

ppp协议up之后,会自动生成一条到对端的静态路由。看messages,并没有获取到对端的IP地址,问题应该就出在这里。

谢谢xw_xiao兄关注,小弟试过指定remote ip,/etc/options 中
10.142.27.66:10.142.0.1(这个ip也是小弟曾经拨上去后,获取得到的ip)
指定remote ip 和 local ip

但是,这样是可以拨上去,但是,小弟这个ip无效 ping不通外部 (如果想指派ip,估计得和移动协商,不可取阿)

另外,偶尔可以拨上去。不晓得是什么缘故了
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-12-15 13:34:26 | 显示全部楼层
在options 这样设定
10.142.27.81:10.142.0.1
local ip和remote ip后,怎么gw ip全被设定为10.142.27.81了?
route -N
[php]
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.142.27.81    0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
127.0.0.0       0.0.0.0         255.255.255.0   U     0      0        0 lo
0.0.0.0         10.142.27.81    0.0.0.0         UG    0      0        0 ppp0
[/php]

ifconfig
[php]
ppp0      Link encapoint-to-Point Protocol
          inet addr:10.142.27.81  P-t-P:10.142.27.81  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:6 errors:1 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
[/php]
回复 支持 反对

使用道具 举报

发表于 2006-12-18 13:37:09 | 显示全部楼层
拨号方不需要指定remote ip,只需要设置自己的ip即可。

P-t-P:这里应该是ppp对端的ip地址的。从这里看,最后的那条默认网关就是正确的。

用pppstats ppp0看看ppp状态。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-12-19 14:49:13 | 显示全部楼层
拨号方不需要指定remote ip,只需要设置自己的ip即可
如果不指定remote ip address,那么could not determine remote ip address这个错误就一直存在
但是,如果静态指定remote ip address,local ip address.比如现在
  1. Destination     Gateway         Genmask         Flags Metric Ref    Use Iface   
  2. 10.142.0.1      0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
  3. 192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
  4. 127.0.0.0       0.0.0.0         255.255.255.0   U     0      0        0 lo
  5. 0.0.0.0         10.142.0.1    0.0.0.0         UG    0      0        0 ppp0
复制代码

ifconfig:
  1. ppp0      Link encap:Point-to-Point Protocol
  2.           inet addr:10.142.27.81  P-t-P:10.142.0.1  Mask:255.255.255.255
  3.           UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
  4.           RX packets:6 errors:1 dropped:0 overruns:0 frame:0
  5.           TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
  6.           collisions:0 txqueuelen:3
复制代码

但是,ping不通外部ip!不晓得是什么原因了
回复 支持 反对

使用道具 举报

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

本版积分规则

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