由 pandonny 在 04-23-2002 17:05 发表:
*#!&*如何在LINUX下用ADSL上网[转载]
LINUX+ADSL将会逐渐成为我们接入INTERNET的方式。我们以SuSe Linux 6.4为例,进行这种方式的具体实施。
1<p> 首先,看看软件方面的准备。SuSe 6.4已含pppoed-0.46-7。如果没有该软件,也可到ftp://ftp.suse.com/pub/projects/T-DSL或 http://www.suse.de/en/support/download /updates/63_update.html下载最新版本。 <p> 设置网卡和网关:# ifconfig eth0 mtu 1492 (不要为eth0设任何IP地址)。并确保你的default gateway 为空。 <p> Add your login name and password to /etc/ppp/pap-secrets and /etc/ppp/chap-secrets。 <p> 这两个文件应象这样:
2
3"[email protected]" * "mypassword"
4
5编辑/etc/resolve.conf
6
7nameserver 202.96.0.100
8
9nameserver 202.96.0.50 <p>在/etc/modules.conf中加入下面一行:
10
11alias char-major-144 pppox
12
13修改文件 /etc/ppp/options.
14
15# general options
16
17idle 600
18
19# this is a must
20
21user " [email protected] "
22
23sync
24
25local
26
27nocrtscts
28
29noauth
30
31usepeerdns
32
33mru 1490
34
35mtu 1490
36
37# this is recommended
38
39defaultroute
40
41hide-password
42
43nodetach
44
45#
46
47# switch off all compressions
48
49# this is a must
50
51noaccomp
52
53nopcomp
54
55# this is recommended
56
57novj
58
59novjccomp
60
61nobsdcomp
62
63nodeflate
64
65noccp <p> 注意:Replace with your own login name. <p> 运行 /usr/sbin/pppoed开始连接。 <p> 注意:只有root 用户可以启动连接。 <p> If you use a network device other than eth0, you’ll need to start /usr/sbin/pppoed with the option -I ethX, where X is the number of the device。 <p> 检验、测试连接:用tail -f /var/log/messages可跟踪并诊断ADSL的连接状态,用ifconfig可以查看你的ppp0设备被分配的IP地址,如果地址分配成功,就说明已建立连接。用route命令可查看拔入服务器为你指定的网关地址。用ping www.hermes.com.cn应该可以ping通,如果不通,</p></p></p></p></p></p></p></p></p></p>