步骤概述:

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. 实例讲解Nginx下的rewrite规则(转)

    一.正则表达式匹配,其中:* ~ 为区分大小写匹配* ~* 为不区分大小写匹配* !~和!~*分别为区分大小写不匹配及不区分大小写不匹配二.文件及目录匹配,其中:* -f和!-f用来判断是否存在文件* ...

  2. mysql 批量更新常用操作

    mysql更新语句很简单,更新一条数据的某个字段,一般这样写:复制代码 代码如下: UPDATE mytable SET myfield = 'value' WHERE other_field = ' ...

  3. 成员函数的重载&amp;&amp;隐藏&amp;&amp;覆盖

    /* *成员函数的重载,覆盖,隐藏 *重载: *1.同样的范围(在同一个类中) *2.函数名同样 *3.參数不同 *4.virtualkeyword可有可无 *覆盖是指派生类覆盖基类的函数,特征是: ...

  4. 【Android】6.4 DatePickerDialog和TimePickerDialog

    分类:C#.Android.VS2015: 创建日期:2016-02-08 一.简介 在Android应用中,日期选择对话框和时间选择对话框是分别提供的. 日期选择对话框(DatePickerDial ...

  5. 可靠的功能測试--Espresso和Dagger2

    欢迎Follow我的GitHub, 关注我的CSDN. 可靠的功能測试, 意味着在不论什么时候, 获取的測试结果均同样, 这就须要模拟(Mock)数据. 測试框架能够使用Android推荐的Espre ...

  6. angular学习笔记(十三)

    本篇主要介绍控制器的$scope中的数据是如何被改变的: 以下三种方法,都可以改变$scope中的number值: 1. 表达式: <span ng-click="number=num ...

  7. html5 的localstorage

    /** * 向localStorage中设置数据 * @param key 字符串 * @param value 数组 */ function SetDataIntoLocalStorage(key, ...

  8. 命令运行带参数的jar

    一.打包(此处用的是eclipse) 代码如下,此如引用了某博主的代码,因忘记地址,如博主发现此文,可私信我 package com.example.Open; import java.io.File ...

  9. 解析html文档的java库及范例

    用这个工具jsoup <groupId>org.jsoup</groupId> <artifactId>jsoup</artifactId> <v ...

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

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