CentOS 7拨号上网(ADSL & PPPoE)
步骤概述:
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)的更多相关文章
- Centos 7 拨号上网(PPPOE)
rp-pppoe 注意事项 网卡名称要填对,用 ifconfig 查看 有人说要卸载 NetworkManager,其实没必要,不冲突 pppoe-stop && pppoe-star ...
- 集群搭建:主机宽带拨号上网,虚拟机使用桥接模式,该如何ping通外网
首先介绍一下看这篇文章需要的基础.需要了解虚拟机的 虚拟机的三种网络模式,有Linux基础知识,这些都是前提.首先介绍一下我的环境:主机:win7虚拟机:VMware Workstation 10虚拟 ...
- MikroTik RouterOS安装后初始化配置(PPPOE拨号上网)
1.修改登入密码 路由器默认登入账号为admin,密码为空,强烈建议修改登入密码保证安全: 2.修改接口名称 选择Interface,切换到Ethernet标签,找到状态是R(run)的两个端口. 给 ...
- 利用ADSL拨号上网方式如何搭建服务器
序:搭建服务器需要两个条件硬件服务器和固定公网IP,随便一台个人电脑都可以作为硬件服务器,就剩下一个问题,如何获得一个固定公网IP. 第一章 扫盲:ADSL拨号上网方式,本地IP与公网IP的区别 一. ...
- android移植pppoe拨号上网的全过程
硬件环境:Tiny6410开发板 软件环境:fedora14 + Android 2.3.4 + linux-2.6.36 所需资源:rp-pppoe-3.11.tar.gz http://www.r ...
- Ubuntu ADSL拨号上网
一直在家用接ADSL的无线wifi上网,最近用了很久的NetGear无线路由器被我毁了,只好暂时用有线了.在Ubuntu Linux下也可直接使用ADSL拨号上网. 1.连接设备 这没什么可多说的,一 ...
- PPPOE拨号上网流程及密码窃取具体实现
楼主学生党一枚,最近研究netkeeper有些许心得. 关于netkeeper是调用windows的rasdial来进行上网的东西,网上已经有一大堆,我就不赘述了. 本文主要讲解rasdial的部分核 ...
- ADSL拨号上网或者光纤上网设置概要(原创)
不管是在梧州设置光纤还是在太平设置ADSL拨号上网每次设置上网一体机的时候都是遇到各种麻烦...这次又是弄了N久,每次问题各不一样.总结一下操作过程,方便以后又遇问题回头查询自个微博.一.设置电话线的 ...
- Ubuntu pppoe 拨号上网
-------------蓝色是终端里面的连接方式,可以不看--------------------- ADSL上网,Ubuntu下是可以的,虽然以前没用过拨号上网,不过查了查也不是很麻烦. 打开终端 ...
随机推荐
- 关于Linux动态库的加载路径
问题 按如下步骤在Ubuntu上编译安装Google Protocol Buffers $ ./configure $ make $ make check $ sudo make install 运行 ...
- 创建Hive/hbase相关联的表异常
hive> CREATE TABLE hperson(id string, name string,email string) STORED BY 'org.apache.hadoop.hive ...
- js innerHTML 改变div内容的方法
永远不知道你可以改变的内容,一个HTML元素?也许你要取代的文字段落中,以反映什么访客选定刚刚从下拉框中.通过操纵一个元素的innerHtml您可以变更您的文本和HTML多达你喜欢.改变文字inner ...
- Rewrite MSIL Code on the Fly with the .NET Framework Profiling API
http://clrprofiler.codeplex.com/ http://blogs.msdn.com/b/davbr/archive/2012/11/19/clrprofiler-4-5-re ...
- .balignl 16,0xdeadbeef浅析
http://zqwt.012.blog.163.com/blog/static/12044684201031102956976/ 最近在分析u-boot的源代码,看到这一行: .bal ...
- tomcat 8 加 struts2的 java.lang.NoSuchFieldException: resourceEntries
google发现已经有人把这个bug提交给了apache,issue地址,具体原因就是 Tomcat8 introduce super class WebappClassLoaderBase and ...
- registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
问题是tomcat的版本问题,tomcat新检测机制导致的这个问题,换版本可以解决问题,但不建议这么做,租用服务器不是你说换就换的.其实问题根源是BasicDataSource,BasicDataSo ...
- js中特殊转换字符为html标签
function htmlEncode(text){ return text.replace(/&/g,'&').replace(/\"/g,'"'). ...
- python学习笔记(14)--爬虫下载漫画图片修改版
说明: 1. 2017.3.12,周六从中午吃完包子12点多折腾了一下午加一个晚上,试了4个网站的爬虫,发现都不能下载!甚至前几天测试能下载的都不能用了! 2. 到晚上发现煎蛋网的可以用了,立即试了下 ...
- redis未授权
redis描述: Redis是一个开源的使用ANSI C语言编写.支持网络.可基于内存亦可持久化的日志型.Key-Value数据库,并提供多种语言的API.从2010年3月15日起,Redis的开发工 ...