PCDN测试拨号方法:
环境:

系统:centos7系统
网卡配置:
enp5s0f0配置的有公网管理IP
enp5s0f1,用于拨号,网线接入未做任何配置

1、安装拨号软件

[root@centos7 ~]# yum -y install rp-pppoe

2、配置虚拟网卡

[root@centos7 ~]# ip a          ##查看网卡信息

##配置虚拟网卡用来同时拨多个账号

[root@centos7 ~]# ip link add macvlan0 link enp5s0f1 type macvlan mode bridge
[root@centos7 ~]# ip link add macvlan1 link enp5s0f1 type macvlan mode bridge
[root@centos7 ~]# ip link add macvlan2 link enp5s0f1 type macvlan mode bridge
[root@centos7 ~]# ip link set macvlan2 up
[root@centos7 ~]# ip link set macvlan2 up
[root@centos7 ~]# ip link set macvlan2 up

3、配置拨号上网

[root@centos7 ~]# 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 NAMEEnter your Login Name (default root): test1   ###拨号账户INTERFACEEnter 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):macvlan0    ##用哪个端口进行拨号,这个是配置的虚拟接口macvlan0,macvlanDo 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表示
没有数据传输时也不中断)DNSPlease 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   ##设置DNSPASSWORDPlease enter your Password:    ###输入拨号账户的密码
Please re-enter your Password:   ##再次输入密码USERCTRLPlease enter 'yes' (three letters, lower-case.) if you want to allow
normal user to start or stop DSL connection (default yes): yes
##是否允许普通账户连接FIREWALLINGPlease 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:
0 - NONE: This script will not set any firewall rules.  You are responsiblefor ensuring the security of your machine.  You are STRONGLYrecommended to use some kind of firewall rules.
1 - STANDALONE: Appropriate for a basic stand-alone web-surfing workstation
2 - MASQUERADE: Appropriate for a machine acting as an Internet gatewayfor a LAN
Choose a type of firewall (0-2): 0    ###配置防火墙,无特殊需求选0Start this connection at boot timeDo you want to start this connection at boot time?
Please enter no or yes (default no):no  ##是否开机自动拨号** Summary of what you entered **Ethernet Interface: macvlan0
User name:          test1
Activate-on-demand: No
DNS:                8.8.8.8
Firewalling:        NONE
User Control:       yes
Accept these settings and adjust configuration files (y/n)? y  ##确认信息
Adjusting /etc/sysconfig/network-scripts/ifcfg-ppp0
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'
to bring it down.
Type '/sbin/pppoe-status /etc/sysconfig/network-scripts/ifcfg-ppp0'
to see the link status.

4、添加路由,避免拨号掉线

[root@centos7 ~]# route -n
[root@centos7 ~]# route add -net 目的地址/掩码 gw 下一跳网关
或者
[root@centos7 ~]# ip route add *.*.*.0/24 via 下一跳网关 dev enp5s0f0

再次查看路由

[root@centos7 ~]# route -n

5、连接拨号

[root@centos7 ~]# ifup ppp0

6、查看拨号网卡配置

[root@centos7 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ppp0
USERCTL=yes
BOOTPROTO=dialup
NAME=DSLppp0
DEVICE=ppp0
TYPE=xDSL
ONBOOT=no
PIDFILE=/var/run/pppoe-adsl-ppp0.pid
FIREWALL=NONE
PING=.
PPPOE_TIMEOUT=80
LCP_FAILURE=3
LCP_INTERVAL=20
CLAMPMSS=1412
CONNECT_POLL=6
CONNECT_TIMEOUT=60
DEFROUTE=no
SYNCHRONOUS=no
ETH=macvlan0
PROVIDER=DSLppp0
USER=051307
PEERDNS=no
DEMAND=no
[root@centos7 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ppp1
USERCTL=yes
BOOTPROTO=dialup
NAME=DSLppp1
DEVICE=ppp1
TYPE=xDSL
ONBOOT=no
PIDFILE=/var/run/pppoe-adsl-ppp1.pid
FIREWALL=NONE
PING=.
PPPOE_TIMEOUT=80
LCP_FAILURE=3
LCP_INTERVAL=20
CLAMPMSS=1412
CONNECT_POLL=6
CONNECT_TIMEOUT=60
DEFROUTE=no
SYNCHRONOUS=no
ETH=macvlan1
PROVIDER=DSLppp1
USER=05130
PEERDNS=no
DEMAND=no
[root@centos7 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ppp2
USERCTL=yes
BOOTPROTO=dialup
NAME=DSLppp2
DEVICE=ppp2
TYPE=xDSL
ONBOOT=no
PIDFILE=/var/run/pppoe-adsl-ppp2.pid
FIREWALL=NONE
PING=.
PPPOE_TIMEOUT=80
LCP_FAILURE=3
LCP_INTERVAL=20
CLAMPMSS=1412
CONNECT_POLL=6
CONNECT_TIMEOUT=60
DEFROUTE=yes
SYNCHRONOUS=no
ETH=macvlan2
PROVIDER=DSLppp2
USER=0513036
PEERDNS=no
DEMAND=no
[root@centos7 ~]#

Centos7在公网使用PCDN拨号相关推荐

  1. centos7查询公网ip

    查询公网ip,记录一下. [root@localhost ~]# curl ip.sb 222.175.156.230 [root@localhost ~]#

  2. Centos 7 拨号上网

    记一次Centos7 双网卡系统,设置拨号上网全过程 系统环境 Centos 7.8.2003 网卡1 : 用于拨号上网 网卡2: 用于内网通信 (172.28.0.38) 离线安装PPPOE 离线下 ...

  3. 拨号PPP NDIS RNDIS CDC ECM NCM QMI_WWAN GOBINET RMNET MBIM概念介绍

    PPP   PPP 用于建立点对点链路.最初是用于慢速设备的,比如早期通过串行线上网.通过一套协议,维护硬件链路上的数据连接,并具备安全和认证特性,可建立计费模式.   我们在PPP拨号脚本中也常常可 ...

  4. centos7下载setoolkit并克隆网站(fishing网站)

    前言 测试环境 下载setoolkit 克隆网站 总结 前言 本文章只做技术探讨,任何人企图进行非法活动与本作者无关. 测试环境 一台公网centos7(自己买的服务器) 一台windows10(我的 ...

  5. iptables详解及应用(史上最全)

    1.1 iptables概念 从逻辑上讲.防火墙可以大体分为主机防火墙和网络防火墙. 主机防火墙:针对于单个主机进行防护. 网络防火墙:往往处于网络入口或边缘,针对于网络入口进行防护,服务于防火墙背后 ...

  6. 电脑ip地址设置_关于电脑的远程开机(唤醒)

    总结起来,无非以下三大步 1.设置主板BIOS 2.打开网卡上的选项 3.对路由器设置,用于端口的转发(将发到公网IP的唤醒指令转发到内网的指定电脑上) 具体每一步的设置见后面详述. 做好以上设置后, ...

  7. 华为防火墙配置(防火墙NAT)

    目录 前言 一.防火墙NAT概述 1.防火墙NAT策略介绍 2.NAT策略分类 (1)NAT No-PAT (2)NAPT (3)Easy-IP (4)Smart NAT (5)三元组NAT 3.NA ...

  8. 域格4G模块专网设置说明

    本文包含以下内容 专网说明 域格ASR平台模块专网相关设置 注册到专网并使用默认承载上网(目前遇到的多数专网) 注册到公网但拨号拨到专网上网 域格9x07平台模块专网相关设置 注册到专网并使用默认承载 ...

  9. 实施工程师面试题(答案)

    1.两电脑都在同一个网络环境中,A 电脑访问不到 B 电脑的共享文件.此现象可能是哪些 方面所导致?怎样处理? answer:首先你要确定是不是在一个工作组内,只有在一个工作组内才可以共享文件,然后看 ...

最新文章

  1. mysql导入Excel数据
  2. 小白重装系统教程_重装解决99%的电脑问题:小白U盘重装系统教程
  3. Arrays.copyOf()、Arrays.copyOfRange()与System.arraycopy()用法
  4. clojure java.jdbc_Clojure驱动的Web开发
  5. Antd Table树形展示,分页后有时候数据渲染不出的问题
  6. 软工实践(二)——构建之法读后感
  7. IntelliJ Idea学习笔记002---IDEA 全局搜索快捷键CTRL+SHIFT+F,不起作用
  8. 零基础可上手 | 手把手教你用Cloud AutoML做毒蜘蛛分类器
  9. 《深度学习》花书训练营day01-线性代数
  10. Matlab函数——dct2
  11. 冲击波病毒内幕点滴(4)
  12. qq空间把android改成iphone,qq空间利用代码修改iPhone6 Plus qq空间修改手机型号教程...
  13. Ubuntu12.04 Thinkpad T410i 安装记录 持续更新...
  14. 【20200422】编译原理课程课业打卡十七之求解文法FirstVTLastVT构造文法算符优先关系表
  15. STM32——EMWIN对话框(十二)
  16. deepin安装docker
  17. Listary 关键字批量添加,代码分享
  18. 国家教育部公布14所高校开设“区块链工程”本科专业
  19. Makefile的obj-y和obj-m语句
  20. 学习记录1——PMSM数学建模——PMSM的基础知识

热门文章

  1. 计算机本地用户名称怎么改win10系统,win10系统如何设置本地账户用户名
  2. javascript 实现blob加密视频(html video),服务端为php
  3. pandas数值型数据和非数值型数据统计
  4. Springboot359的医院病历管理系统
  5. 不要使用矿泉水瓶接热水喝——致癌
  6. 微软又发布了一款命令行神器,功能太强了!
  7. 股票投资 - 如何看懂集合竞价
  8. win10之定时关机
  9. Wear OS手表应用开发教程之-创建应用
  10. mac卸载和安装openjdk