步骤概述:

1、搜寻PPPoE相关软件,本人使用的是rp-pppoe

  yum search pppoe

2、使用yum安装rp-pppoe

  yum install rp-pppoe -y

3、开始配置PPPoE连接

  pppoe-setup

4、输入ISP提供的账户

5、输入以太网卡代号,默认是eth0(注:CentOS 7已不是默认eth0,自行使用ifconfig命令即可找到)

6、配置:若长时间连线,连线会被自动中断(我不干,选no)

7、配置主DNS服务器

8、配置次DNS服务器

9、两次输入账户密码以确认

10、配置普通账户是否有网络连接权限

11、配置防火墙(没有特殊需求选0就OK)

12、配置是否开机自动拨号连接

13、确认刚填写的配置信息

14、连接网络尽情享受吧!

相关命令@ 连接网络:/sbin/ifup ppp0,断开连接:/sbin/ifdown ppp0,查看网络状态:/sbin/pppoe-status

....................................... 这是华丽丽的分割线 .......................................

获取以太网卡代号
 [dsp@dsp Desktop]$ ifconfig
enp9s0: flags=<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 # 有线网卡
ether :1b::3d:: txqueuelen (Ethernet)
RX packets bytes (0.0 B)
RX errors dropped overruns frame
TX packets bytes (0.0 B)
TX errors dropped overruns carrier collisions
device interrupt lo: flags=<UP,LOOPBACK,RUNNING> mtu
inet 127.0.0.1 netmask 255.0.0.0
inet6 :: prefixlen scopeid 0x10<host>
loop txqueuelen (Local Loopback)
RX packets bytes (110.0 B)
RX errors dropped overruns frame
TX packets bytes (110.0 B)
TX errors dropped overruns carrier collisions virbr0: flags=<UP,BROADCAST,MULTICAST> mtu
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether ::::: txqueuelen (Ethernet)
RX packets bytes (0.0 B)
RX errors dropped overruns frame
TX packets bytes (0.0 B)
TX errors dropped overruns carrier collisions wlp8s0: flags=<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 # 无线网卡
inet 192.168.0.151 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::4ad2:24ff:fee8:f962 prefixlen scopeid 0x20<link>
ether :d2::e8:f9: txqueuelen (Ethernet)
RX packets bytes (15.3 MiB)
RX errors dropped overruns frame
TX packets bytes (2.5 MiB)
TX errors dropped overruns carrier collisions
配置rp-pppoe客户端
 [root@dsp Desktop]# pppoe-setup
Welcome to the PPPoE client setup. First, I will run some checks on
your system to make sure the PPPoE client is installed properly... LOGIN NAME Enter your Login Name (default dsp):   # 网络服务提供商提供的账户 INTERFACE Enter the Ethernet interface connected to the PPPoE 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): enp9s0   # 选择以太网卡,有线网卡 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   # 输入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.
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: 8.8.8.8   # 主DNS服务器IP,本人使用Google Public DNS
Please enter the IP address of your ISP's secondary DNS server.
If you just press enter, I will assume there is only one DNS server.
Enter the secondary DNS server address here: 8.8.4.4   # 二级DNS服务器IP PASSWORD                         # 账户对应的密码,需两次输入以确认无误 Please enter your Password:
Please re-enter your Password: USERCTRL Please enter 'yes' (three letters, lower-case.) if you want to allow
normal user to start or stop DSL connection (default yes): yes # 普通用户是否可以启动停止网络连接 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:
- 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.
- STANDALONE: Appropriate for a basic stand-alone web-surfing workstation
- MASQUERADE: Appropriate for a machine acting as an Internet gateway
for a LAN
Choose a type of firewall (-):               # 选 吧 Start this connection at boot time Do you want to start this connection at boot time?
Please enter no or yes (default no):yes            # 是否系统启动是就连接网络 ** Summary of what you entered **                Ethernet Interface: enp9s0
User name:
Activate-on-demand: No
Primary DNS: 8.8.8.8
Secondary DNS: 8.8.4.4
Firewalling: NONE
User Control: yes
Accept these settings and adjust configuration files (y/n)? y    # 确认刚才输入的网络配置信息
Adjusting /etc/sysconfig/network-scripts/ifcfg-ppp0
Adjusting /etc/resolv.conf
(But first backing it up to /etc/resolv.conf.bak)
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' # rp-pppoe的操作命令
to bring it down.
Type '/sbin/pppoe-status /etc/sysconfig/network-scripts/ifcfg-ppp0'
to see the link status. [root@dsp Desktop]# /sbin/ifup ppp0      # 启动网络连接
[root@dsp Desktop]# /sbin/pppoe-status    # 查看网络连接状态
pppoe-status: Link is up and running on interface ppp0
: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu qdisc pfifo_fast state UNKNOWN qlen
link/ppp
inet 10.198.0.17 peer 10.198.1.1/ scope global ppp0
valid_lft forever preferred_lft forever

参考资料:鸟哥让CentOS进行PPPoE拨号上网,可用于ADSL网络环境!

CentOS 7拨号上网(ADSL & PPPoE)的更多相关文章

  1. Centos 7 拨号上网(PPPOE)

    rp-pppoe 注意事项 网卡名称要填对,用 ifconfig 查看 有人说要卸载 NetworkManager,其实没必要,不冲突 pppoe-stop && pppoe-star ...

  2. 集群搭建:主机宽带拨号上网,虚拟机使用桥接模式,该如何ping通外网

    首先介绍一下看这篇文章需要的基础.需要了解虚拟机的 虚拟机的三种网络模式,有Linux基础知识,这些都是前提.首先介绍一下我的环境:主机:win7虚拟机:VMware Workstation 10虚拟 ...

  3. MikroTik RouterOS安装后初始化配置(PPPOE拨号上网)

    1.修改登入密码 路由器默认登入账号为admin,密码为空,强烈建议修改登入密码保证安全: 2.修改接口名称 选择Interface,切换到Ethernet标签,找到状态是R(run)的两个端口. 给 ...

  4. 利用ADSL拨号上网方式如何搭建服务器

    序:搭建服务器需要两个条件硬件服务器和固定公网IP,随便一台个人电脑都可以作为硬件服务器,就剩下一个问题,如何获得一个固定公网IP. 第一章 扫盲:ADSL拨号上网方式,本地IP与公网IP的区别 一. ...

  5. android移植pppoe拨号上网的全过程

    硬件环境:Tiny6410开发板 软件环境:fedora14 + Android 2.3.4 + linux-2.6.36 所需资源:rp-pppoe-3.11.tar.gz http://www.r ...

  6. Ubuntu ADSL拨号上网

    一直在家用接ADSL的无线wifi上网,最近用了很久的NetGear无线路由器被我毁了,只好暂时用有线了.在Ubuntu Linux下也可直接使用ADSL拨号上网. 1.连接设备 这没什么可多说的,一 ...

  7. PPPOE拨号上网流程及密码窃取具体实现

    楼主学生党一枚,最近研究netkeeper有些许心得. 关于netkeeper是调用windows的rasdial来进行上网的东西,网上已经有一大堆,我就不赘述了. 本文主要讲解rasdial的部分核 ...

  8. ADSL拨号上网或者光纤上网设置概要(原创)

    不管是在梧州设置光纤还是在太平设置ADSL拨号上网每次设置上网一体机的时候都是遇到各种麻烦...这次又是弄了N久,每次问题各不一样.总结一下操作过程,方便以后又遇问题回头查询自个微博.一.设置电话线的 ...

  9. Ubuntu pppoe 拨号上网

    -------------蓝色是终端里面的连接方式,可以不看--------------------- ADSL上网,Ubuntu下是可以的,虽然以前没用过拨号上网,不过查了查也不是很麻烦. 打开终端 ...

随机推荐

  1. 使用 bat cmd命令杀掉 删掉运行的程序

    删掉所有xx.exe开启的进程 taskkill /f /im xx.exe 开启xx.exe start xx.exe 根据标题栏信息删除 taskkill /f /FI "windows ...

  2. C++防止头文件反复包括

    两种方法: (1)#pragma once. (2)ifndef/define/endif 差别: (1)#pragma once是编译器相关的.有的编译器支持,有的编译器不支持: (2)#ifnde ...

  3. GNU的strong symbol和weak symbol

    首先,同样的原型的两个函数在连个不同的c文件中都有定义,把这两个c文件编译.连接在一起,也没有什么错误.原因就是因为,gcc中有一个strong symbol和weak symbol的概念.默认函数定 ...

  4. 如何在 block 中修改外部变量

    转自:http://www.cnblogs.com/easonoutlook/archive/2012/08/22/2650070.html block 的目的是为了支持并行编程,对于普通的 loca ...

  5. 一些常见的关于Linux系统的问题

    1 如何看当前Linux系统有几颗物理CPU和每颗CPU的核数? 答:[root@centos6 ~ 10:55 #35]# cat /proc/cpuinfo|grep -c 'physical i ...

  6. c语言double类型数据四舍五入

    借助math库的round函数 #include <math.h> double ext_round(double data, int precision) { , precision); ...

  7. pairRDD中算子reduceByKeyLocally

    原型: def reduceByKeyLocally(func: (V, V) => V): Map[K, V] 该函数将RDD[K,V]中每个K对应的V值根据映射函数来运算,运算结果映射到一个 ...

  8. feginclient demo

    1.pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="h ...

  9. Office 2013 Excel 打开文档很慢很慢的解决方法

    这个问题查了很多案例,试了很多方法,但是只有下面这个方法有用! 这几天打开excel文档很慢很慢,双击之后好久没反应,过会儿它才慢慢冒出来,当时将就了,刚刚休息的时候想着查一下吧,不然很影响工作效率! ...

  10. rpm信息查看

    rpm -qpi xxx.rpm #查看rpm包相关信息,一般有版本,build日期,功能描述,大小,公司等等 rpm -qpl xxx.rpm  #查看rpm包含安装的目录和文件 rpm -qpc ...