Chinaunix
标题:
linux中rp-pppoe配置好了,拨号连接网络成功,为什么ping不通公网ip呢?
[打印本页]
作者:
herocsz
时间:
2009-12-18 12:36
标题:
linux中rp-pppoe配置好了,拨号连接网络成功,为什么ping不通公网ip呢?
本帖最后由 herocsz 于 2012-04-18 10:26 编辑
我用pppoe拨号上网,登陆的是电信的无线网络,拨号已经成功了,ip也正确获得的,可是在ping公网的ip的时候却ping不通,请问怎么回事?谢谢!
我没有用防火墙。
/usr/sbin # ifconfig
wlan0 Link encap:Ethernet HWaddr 00:FD:07:94:7A:A6
inet addr:115.194.28.21 Bcast:115.194.31.255 Mask:255.255.252.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:236 errors:0 dropped:0 overruns:0 frame:0
TX packets:219 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:22267 (21.7 KiB) TX bytes:24594 (24.0 KiB)
ppp0 Link encap: Point-to-Point Protocol
inet addr:60.176.145.255 P-t-P:61.130.120.140 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:5 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:134 (134.0 B) TX bytes:61 (61.0 B)
/usr/sbin # route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
61.130.120.140 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
115.194.28.0 0.0.0.0 255.255.252.0 U 0 0 0 wlan0
0.0.0.0 115.194.28.1 0.0.0.0 UG 0 0 0 wlan0
然后我ping公网ip(60.176.145.255 是网易的ip)
/usr/sbin # ping 60.176.145.255
PING 60.176.145.255 (60.176.145.255): 56 data bytes
[
本帖最后由 herocsz 于 2009-12-18 13:17 编辑
]
作者:
h101com
时间:
2009-12-18 13:24
没遇到过,是完全不能上网?
作者:
herocsz
时间:
2009-12-18 13:35
ping不通,肯定不能上网咯~
作者:
testvpn
时间:
2009-12-18 13:40
换个地址ping下试试。
不明白为什么你的ppp0是60.176.145.255,这不是你要ping的目的地址吗
作者:
andypeker
时间:
2009-12-22 18:38
标题:
最近的网关是什么IP地址嘛?从最近的开始ping嘛!
最近的网关是什么IP地址嘛?从最近的开始ping嘛!
作者:
ghp268
时间:
2009-12-22 21:38
楼主能上网么
PPP0的IP地址60.176.145.255,这个有点问题,如果分配的是C类地址
这个地址代表的是广播地址,是不能分配给主机的
作者:
chenyx
时间:
2009-12-22 22:06
默认网关应该指向ppp0啊,为什么会指向eth0
作者:
herocsz
时间:
2009-12-25 15:52
本帖最后由 herocsz 于 2012-04-18 11:13 编辑
问题已经解决了,是默认路由不对,需要重新设置默认路由为ppp0
默认路由设置好后,就可以访问外网了
功力又增加了一重
作者:
liuhao198510
时间:
2010-03-25 22:37
好像没清ip表,可以尝试着 ifconfig eth0 down 然后ping一下
作者:
liuhao198510
时间:
2010-03-25 22:38
怎么解决的 说出来撒
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2