linux配置上网 linux adsl拨号上网设置
程序员文章站
2023-01-15 13:11:21
Linux里面配置ADSL上网是件很麻烦的事。但配置完成之后就能开机自动拨号上网,可谓十分的方便。支持的系统有Redhat,CentOS,SuSE,FreeBSD,Ubuntu等常见的Linux... 12-11-21...
linux里面配置adsl上网是件很麻烦的事。但配置完成之后就能开机自动拨号上网,可谓十分的方便。支持的系统有redhat,centos,suse,freebsd,ubuntu等常见的linux。
工具/原料 adsl网络,电信,网通,移动等常见宽带。
linux系统的安装光盘,可以到各镜像站点下载到
方法/步骤
安装系统。可以选择图形化安装界面,或者文本安装界面。对于新手和对安全性比较高的用户来说,最好选择图形化安装界面,因为安装十分的简单。
到终端里进行配置。在终端里输入adsl-setup
[root@localhost root]# adsl-setup
welcome to the adsl client setup. first, i will run some checks on
system to make sure the pppoe client is installed properly…
login name
enter your login name (default root): (username) ‘此处输入adsl的用户名。
interface
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 ethx, where ‘x’ is a number. (default eth0): ‘直接用默认的eth0就行了。
do you want the link to come up on demand, or stay up continuously?
if you want it to come up on demand, enter the idle time in seconds
after which the link should be dropped. if you want the link to stay up
permanently, enter ‘no’ (two letters, lower-case.)
note:
demand-activated links do not interact well with dynamic ip addresses.
you may have some problems with demand-activated links.
enter the demand value (default no): ‘输默认的no
dns
please enter the ip address of your isp’s primary dns server.
if your isp claims that ‘the server will provide dynamic dns addresses’,
enter
‘server’ (all lower-case) here. ’dns地址,南京地区的主dns为218.2.135.1,辅dns为61.147.37.1其它地区可参照当地isp
if you just press enter, i will assume you know what you are doing
and not modify your dns setup.
enter
the dns information here: server
password ‘输入adsl密码,默认为自己的电话号码
please enter your password: ’再次输入密码
please re-enter your password:
userctrl
please enter ‘yes’ (two letters, lower-case.) if you want to allow normal
user to start or stop dsl connection (default yes): y ‘是否允许普通用户开启或关闭adsl连接,默认允许。
firewalling
please choose the firewall rules to use. note that these rules are very
basic. you are strongly encouraged to use a more sophisticated firewall
setup; however, these will provide basic security. if you are
running any servers on your machine, you must choose ‘none’ and set up
firewalling yourself. otherwise, the firewall rules will deny access
to all standard servers like web, e-mail, ftp, etc. if you are
using ssh, the rules will block outgoing ssh connections which allocate
a privileged source port. ’选择防火墙的等级,0到2,按需要选。
the firewall choices are: 0 -
none: this script will not set any firewall rules. you are responsible for
ensuring the security of your machine. you are strongly recommended
to use some kind of firewall rules. 1 -
standalone: appropriate for a basic stand-alone web-surfing
workstation 2 -
masquerade: appropriate for a machine acting as an internet gateway
for a lan
choose a type of firewall (0-2): 0
start this connection at boot time
do you want to start this connection at boot time? ‘是否在启动时自动连接?
please enter no or yes (default no):y
**
summary of what you entered ** ’以下是adsl账号设置信息
ethernet
interface: eth0
user name: nj007.cn
activate-on-demand: no
dns addresses: supplied by isp’s server
firewalling: none
user control: y
accept these settings and adjust configuration files (y/n)? y ‘以上信息正确吗,y保存,n重填。
adjusting
/etc/sysconfig/network-scripts/ifcfg-ppp0
adjusting
/etc/ppp/chap-secrets and /etc/ppp/pap-secrets
(but first backing it up to /etc/ppp/chap-secrets.bak)
(but first backing it up to /etc/ppp/pap-secrets.bak)
congratulations, it should be all set up!
type ‘/sbin/ifup ppp0′ to bring up your xdsl link and ‘/sbin/ifdown ppp0′
to bring it down.
type ‘/sbin/adsl-status /etc/sysconfig/network-scripts/ifcfg-ppp0′ to see
the link status.
已经完成配置adsl宽带连接,接下来,重启linux即可。命令reboot或者shutdown -r now
登录到linux,使用ping命令,ping一些常用网站如baidu.com,如果返回结果有响应时间则连接成功,反之则检查以上步骤。
工具/原料 adsl网络,电信,网通,移动等常见宽带。
linux系统的安装光盘,可以到各镜像站点下载到
方法/步骤
安装系统。可以选择图形化安装界面,或者文本安装界面。对于新手和对安全性比较高的用户来说,最好选择图形化安装界面,因为安装十分的简单。
到终端里进行配置。在终端里输入adsl-setup
[root@localhost root]# adsl-setup
welcome to the adsl client setup. first, i will run some checks on
system to make sure the pppoe client is installed properly…
login name
enter your login name (default root): (username) ‘此处输入adsl的用户名。
interface
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 ethx, where ‘x’ is a number. (default eth0): ‘直接用默认的eth0就行了。
do you want the link to come up on demand, or stay up continuously?
if you want it to come up on demand, enter the idle time in seconds
after which the link should be dropped. if you want the link to stay up
permanently, enter ‘no’ (two letters, lower-case.)
note:
demand-activated links do not interact well with dynamic ip addresses.
you may have some problems with demand-activated links.
enter the demand value (default no): ‘输默认的no
dns
please enter the ip address of your isp’s primary dns server.
if your isp claims that ‘the server will provide dynamic dns addresses’,
enter
‘server’ (all lower-case) here. ’dns地址,南京地区的主dns为218.2.135.1,辅dns为61.147.37.1其它地区可参照当地isp
if you just press enter, i will assume you know what you are doing
and not modify your dns setup.
enter
the dns information here: server
password ‘输入adsl密码,默认为自己的电话号码
please enter your password: ’再次输入密码
please re-enter your password:
userctrl
please enter ‘yes’ (two letters, lower-case.) if you want to allow normal
user to start or stop dsl connection (default yes): y ‘是否允许普通用户开启或关闭adsl连接,默认允许。
firewalling
please choose the firewall rules to use. note that these rules are very
basic. you are strongly encouraged to use a more sophisticated firewall
setup; however, these will provide basic security. if you are
running any servers on your machine, you must choose ‘none’ and set up
firewalling yourself. otherwise, the firewall rules will deny access
to all standard servers like web, e-mail, ftp, etc. if you are
using ssh, the rules will block outgoing ssh connections which allocate
a privileged source port. ’选择防火墙的等级,0到2,按需要选。
the firewall choices are: 0 -
none: this script will not set any firewall rules. you are responsible for
ensuring the security of your machine. you are strongly recommended
to use some kind of firewall rules. 1 -
standalone: appropriate for a basic stand-alone web-surfing
workstation 2 -
masquerade: appropriate for a machine acting as an internet gateway
for a lan
choose a type of firewall (0-2): 0
start this connection at boot time
do you want to start this connection at boot time? ‘是否在启动时自动连接?
please enter no or yes (default no):y
**
summary of what you entered ** ’以下是adsl账号设置信息
ethernet
interface: eth0
user name: nj007.cn
activate-on-demand: no
dns addresses: supplied by isp’s server
firewalling: none
user control: y
accept these settings and adjust configuration files (y/n)? y ‘以上信息正确吗,y保存,n重填。
adjusting
/etc/sysconfig/network-scripts/ifcfg-ppp0
adjusting
/etc/ppp/chap-secrets and /etc/ppp/pap-secrets
(but first backing it up to /etc/ppp/chap-secrets.bak)
(but first backing it up to /etc/ppp/pap-secrets.bak)
congratulations, it should be all set up!
type ‘/sbin/ifup ppp0′ to bring up your xdsl link and ‘/sbin/ifdown ppp0′
to bring it down.
type ‘/sbin/adsl-status /etc/sysconfig/network-scripts/ifcfg-ppp0′ to see
the link status.
已经完成配置adsl宽带连接,接下来,重启linux即可。命令reboot或者shutdown -r now
登录到linux,使用ping命令,ping一些常用网站如baidu.com,如果返回结果有响应时间则连接成功,反之则检查以上步骤。
上一篇: 如何修改Linux的Oracle编码集?
下一篇: python记录_day30 多进程