关于Linux下使用PPPOE上网问题
timeout 是连接超时的意思,可能是设置错误吧。
3。配置
然后再来设置ADSL。这一处,我们要用命令。
pppoe-setup
Welcome to the Roaring Penguin ADSL client setup First, I will run
some checks on your system to make sure the PPPoE client is installed
properly
Looks good! Now, please enter some information:
USER NAME
>>> Enter your PPPoE user name (default XXX): 在这里输入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 ethn, where 'n' 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 DNS addresses',
enter 'server' (all lower-case) here
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,然后回车(小写字母)
----------------------------------------------------------
本文出处http://linux-downkmipnet ,如需转载请注明!
点击http://linux-downkmipnet免费下载大量的linux学习资料,软件!
----------------------------------------------------------
PASSWORD
>>> Please enter your PPPoE password:输入密码
>>> Please re-enter your PPPoE password:再输入一次
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
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(不需要防火墙)
Ethernet Interface: eth0
User name: XXX
Activate-on-demand: No
DNS: Do not adjust
Firewalling: MASQUERADE
>>> Accept these settings and adjust configuration files (y/n)
弄完后,就按一个y键。
PPPOE创建方法如下:
一、线路连接:
a(有ADSL Modem猫)把猫出来的网线,连接到路由器(WAN口)上,然后把接电脑的网线连接到路由器上(编号1/2/3/4的任意一个端口 )
b(无ADSL Modem猫)把宽带线连到路由器(WAN口)上,然后把连接电脑的网线接到路由器上(编号1/2/3/4的任意一个端口)
二、登录路由器界面。
在浏览器输入:19216801 回车,在弹出的页面中输入:admin 点击“确定”。
三、设置路由器上网。
设置上网之前先正确的选择上网方式:一般分为3种如下所示:
PPPOE拨号:平时上网(不接路由器的时候)需要点击宽带连接,拨号成功后才可以上网的,应该选择该上网方式,上网账号和上网口令正确的输入宽带账号和密码,即可。
四、设置好之后,点击“高级设置”—“系统状态”,查看WAN口的连接状态是否显示已连接,连接方式是否对应的显示正确,如正确,证明已设置好可以上网了。
ADSL拨号对应的连接方式是:PPPOE
自动获取IP地址对应的连接方式是:动态IP
静态IP对应的连接方式是:静态I
输入:sudo pppoeconf
pppoeconf 会先侦测你哪一张网络卡连接到ISP。他会列出所有侦测到的网络接口并询问你他是否已找到所有网络接口:
如果没有找到网络接口或你计算机际实的网络接口比他找到的还要多,你最好检查有否加载适当的核心模组(Kernel module)。如果正确,请按『是』(Yes)。
如果你以前曾经执行 pppoeconf,可能会遗留一些旧配置。pppoeconf 会问你要不要复盖旧配置。
请输入用户名称。然后当然是问你登入密码:
请输入密码。
接着会问你使否使用网络商提供的域名服务器(DNS Server):
请按『是』(Yes) 。
跟着问是否要把 MSS 限制不大于1452字节。
请按『是』(Yes) 。
现在 PPPoE 的基本设定已搞好了。但 pppoeconf 仍会问你每次启动计算机时是否需要自动连接 Internet:
请按『是』(Yes) 。
最好问你现在是否需要立刻连接 Internet:
请按『是』(Yes) 。
一切都搞定了,现在你可以在网上畅游了。
启动连线 (pon dsl-provider)
完成后,你随时可以打以下指令连接上网:
pon dsl-provider
中断连线 (poff)
亦可以打以下指令中断连线:
poff
sudo pppoeconf 设置完后
要手工拨号上网,打开终端,输入命令:sudo pon dsl-provider
打开/etc/ppp/peers/dsl-provider后,手工加了一行password 的记录后,下次就自动连接了。
手工断线的命令:sudo poff
查看连接情况的命令:plog 和 ifconfig ppp0
0条评论