Fedora Core 4 使用手记(三) ADSL上网
2005-09-22 20:37
477 查看
用过ADSL的人都知道,ADSL使用的是PPPOE拨号方式,在WINDOWS上有一个叫WinPPoE的软件,通过这个软件可以很容易地联上ISP,接入INTERNET。因此,要在Linux下使用ADSL上网,需要Linux的PPPoE软件支持,Fedora Core 4已内置PPPoE软件包。你也可以从Http://www.roaringpenguin.com/pppoe/下载RP-PPPoE软件。该软件安装方便,而且有GUI版本,使用起来也比较简单。
PPPoE (Point-to-Point Protocol over Ethernet) is a protocol used by many ADSL Internet Service Providers. Roaring Penguin has a free PPPoE client for Linux and Solaris systems to connect to PPPoE service providers.Dubbed RP-PPPoE, this open-source product is ideal for Linux users with a DSL "modem" whose Internet service provider uses PPPoE. Before you download this software, check whether or not you really need it. If your ISP uses PPPoE, but has given you a router, you may not need a PPPoE client on your Linux box. DHCP may work fine.
一、安装的前提条件 1.确保安装了网卡并工作正常
使用命令
#ifconfig eth0
查看网卡状态
2.在系统中不要设置默认路由(网关),让ADSL拨号后自动获得
如果已经设置了默认路由,使用以下方法删除:
在文件 /etc/sysconfig/network 中删除 GATEWAY= 这一行,然后以root执行:
#/etc/rc.d/init.d/network restart
3.已经安装了pppd软件包
如果存在文件 /usr/sbin/pppd,则说明已经安装了pppd;
如果未安装,从RedHatLinux 6.2安装光盘上安装ppp-2.3.11-4.i386.rpm这个软件包
二、安装PPPOE客户端软件 Linux下的PPPOE客户端软件比较多,而且大多使用GNU License,我们推荐使用rp-pppoe
这个软件包。从http://www.roaringpenguin.com/pppoe/这个网站上,不仅可以下栽
RedHat 62平台下的rp-pppoe的二进制软件包,而且可以下栽源代码软件包。
1.二进制软件包的安装:
A.下栽二进制软件包
http://www.roaringpenguin.com/penguin/pppoe/rp-pppoe-3.6.tar.gz http://www.roaringpenguin.com/pppoe/rp-pppoe-3.2-1.i386.rpm
B.进行安装
以root执行:
#rpm -Uvh rp-pppoe-3.2-1.i386.rpm
2.从源代码进行安装:
从源代码进行安装同样适用于其它平台的Linux,但必须在Linux系统中安装gcc编译器。
A.下栽源代码软件包
http://www.roaringpenguin.com/pppoe/rp-pppoe-3.2.tar.gz
B.解压缩
#tar xvfz rp-pppoe-3.2.tar.gz
#cd rp-pppoe-3.2
C.进行编译和安装
运行脚本
#./go
将自动进行编译和安装,最后,调用/usr/sbin/adsl-setup进行配置,具体解释见三。
三、配置PPPOE客户端软件
安装完软件包后,必须配置pppoe的配置文件/etc/ppp/pppoe.conf,从而让ADSL拨号时
使用配置文件中的用户名、密码等参数。我们不必手工改动这个文件,可以使用
adsl-setup这个工具进行配置:
#/usr/sbin/adsl-setup
当出现
>>> Enter your PPPoE user name :
输入ADSL帐号的用户名
当出现
>>> Enter the Ethernet interface connected to the ADSL modem
For Solaris, this is likely
4000
to be something like /dev/hme0.
For Linux, it will be ethn, where 'n' is a number.
(default eth0):
输入 eth0 ,这是ADSL相连的网卡的名字
当出现
>>> Enter the demand value (default no):
输入 no
当出现
>>> Enter the DNS information here:
输入 server ,这表示使用ADSL拨号自动获得的DNS服务器IP地址
当出现
>>> Please enter your PPPoE password:
输入ADSL帐号的密码
当出现
>>> Choose a type of firewall (0-2):
输入 0 ,不使用防火墙
当出现
>>> Accept these settings and adjust configuration files (y/n)?
如果输入的信息正确,输入 y ,完成配置,否则,输入 n 重新输入。
四、启动PPPOE客户端软件
使用命令
/usr/sbin/adsl-start 启动PPPOE客户端软件,进行连接,如果成功,将出现
Connected;
如果不成功,请检查网线、ADSL MODEM等物理设备,并查看 /var/log/messages中的信
息
/usr/sbin/adsl-stop 关闭和ISP的连接
/usr/sbin/adsl-status 查看当前连接的状态
如果想在Linux系统启动时自动启动ADSL连接,输入以下命令
#chkconfig --add adsl
将在当前的运行级下加入ADSL的自启动脚本
五、测试
当连接成功后,使用命令
#ifconfig -a
在输出中应该含有关于 ppp0 的一堆信息,其中还绑定了 IP 地址,说明已经从拨号中获
得了IP地址。
使用命令
#netstat -nr
查看路由表信息,这时的默认路由应该是上面获得的IP地址。
如果没有默认路由,我们可以手动增加:
#route add default gw 上面获得的IP地址
使用命令
#nslookup www.sina.com.cn
如果解析出新浪的IP,说明已经从拨号中正确获得了DNS服务器
最后,使用命令ping某个域名或IP,如果有响应,表示你已经大功告成了。
六、其它说明
Fedora Core 4默认已经安装了rp-pppoe这个软件包,可以直接进行三后面的步骤。进行安装
以root执行:
#rpm -Uvh rp-pppoe-3.2-1.i386.rpm
2.从源代码进行安装:
从源代码进行安装同样适用于其它平台的Linux,但必须在Linux系统中安装gcc编译器。
A.下栽源代码软件包
http://www.roaringpenguin.com/pppoe/rp-pppoe-3.2.tar.gz
B.解压缩
#tar xvfz rp-pppoe-3.2.tar.gz
#cd rp-pppoe-3.2
C.进行编译和安装
运行脚本
#./go
将自动进行编译和安装,最后,调用/usr/sbin/adsl-setup进行配置,具体解释见三。
三、配置PPPOE客户端软件
安装完软件包后,必须配置pppoe的配置文件/etc/ppp/pppoe.conf,从而让ADSL拨号时
使用配置文件中的用户名、密码等参数。我们不必手工改动这个文件,可以使用
adsl-setup这个工具进行配置:
#/usr/sbin/adsl-setup
当出现
>>> Enter your PPPoE user name :
输入ADSL帐号的用户名
当出现
>>> Enter the Ethernet interface connected to the ADSL modem
For Solaris, this is likely to be something like /dev/hme0.
For Linux, it will be ethn, where 'n' is a number.
(default eth0):
输入 eth0 ,这是ADSL相连的网卡的名字
当出现
>>> Enter the demand value (default no):
输入 no
当出现
>>> Enter the DNS information here:
输入 server ,这表示使用ADSL拨号自动获得的DNS服务器IP地址
当出现
>>> Please enter your PPPoE password:
输入ADSL帐号的密码
当出现
>>> Choose a type of firewall (0-2):
输入 0 ,不使用防火墙
当出现
>>> Accept these settings and adjust configuration files (y/n)?
如果输入的信息正确,输入 y ,完成配置,否则,输入 n 重新输入。
四、启动PPPOE客户端软件
使用命令
/usr/sbin/adsl-start 启动PPPOE客户端软件,进行连接,如果成功,将出现
Connected;
如果不成功,请检查网线、ADSL MODEM等物理设备,并查看 /var/log/messages中的信
息
/usr/sbin/adsl-stop 关闭和ISP的连接
/usr/sbin/adsl-status 查看当前连接的状态
如果想在Linux系统启动时自动启动ADSL连接,输入以下命令
#chkconfig --add adsl
将在当前的运行级下加入ADSL的自启动脚本
五、测试
当连接成功后,使用命令
#ifconfig -a
在输出中应该含有关于 ppp0 的一堆信息,其中还绑定了 IP 地址,说明已经从拨号中获
得了IP地址。
使用命令
#netstat -nr
查看路由表信息,这时的默认路由应该是上面获得的IP地址。
如果没有默认路由,我们可以手动增加:
#route add default gw 上面获得的IP地址
使用命令
#nslookup www.sina.com.cn
如果解析出新浪的IP,说明已经从拨号中正确获得了DNS服务器
最后,使用命令ping某个域名或IP,如果有响应,表示你已经大功告成了。
六、其它说明
Fedora Core 4默认已经安装了rp-pppoe这个软件包,可以直接进行三后面的步骤。另外你也可以通过GUI界面来进行ADSL的配置,很简单:在主菜单找到《网络设置和配置向导》—》分别激活eth0何xdsl就可以上网了。这是我在通过命令行配置好并上网后才发现的:《
PPPoE (Point-to-Point Protocol over Ethernet) is a protocol used by many ADSL Internet Service Providers. Roaring Penguin has a free PPPoE client for Linux and Solaris systems to connect to PPPoE service providers.Dubbed RP-PPPoE, this open-source product is ideal for Linux users with a DSL "modem" whose Internet service provider uses PPPoE. Before you download this software, check whether or not you really need it. If your ISP uses PPPoE, but has given you a router, you may not need a PPPoE client on your Linux box. DHCP may work fine.
一、安装的前提条件 1.确保安装了网卡并工作正常
使用命令
#ifconfig eth0
查看网卡状态
2.在系统中不要设置默认路由(网关),让ADSL拨号后自动获得
如果已经设置了默认路由,使用以下方法删除:
在文件 /etc/sysconfig/network 中删除 GATEWAY= 这一行,然后以root执行:
#/etc/rc.d/init.d/network restart
3.已经安装了pppd软件包
如果存在文件 /usr/sbin/pppd,则说明已经安装了pppd;
如果未安装,从RedHatLinux 6.2安装光盘上安装ppp-2.3.11-4.i386.rpm这个软件包
二、安装PPPOE客户端软件 Linux下的PPPOE客户端软件比较多,而且大多使用GNU License,我们推荐使用rp-pppoe
这个软件包。从http://www.roaringpenguin.com/pppoe/这个网站上,不仅可以下栽
RedHat 62平台下的rp-pppoe的二进制软件包,而且可以下栽源代码软件包。
1.二进制软件包的安装:
A.下栽二进制软件包
http://www.roaringpenguin.com/penguin/pppoe/rp-pppoe-3.6.tar.gz http://www.roaringpenguin.com/pppoe/rp-pppoe-3.2-1.i386.rpm
B.进行安装
以root执行:
#rpm -Uvh rp-pppoe-3.2-1.i386.rpm
2.从源代码进行安装:
从源代码进行安装同样适用于其它平台的Linux,但必须在Linux系统中安装gcc编译器。
A.下栽源代码软件包
http://www.roaringpenguin.com/pppoe/rp-pppoe-3.2.tar.gz
B.解压缩
#tar xvfz rp-pppoe-3.2.tar.gz
#cd rp-pppoe-3.2
C.进行编译和安装
运行脚本
#./go
将自动进行编译和安装,最后,调用/usr/sbin/adsl-setup进行配置,具体解释见三。
三、配置PPPOE客户端软件
安装完软件包后,必须配置pppoe的配置文件/etc/ppp/pppoe.conf,从而让ADSL拨号时
使用配置文件中的用户名、密码等参数。我们不必手工改动这个文件,可以使用
adsl-setup这个工具进行配置:
#/usr/sbin/adsl-setup
当出现
>>> Enter your PPPoE user name :
输入ADSL帐号的用户名
当出现
>>> Enter the Ethernet interface connected to the ADSL modem
For Solaris, this is likely
4000
to be something like /dev/hme0.
For Linux, it will be ethn, where 'n' is a number.
(default eth0):
输入 eth0 ,这是ADSL相连的网卡的名字
当出现
>>> Enter the demand value (default no):
输入 no
当出现
>>> Enter the DNS information here:
输入 server ,这表示使用ADSL拨号自动获得的DNS服务器IP地址
当出现
>>> Please enter your PPPoE password:
输入ADSL帐号的密码
当出现
>>> Choose a type of firewall (0-2):
输入 0 ,不使用防火墙
当出现
>>> Accept these settings and adjust configuration files (y/n)?
如果输入的信息正确,输入 y ,完成配置,否则,输入 n 重新输入。
四、启动PPPOE客户端软件
使用命令
/usr/sbin/adsl-start 启动PPPOE客户端软件,进行连接,如果成功,将出现
Connected;
如果不成功,请检查网线、ADSL MODEM等物理设备,并查看 /var/log/messages中的信
息
/usr/sbin/adsl-stop 关闭和ISP的连接
/usr/sbin/adsl-status 查看当前连接的状态
如果想在Linux系统启动时自动启动ADSL连接,输入以下命令
#chkconfig --add adsl
将在当前的运行级下加入ADSL的自启动脚本
五、测试
当连接成功后,使用命令
#ifconfig -a
在输出中应该含有关于 ppp0 的一堆信息,其中还绑定了 IP 地址,说明已经从拨号中获
得了IP地址。
使用命令
#netstat -nr
查看路由表信息,这时的默认路由应该是上面获得的IP地址。
如果没有默认路由,我们可以手动增加:
#route add default gw 上面获得的IP地址
使用命令
#nslookup www.sina.com.cn
如果解析出新浪的IP,说明已经从拨号中正确获得了DNS服务器
最后,使用命令ping某个域名或IP,如果有响应,表示你已经大功告成了。
六、其它说明
Fedora Core 4默认已经安装了rp-pppoe这个软件包,可以直接进行三后面的步骤。进行安装
以root执行:
#rpm -Uvh rp-pppoe-3.2-1.i386.rpm
2.从源代码进行安装:
从源代码进行安装同样适用于其它平台的Linux,但必须在Linux系统中安装gcc编译器。
A.下栽源代码软件包
http://www.roaringpenguin.com/pppoe/rp-pppoe-3.2.tar.gz
B.解压缩
#tar xvfz rp-pppoe-3.2.tar.gz
#cd rp-pppoe-3.2
C.进行编译和安装
运行脚本
#./go
将自动进行编译和安装,最后,调用/usr/sbin/adsl-setup进行配置,具体解释见三。
三、配置PPPOE客户端软件
安装完软件包后,必须配置pppoe的配置文件/etc/ppp/pppoe.conf,从而让ADSL拨号时
使用配置文件中的用户名、密码等参数。我们不必手工改动这个文件,可以使用
adsl-setup这个工具进行配置:
#/usr/sbin/adsl-setup
当出现
>>> Enter your PPPoE user name :
输入ADSL帐号的用户名
当出现
>>> Enter the Ethernet interface connected to the ADSL modem
For Solaris, this is likely to be something like /dev/hme0.
For Linux, it will be ethn, where 'n' is a number.
(default eth0):
输入 eth0 ,这是ADSL相连的网卡的名字
当出现
>>> Enter the demand value (default no):
输入 no
当出现
>>> Enter the DNS information here:
输入 server ,这表示使用ADSL拨号自动获得的DNS服务器IP地址
当出现
>>> Please enter your PPPoE password:
输入ADSL帐号的密码
当出现
>>> Choose a type of firewall (0-2):
输入 0 ,不使用防火墙
当出现
>>> Accept these settings and adjust configuration files (y/n)?
如果输入的信息正确,输入 y ,完成配置,否则,输入 n 重新输入。
四、启动PPPOE客户端软件
使用命令
/usr/sbin/adsl-start 启动PPPOE客户端软件,进行连接,如果成功,将出现
Connected;
如果不成功,请检查网线、ADSL MODEM等物理设备,并查看 /var/log/messages中的信
息
/usr/sbin/adsl-stop 关闭和ISP的连接
/usr/sbin/adsl-status 查看当前连接的状态
如果想在Linux系统启动时自动启动ADSL连接,输入以下命令
#chkconfig --add adsl
将在当前的运行级下加入ADSL的自启动脚本
五、测试
当连接成功后,使用命令
#ifconfig -a
在输出中应该含有关于 ppp0 的一堆信息,其中还绑定了 IP 地址,说明已经从拨号中获
得了IP地址。
使用命令
#netstat -nr
查看路由表信息,这时的默认路由应该是上面获得的IP地址。
如果没有默认路由,我们可以手动增加:
#route add default gw 上面获得的IP地址
使用命令
#nslookup www.sina.com.cn
如果解析出新浪的IP,说明已经从拨号中正确获得了DNS服务器
最后,使用命令ping某个域名或IP,如果有响应,表示你已经大功告成了。
六、其它说明
Fedora Core 4默认已经安装了rp-pppoe这个软件包,可以直接进行三后面的步骤。另外你也可以通过GUI界面来进行ADSL的配置,很简单:在主菜单找到《网络设置和配置向导》—》分别激活eth0何xdsl就可以上网了。这是我在通过命令行配置好并上网后才发现的:《
相关文章推荐
- Fedora Core 4 使用手记(四) 使用NTFS格式的USB移动硬盘
- Fedora Core 4 使用手记(六) 安装Reaplayer
- Fedora Core 4 使用手记(七) 安装MPlayer
- Fedora core 4使用手记
- Fedora14 使用虚拟机桥接上网 静态配置固定IP 和宿主机IP在同一网段的方法 及 若干问题解决(NFS挂载第一步)
- 怎么把联通ADSL上网的家庭网关当做无线路由器使用?
- Fedora Core 5 内核源代码安装手记及模块编程
- 一次管理项目小组网络的经历(使用RouterOS与Wireshark破解adsl上网密码,使用isa与Bandwidth Splitter来协调带宽)
- Fedora下adsl共享上网
- ubuntu中使用星空极速 adsl上网
- Fedora Core 5 内核源代码安装手记 2
- 手记---Linux下使用3G网卡上网(虚拟机方式)
- Fedora core 6 Linux使用NFS挂装远程文件系统实现目录共享
- 使用路由器让两台电脑同时用一个adsl账号上网
- Fedora Core 5 内核源代码安装手记1
- windows 2000系统下安装PPPOE协议,使用adsl拔号上网
- 使用路由器让两台电脑同时用一个adsl账号上网