emos
发表于 2005-2-21 15:28:09
问题一样,能连接,打不开网页
这是我连接成功时的route table
root@slax:~# netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Windowirtt Iface
222.77.98.1 * 255.255.255.255 UH 0 0 0 ppp0
loopback * 255.0.0.0 U 0 0 0 lo
帮我看看问题出在哪儿?
linky_fan
发表于 2005-2-22 19:15:53
dns和默认网关有没有问题?
emos
发表于 2005-2-23 21:45:21
dns和默认网关有没有问题?
dns我设置为"server"
默认网关有没有问题我看不大懂,下面贴出我设置的过程:
root@slax:~# adsl-start
.. Connected! (可以成功接通)
root@slax:~# ping www.yahoo.com.cn
ping: unknown host www.yahoo.com.cn (ping不通)
root@slax:~# netstat -nr (察看路由表)
Kernel IP routing table
Destination Gateway Genmask Flags MSS Windowirtt Iface
222.77.98.1 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 222.77.98.1 0.0.0.0 UG 0 0 0 ppp0
(这表俺看不大明白)
root@slax:~# ifconfig -a (紧接着看这个)
eth0 Link encap:EthernetHWaddr 00:20:ED:31:72:61
UP BROADCAST RUNNING MULTICASTMTU:1500Metric:1
RX packets:28 errors:0 dropped:0 overruns:0 frame:0
TX packets:26 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4022 (3.9 Kb)TX bytes:3555 (3.4 Kb)
Interrupt:11 Base address:0x6000
lo Link encap:Local Loopback
inet addr:127.0.0.1Mask:255.0.0.0
UP LOOPBACK RUNNINGMTU:16436Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b)TX bytes:0 (0.0 b)
ppp0 Link encap:Point-to-Point Protocol
inet addr:222.77.98.155P-t-P:222.77.98.1Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICASTMTU:1492Metric:1
RX packets:16 errors:0 dropped:0 overruns:0 frame:0
TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:2830 (2.7 Kb)TX bytes:550 (550.0 b)
(可以看出IP分配了,但是inet addr是222.77.98.155,而route table里面的"Gateway没有这个IP地址,我对网关这类知识太懂,好象看过坛子里一篇帖子说把inet addr设为默认gw,于是接着干...)
root@slax:~# route add default gw 222.77.98.155 (把inet addr添加为默认网关。是这样做么?我学linux不到一礼拜,绝对菜鸟。)
root@slax:~# netstat -nr (紧接着再察看route table)
Kernel IP routing table
Destination Gateway Genmask Flags MSS Windowirtt Iface
222.77.98.1 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 222.77.98.155 0.0.0.0 UG 0 0 0 ppp0
0.0.0.0 222.77.98.1 0.0.0.0 UG 0 0 0 ppp0
(变成这样,有出现gw 222.77.98.155,但是看不明白这表有什么问题,望前辈们指出)
root@slax:~# host www.yahoo.com.cn-bash: host: command not found
root@slax:~# dos www.yahoo.com.cn
-bash: dos: command not found (俺对命令不熟悉,隐约记得好象是"host + 域名"得到IP,结果不是 )
root@slax:~# ping www.yahoo.com.cn(接着PING)
ping: unknown host www.yahoo.com.cn (NND! 还是不行)
root@slax:~# route del default (尝试这个,也是论坛里看过)
root@slax:~# netstat -nr (再看表)
Kernel IP routing table
Destination Gateway Genmask Flags MSS Windowirtt Iface
222.77.98.1 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 222.77.98.1 0.0.0.0 UG 0 0 0 ppp0
(好象没什么变化?)
root@slax:~# adsl-stop (断开)
Killing pppd (3994)
Killing adsl-connect (3976)
root@slax:~#
root@slax:~#
root@slax:~#
root@slax:~#
root@slax:~#
root@slax:~#
root@slax:~# netstat -nr (看路由表)
Kernel IP routing table
Destination Gateway Genmask Flags MSS Windowirtt Iface
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
root@slax:~# route del default (现在完全是瞎整了... :P)
SIOCDELRT: 没有那个进程 (断开了连接就没route进程了?知识不够阿)
root@slax:~# adsl-start (再连上整整看)
. Connected!
root@slax:~# netstat -nr (看route table)
Kernel IP routing table
Destination Gateway Genmask Flags MSS Windowirtt Iface
222.77.98.1 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 222.77.98.1 0.0.0.0 UG 0 0 0 ppp0
(好象有点不同?)
root@slax:~# ifconfig -a(看看连接状态报告)
eth0 Link encap:EthernetHWaddr 00:20:ED:31:72:61
UP BROADCAST RUNNING MULTICASTMTU:1500Metric:1
RX packets:95 errors:0 dropped:0 overruns:0 frame:0
TX packets:67 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:10592 (10.3 Kb)TX bytes:5413 (5.2 Kb)
Interrupt:11 Base address:0x6000
lo Link encap:Local Loopback
inet addr:127.0.0.1Mask:255.0.0.0
UP LOOPBACK RUNNINGMTU:16436Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b)TX bytes:0 (0.0 b)
ppp0 Link encap:Point-to-Point Protocol
inet addr:222.77.98.155P-t-P:222.77.98.1Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICASTMTU:1492Metric:1
RX packets:3 errors:0 dropped:0 overruns:0 frame:0
TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:54 (54.0 b)TX bytes:54 (54.0 b)
(好象正常?)
root@slax:~# route add default gw
Usage: inet_route [-vF] del {-host|-net} Target [ If]
inet_route [-vF] add {-host|-net} Target
[ If]
inet_route [-vF] add {-host|-net} Target reject
inet_route [-FC] flush NOT supported
root@slax:~# route add default gw 222.77.98.155(再试试看)
root@slax:~# route (看表格)
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
222.77.98.1 * 255.255.255.255 UH 0 0 0 ppp0
loopback * 255.0.0.0 U 0 0 0 lo
route add defaudefault 222.77.98.155 0.0.0.0 UG 0 00 ppp0
default 222.77.98.1 0.0.0.0 UG 0 0 0 ppp0
(咦?好象怪怪的阿?)
root@slax:~# route del default (又乱整)
root@slax:~# routee
-bash: routee: command not found
root@slax:~# route (看表)
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
222.77.98.1 * 255.255.255.255 UH 0 0 0 ppp0
loopback * 255.0.0.0 U 0 0 0 lo
default 222.77.98.1 0.0.0.0 UG 0 0 0 ppp0
root@slax:~#
(整到这儿,累了...保存整个过程贴这儿来了,希望得到前辈帮助。谢谢)
linky_fan
发表于 2005-2-24 11:23:53
你用的是fanx还是slax, 在这两个版本上使用pppoe是有问题的, 以前我用过的, 试了n种方法都没用, 后来只好换了个路由器 :cry:
emos
发表于 2005-3-1 22:57:46
你用的是fanx还是slax, 在这两个版本上使用pppoe是有问题的, 以前我用过的, 试了n种方法都没用, 后来只好换了个路由器 :cry:
我用的是fanX0.2.0也就是Slax的汉化版本,这个发行版不能用adsl上网吗?不是吧?! :cry:
黑暗哭泣
发表于 2005-3-2 11:00:54
dns是域名解析,如果没有设对的话就不能通过输入网址,比如www.linuxfans.org,来访问网站,但可以通过输入IP地址来上网,也可以上QQ。