Linux下pppoe设置

摘要:
在Linux下配置pppoe,步骤如下:1.安装pppoe软件。这不为过。ape-get-installpppoe就够了。2.设置拨号属性:[cpp]viewplaincopyroot@ubuntu:~#pppoe setup详细过程如下:用户名:[cpp]viewplaincopyUSERNAME˃˃˃输入您的PPPoEusername:测试接口(网卡):[cpp]viewplaincopy interface˃˃˃输入连接到DSLmodem的以太网接口对于Solaris,这类似于/dev/hme0。对于Linux,它将是h,其中“n”是数字。:Eth0dns:[cpp]viewplaincopy˃˃在此处输入DNS信息:密码:[cpp]view plaincopy密码˃˃请输入您的PPPoEpassword:˃˃请输入PPPoEppassword:˃˃输入您的ppPoEpassword:防火墙:[cpp]viewplaincopy防火墙选项或:0无:此脚本不会设置任何防火墙规则。你有责任感知你的手机的安全。强烈建议您使用某种防火墙规则1-STANDALONE:适用于基本独立的网络冲浪工作站2-MASQUERADE:适用于计算机操作LAN的Internet网关˃˃选择防火墙类型(0-2):0保存设置:[cpp]viewplaincopyEthernetInterface:eth0用户名:test按需激活:NoDNS:DonotadjustFirewalling:NONE˃˃接受设置和调整配置文件(y/n)?

在Linux下配置pppoe,一般有以下步骤:

1. 安装pppoe软件。这个不多说,ape-get install pppoe即可。

2. 设置拨号属性:

[cpp] view plain copy

  1. root@ubuntu:~# pppoe-setup 

   详细过程如下:

     用户名:

[cpp] view plain copy

  1. USER NAME 
  2. >>> Enter your PPPoE user name (default test): test 

     接口(网卡):

[cpp] view plain copy

  1. INTERFACE 
  2. >>> Enter the Ethernet interface connected to the DSL modem 
  3. For Solaris, this is likely to be something like /dev/hme0. 
  4. For Linux, it will be ethn, where 'n' is a number. 
  5. (default eth0): eth0 

      dns:

[cpp] view plain copy

  1. >>> Enter the DNS information here: 

      密码:

[cpp] view plain copy

  1. PASSWORD 
  2. >>> Please enter your PPPoE password:     
  3. >>> Please re-enter your PPPoE password:  

      防火墙:

[cpp] view plain copy

  1. The firewall choices are: 
  2. 0 - NONE: This script will not set any firewall rules.  You are responsible 
  3. for ensuring the security of your machine.  You are STRONGLY 
  4.           recommended to use some kind of firewall rules. 
  5. 1 - STANDALONE: Appropriate for a basic stand-alone web-surfing workstation 
  6. 2 - MASQUERADE: Appropriate for a machine acting as an Internet gateway 
  7. for a LAN 
  8. >>> Choose a type of firewall (0-2): 0 

   保存设置:

[cpp] view plain copy

  1. Ethernet Interface: eth0 
  2. User name:          test 
  3. Activate-on-demand: No 
  4. DNS:                Do not adjust 
  5. Firewalling:        NONE 
  6. >>> Accept these settings and adjust configuration files (y/n)? y 

  保存成功了。

[cpp] view plain copy

  1. Congratulations, it should be all set up! 
  2. Type 'pppoe-start' to bring up your PPPoE link and 'pppoe-stop' to bring 
  3. it down.  Type 'pppoe-status' to see the link status. 

3. 开始拨号

[cpp] view plain copy

  1. root@ubuntu:~# pppoe-start 

到了这一步,如果没有问题的话,应该就可以正常连上pppoe服务器了。

但在实际操作时,我遇到了以下两个问题:
问题1:

[cpp] view plain copy

  1. root@ubuntu:~# pppoe-setup 
  2. Welcome to the Roaring Penguin PPPoE client setup.  First, I will run 
  3. some checks on your system to make sure the PPPoE client is installed 
  4. properly... 
  5. Oops, I can't execute the program '/usr/local/sbin/pppd'.  You 
  6. must install the PPP software suite, version 2.3.10 or later. 

原因:目录/usr/local/sbin/没有pppd文件

   解决方法:

将/usr/sbin/pppoe-setup脚本里PPPD=/usr/local/sbin/pppd
     改为PPPD=/usr/sbin/pppd,保存修改后即恢复可正常

问题2:

[cpp] view plain copy

  1. root@ubuntu:~# pppoe-status: Link is down (can't read pppoe PID file /var/run/pppoe.conf-pppoe.pid.pppoe) 

    尝试运行pppoe-connect,出现和问题一类似的错误

原因:同问题1所述

   解决方法和问题1中类似:
     将/usr/sbin/pppoe-connect脚本里PPPD=/usr/local/sbin/pppd
     改为PPPD=/usr/sbin/pppd,保存修改后即恢复可正常

总结:

       在配置pppoe时遇到奇怪的问题,很有可能是有相应的脚本的路径设置不当造成。

免责声明:文章转载自《Linux下pppoe设置》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇[译]GPUView1027. 打印沙漏下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

linux下jdk,tomcat的安装

一、安装jdk 1、jdk下载地址: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html 注: 32位安装包为:jdk-7u17-linux-i586.tar.gz 64位安装包为:jdk-7u17-linux-x64.tar.gz 2、jd...

linux 操作 mysql 指定端口登录 以及启动 停止

linux 操作 mysql 指定端口登录 mysql -uroot -p -h10.154.0.43 -P3341 1、查看mysql版本方法一:status;方法二:select version(); 2、Mysql启动、停止、重启常用命令a、启动方式1、使用 service 启动:[root@localhost /]# service mysqld...

C++调用linux命令并获取返回值

qt中封装了相关的方法, 但是因为我的命令中用到了管道命令, 出现了非预期结果, 所有改用了linux系统原生的方法。 下边是一个判断某进程是否存在的例子。 当前存在一个问题,当linux返回多行时, 程序只能读取返回值的第一行。目前我的 解决方法是,将linux命令的输出重定向到一个文件,然后程序再去读这个文件。 #include <stdlib....

Linux grep命令 -- 三剑客老三

常用选项   -E :开启扩展(Extend)的正则表达式。   -i :忽略大小写(ignore case)。   -v :反过来(invert),只打印没有匹配的,而匹配的反而不打印。   -n :显示行号   -w :被匹配的文本只能是单词,而不能是单词中的某一部分。   -c :显示总共有多少行被匹配到了,而不是显示被匹配到的内容,注意如果同时使用...

centos+mono+nginx+jexus 搭建linux下c#运行环境测试

从零开始搭建Linux测试环境之dk+apache+jboss +mod_jk+openssl软件介绍1.JDK(Java DevelopmentKit)。Java开发工具包。大家都知道Java程序可以在绝大多数的机器上运行,不需要安装任何额外的软件,为什么我们要安装JDK呢?这是因为Java程序在开发过程中,需要将源代码转换为中间代码形式,也即class...

Linux下boost库的编译、安装详解

下载boost源码 boost下载地址 解压到一个目录 tar -zxvf boost_1_66_0.tar.gz 1、正常编译: 进入boost_1_66_0目录中 cd boost_1_66_0 ./bootstrap.sh --with-libraries=all --with-toolset=gcc --with-liraries:需要编译的库...