LinuxSir.cn,穿越时空的Linuxsir!

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

大家帮帮我,上不得网!

[复制链接]
发表于 2006-7-12 11:16:28 | 显示全部楼层 |阅读模式
我安装的是Debian,用的是中国电信的小区宽带,采用PPPoE方式拨号。在使用PPPoEconf设置并拨号后,使用ifconfig显示ppp0已经分配有了IP地址,但仍然上不得网,以下是我的 /etc/ppp/.../dsl-provider文件,大家看看有什么地方出错吗?

  1. # Configuration file for PPP, using PPP over Ethernet
  2. # to connect to a DSL provider.
  3. #
  4. # See the manual page pppd(8) for information on all the options.

  5. ##
  6. # Section 1
  7. #
  8. # Stuff to configure...

  9. # MUST CHANGE: Uncomment the following line, replacing the user@provider.net
  10. # by the DSL user name given to your by your DSL provider.
  11. # (There should be a matching entry in /etc/ppp/pap-secrets with the password.)
  12. #user myusername@myprovider.net

  13. # Use the pppoe program to send the ppp packets over the Ethernet link
  14. # This line should work fine if this computer is the only one accessing
  15. # the Internet through this DSL connection. This is the right line to use
  16. # for most people.
  17. #pty "/usr/sbin/pppoe -I eth0 -T 80 -m 1452"

  18. # An even more conservative version of the previous line, if things
  19. # don't work using -m 1452...
  20. #pty "/usr/sbin/pppoe -I eth0 -T 80 -m 1412"

  21. # If the computer connected to the Internet using pppoe is not being used
  22. # by other computers as a gateway to the Internet, you can try the following
  23. # line instead, for a small gain in speed:
  24. #pty "/usr/sbin/pppoe -I eth0 -T 80"


  25. # The following two options should work fine for most DSL users.

  26. # Assumes that your IP address is allocated dynamically
  27. # by your DSL provider...
  28. noipdefault
  29. # Try to get the name server addresses from the ISP.
  30. usepeerdns
  31. # Use this connection as the default route.
  32. # Comment out if you already have the correct default route installed.
  33. defaultroute

  34. ##
  35. # Section 2
  36. #
  37. # Uncomment if your DSL provider charges by minute connected
  38. # and you want to use demand-dialing.
  39. #
  40. # Disconnect after 300 seconds (5 minutes) of idle time.

  41. #demand
  42. #idle 300

  43. ##
  44. # Section 3
  45. #
  46. # You shouldn't need to change these options...

  47. hide-password
  48. lcp-echo-interval 20
  49. lcp-echo-failure 3
  50. # Override any connect script that may have been set in /etc/ppp/options.
  51. connect /bin/true
  52. noauth
  53. persist
  54. mru 1492

  55. # RFC 2516, paragraph 7 mandates that the following options MUST NOT be
  56. # requested and MUST be rejected if requested by the peer:
  57. # Address-and-Control-Field-Compression (ACFC)
  58. noaccomp
  59. # Asynchronous-Control-Character-Map (ACCM)
  60. default-asyncmap

  61. plugin rp-pppoe.so eth0
  62. user "bbs8209392"
复制代码
发表于 2006-7-12 19:19:10 | 显示全部楼层
DNS是否配置正确?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-7-12 23:50:12 | 显示全部楼层
应该正确,在/etc/pppd/resolve中的两个DNS地址都是正确的
回复 支持 反对

使用道具 举报

发表于 2006-7-13 01:12:37 | 显示全部楼层
得到IP没,正确么?

。还有就是看看路由设置的对不对,,,试试ping一下IP,别ping name。比如你们的DNS服务器的IP/
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-7-13 10:02:31 | 显示全部楼层
ppp0得到了一个正确的IP地址
现在似乎没有哪台服务器或电脑可以让你ping...就是在Windows底下,DNS服务器的IP都不让ping 的。。。
回复 支持 反对

使用道具 举报

发表于 2006-7-13 10:55:51 | 显示全部楼层
ping www.sina.com.cn

或是nslookup
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-7-13 19:17:09 | 显示全部楼层
ping不通,无法解析域名
回复 支持 反对

使用道具 举报

发表于 2006-7-13 19:45:05 | 显示全部楼层
ifconfig ppp0

查看一下ppp0端口的网关,(p-t-p后面的地址即是)

然后ping ''p-t-p address"

如果能ping 通,说明pppoe链路已建立,应该不是终端的问题!咨询小区宽带运行商解决!
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-7-13 23:32:58 | 显示全部楼层
可是在Windows下能上网……不过不管怎么样也要回去试试
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-7-14 10:17:15 | 显示全部楼层
这是ifconfig后得到的数据
  1. eth0      Link encap:Ethernet  HWaddr 00:E0:4C:60:BF:92  
  2.           inet addr:192.168.1.100  Bcast:192.168.1.255  Mask:255.255.255.0
  3.           inet6 addr: fe80::2e0:4cff:fe60:bf92/64 Scope:Link
  4.           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  5.           RX packets:632 errors:0 dropped:0 overruns:0 frame:0
  6.           TX packets:480 errors:0 dropped:0 overruns:0 carrier:0
  7.           collisions:0 txqueuelen:1000
  8.           RX bytes:58038 (56.6 KiB)  TX bytes:36733 (35.8 KiB)
  9.           Interrupt:11 Base address:0xc000

  10. lo        Link encap:Local Loopback  
  11.           inet addr:127.0.0.1  Mask:255.0.0.0
  12.           inet6 addr: ::1/128 Scope:Host
  13.           UP LOOPBACK RUNNING  MTU:16436  Metric:1
  14.           RX packets:8 errors:0 dropped:0 overruns:0 frame:0
  15.           TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
  16.           collisions:0 txqueuelen:0
  17.           RX bytes:560 (560.0 b)  TX bytes:560 (560.0 b)

  18. ppp0      Link encap:Point-to-Point Protocol  
  19.           inet addr:219.159.116.208  P-t-P:219.159.116.1  Mask:255.255.255.255
  20.           UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
  21.           RX packets:12 errors:0 dropped:0 overruns:0 frame:0
  22.           TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
  23.           collisions:0 txqueuelen:3
  24.           RX bytes:842 (842.0 b)  TX bytes:54 (54.0 b)
复制代码


ping P-t-P 能ping 通
回复 支持 反对

使用道具 举报

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

本版积分规则

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