Configure PPPoE on CentOS7

本文介绍了如何在 CentOS 7 中配置 Ethernet 和 Wifi 接口,使得系统能够同时通过这两种方式接入互联网。首先,通过查看系统文件找到了 Ethernet 接口的名称,然后使用 PPPoE 配置了网络连接,包括输入账号、密码等信息。最后,提供了网络连接的启动和关闭命令。

Why?

I prefer using ethernet to Wifi to access internet. But, I'm afraid, sometimes I have to use Wifi. So, I'm going to configure my CentOS7 to be able to access internet through both Wifi and Ethernet.

 

Preparation

The ethernet interface/card name is not eth0 on my CentOS7, so I have to find it out.

Way 1:

- ls /etc/sysconfig/network-scripts/ifcfg-*

/etc/sysconfig/network-scripts/ifcfg-enp0s89  (<--- this is my Ethernet name)
/etc/sysconfig/network-scripts/ifcfg-lo             (<--- I don't know what it is, whatever, never mind.)
/etc/sysconfig/network-scripts/ifcfg-Tenda_BJ (<--- this is my Wifi router name)

Way2:

- or, follow the GUI "Settings --> Network --> Wired",

Click the settings button on Wired panel, then swith  to "Indentity --> Name".

the value of Name is enp0s89

 

so 'enp0s89' is what I am looking for. This Ethernet name will be used in pppoe configuration later.

 

 

Install and setup PPPoE

1. #yum install rp-pppoe

2. You don't have to remove NetworkManager as mentioned in [1]. In fact, if you remove NetworkManager, you can't use Wifi anymore.

3. #pppoe-setup

Enter your Login Name (default user0): <input your xDSL account name>

 

INTERFACE
(default eth0): <input your Ethernet card name, it may not be eth0!>

 

DNS

Enter the DNS information here: <>
Enter the secondary DNS server address here: <>

PASSWORD
Please enter your Password: <input your xDSL account password>
Please re-enter your Password: <input your xDSL account password again>

 

USERCTRL
Please enter 'yes' (three letters, lower-case.) if you want to allow normal user to start or stop DSL connection (default yes):

 

FIREWALLING
Choose a type of firewall (0-2): 1

 

4. connect your network:   /sbin/ifup ppp0

5. disconnect your network:  /sbin/ifdown ppp0

 

 

Reference

[1] 让CentOS进行PPPoE拨号上网,可用于ADSL网络环境!

 

转载于:https://www.cnblogs.com/yaoyansi/p/4222554.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值