{"id":19276,"date":"2016-08-21T06:17:29","date_gmt":"2016-08-20T22:17:29","guid":{"rendered":"https:\/\/2blog.ilc.edu.tw\/25793\/2016\/08\/21\/%e5%9c%a8-centos-7-x-%e5%ae%89%e8%a3%9d-pppoe-%e6%92%a5%e6%8e%a5%e5%8a%9f%e8%83%bd\/"},"modified":"2021-03-18T17:24:48","modified_gmt":"2021-03-18T09:24:48","slug":"%e5%9c%a8-centos-7-x-%e5%ae%89%e8%a3%9d-pppoe-%e6%92%a5%e6%8e%a5%e5%8a%9f%e8%83%bd","status":"publish","type":"post","link":"https:\/\/2blog.ilc.edu.tw\/25793\/2016\/08\/21\/%e5%9c%a8-centos-7-x-%e5%ae%89%e8%a3%9d-pppoe-%e6%92%a5%e6%8e%a5%e5%8a%9f%e8%83%bd\/","title":{"rendered":"\u5728 CentOS 7.x \u5b89\u88dd PPPoE \u64a5\u63a5\u529f\u80fd"},"content":{"rendered":"<p>\u53c3\u8003\u7db2\u7ad9\uff1a<br \/><a href=\"http:\/\/blog.kevinlinul.idv.tw\/?p=174\" target=\"_blank\" rel=\"noopener noreferrer\">\u5728CentOS 7\u8a2d\u5b9aPPPoE\u64a5\u63a5\u529f\u80fd | Kevin Linul \u7db2\u8def\u65e5\u8a18\u672c<\/a><\/p>\n<p>1. \u5b89\u88dd rp-pppoe \u5957\u4ef6<br \/># <span style=\"color: #ff0000\">yum install rp-pppoe<\/span><\/p>\n<p>2. \u505c\u7528\u53ca\u53d6\u6d88\u4f7f\u7528 NetworkManager \u670d\u52d9<br \/># <span style=\"color: #ff0000\">systemctl stop NetworkManager.service<\/span><br \/># <span style=\"color: #ff0000\">systemctl disable NetworkManager.service<\/span><br \/><span style=\"color: #0000ff\">Removed symlink \/etc\/systemd\/system\/multi-user.target.wants\/NetworkManager.service.<\/span><br \/><span style=\"color: #0000ff\">Removed symlink \/etc\/systemd\/system\/dbus-org.freedesktop.NetworkManager.service.<\/span><br \/><span style=\"color: #0000ff\">Removed symlink \/etc\/systemd\/system\/dbus-org.freedesktop.nm-dispatcher.service.<\/span>[@more@]3. \u9032\u884c\u8a2d\u5b9a<br \/># <span style=\"color: #ff0000\">\/usr\/sbin\/pppoe-setup<\/span><br \/><span style=\"color: #0000ff\">Welcome to the PPPoE client setup.\u00a0 First, I will run some checks on<\/span><br \/><span style=\"color: #0000ff\">your system to make sure the PPPoE client is installed properly&#8230;<\/span><\/p>\n<p><span style=\"color: #0000ff\">LOGIN NAME<\/span><\/p>\n<p><span style=\"color: #0000ff\">Enter your Login Name (default root): <span style=\"color: #ff0000\">xxxxx@hinet.net<\/span><\/span><\/p>\n<p><span style=\"color: #0000ff\">INTERFACE<\/span><\/p>\n<p><span style=\"color: #0000ff\">Enter the Ethernet interface connected to the PPPoE modem<\/span><br \/><span style=\"color: #0000ff\">For Solaris, this is likely to be something like \/dev\/hme0.<\/span><br \/><span style=\"color: #0000ff\">For Linux, it will be ethX, where &#8216;X&#8217; is a number.<\/span><br \/><span style=\"color: #0000ff\">(default eth0): <span style=\"color: #ff0000\">eno16777736<\/span><\/span><\/p>\n<p><span style=\"color: #0000ff\">Do you want the link to come up on demand, or stay up continuously?<\/span><br \/><span style=\"color: #0000ff\">If you want it to come up on demand, enter the idle time in seconds<\/span><br \/><span style=\"color: #0000ff\">after which the link should be dropped.\u00a0 If you want the link to<\/span><br \/><span style=\"color: #0000ff\">stay up permanently, enter &#8216;no&#8217; (two letters, lower-case.)<\/span><br \/><span style=\"color: #0000ff\">NOTE: Demand-activated links do not interact well with dynamic IP<\/span><br \/><span style=\"color: #0000ff\">addresses.\u00a0 You may have some problems with demand-activated links.<\/span><br \/><span style=\"color: #0000ff\">Enter the demand value (default no):<\/span><\/p>\n<p><span style=\"color: #0000ff\">DNS<\/span><\/p>\n<p><span style=\"color: #0000ff\">Please enter the IP address of your ISP&#8217;s primary DNS server.<\/span><br \/><span style=\"color: #0000ff\">If your ISP claims that &#8216;the server will provide dynamic DNS addresses&#8217;,<\/span><br \/><span style=\"color: #0000ff\">enter &#8216;server&#8217; (all lower-case) here.<\/span><br \/><span style=\"color: #0000ff\">If you just press enter, I will assume you know what you are<\/span><br \/><span style=\"color: #0000ff\">doing and not modify your DNS setup.<\/span><br \/><span style=\"color: #0000ff\">Enter the DNS information here: <span style=\"color: #ff0000\">168.95.1.1<\/span><\/span><br \/><span style=\"color: #0000ff\">Please enter the IP address of your ISP&#8217;s secondary DNS server.<\/span><br \/><span style=\"color: #0000ff\">If you just press enter, I will assume there is only one DNS server.<\/span><br \/><span style=\"color: #0000ff\">Enter the secondary DNS server address here: <span style=\"color: #ff0000\">8.8.8.8<\/span><\/span><\/p>\n<p><span style=\"color: #0000ff\">PASSWORD<\/span><\/p>\n<p><span style=\"color: #0000ff\">Please enter your Password:<\/span><br \/><span style=\"color: #0000ff\">Please re-enter your Password:<\/span><\/p>\n<p><span style=\"color: #0000ff\">USERCTRL<\/span><\/p>\n<p><span style=\"color: #0000ff\">Please enter &#8216;yes&#8217; (three letters, lower-case.) if you want to allow<\/span><br \/><span style=\"color: #0000ff\">normal user to start or stop DSL connection (default yes):<\/span><\/p>\n<p><span style=\"color: #0000ff\">FIREWALLING<\/span><\/p>\n<p><span style=\"color: #0000ff\">Please choose the firewall rules to use.\u00a0 Note that these rules are<\/span><br \/><span style=\"color: #0000ff\">very basic.\u00a0 You are strongly encouraged to use a more sophisticated<\/span><br \/><span style=\"color: #0000ff\">firewall setup; however, these will provide basic security.\u00a0 If you<\/span><br \/><span style=\"color: #0000ff\">are running any servers on your machine, you must choose &#8216;NONE&#8217; and<\/span><br \/><span style=\"color: #0000ff\">set up firewalling yourself.\u00a0 Otherwise, the firewall rules will deny<\/span><br \/><span style=\"color: #0000ff\">access to all standard servers like Web, e-mail, ftp, etc.\u00a0 If you<\/span><br \/><span style=\"color: #0000ff\">are using SSH, the rules will block outgoing SSH connections which<\/span><br \/><span style=\"color: #0000ff\">allocate a privileged source port.<\/span><\/p>\n<p><span style=\"color: #0000ff\">The firewall choices are:<\/span><br \/><span style=\"color: #0000ff\">0 &#8211; NONE: This script will not set any firewall rules.\u00a0 You are responsible<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 for ensuring the security of your machine.\u00a0 You are STRONGLY<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 recommended to use some kind of firewall rules.<\/span><br \/><span style=\"color: #0000ff\">1 &#8211; STANDALONE: Appropriate for a basic stand-alone web-surfing workstation<\/span><br \/><span style=\"color: #0000ff\">2 &#8211; MASQUERADE: Appropriate for a machine acting as an Internet gateway<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 for a LAN<\/span><br \/><span style=\"color: #0000ff\">Choose a type of firewall (0-2): <span style=\"color: #ff0000\">0<\/span><\/span><\/p>\n<p><span style=\"color: #0000ff\">Start this connection at boot time<\/span><\/p>\n<p><span style=\"color: #0000ff\">Do you want to start this connection at boot time?<\/span><br \/><span style=\"color: #0000ff\">Please enter no or yes (default no):<span style=\"color: #ff0000\">yes<\/span><\/span><\/p>\n<p><span style=\"color: #0000ff\">** Summary of what you entered **<\/span><\/p>\n<p><span style=\"color: #0000ff\">Ethernet Interface: eno16777736<\/span><br \/><span style=\"color: #0000ff\">User name:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 xxxxx@hinet.net<\/span><br \/><span style=\"color: #0000ff\">Activate-on-demand: No<\/span><br \/><span style=\"color: #0000ff\">Primary DNS:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 168.95.1.1<\/span><br \/><span style=\"color: #0000ff\">Secondary DNS:\u00a0\u00a0\u00a0\u00a0\u00a0 8.8.8.8<\/span><br \/><span style=\"color: #0000ff\">Firewalling:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NONE<\/span><br \/><span style=\"color: #0000ff\">User Control:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 yes<\/span><br \/><span style=\"color: #0000ff\">Accept these settings and adjust configuration files (y\/n)? <span style=\"color: #ff0000\">y<\/span><\/span><br \/><span style=\"color: #0000ff\">Adjusting \/etc\/sysconfig\/network-scripts\/ifcfg-ppp0<\/span><br \/><span style=\"color: #0000ff\">Adjusting \/etc\/resolv.conf<\/span><br \/><span style=\"color: #0000ff\">\u00a0 (But first backing it up to \/etc\/resolv.conf.bak)<\/span><br \/><span style=\"color: #0000ff\">Adjusting \/etc\/ppp\/chap-secrets and \/etc\/ppp\/pap-secrets<\/span><br \/><span style=\"color: #0000ff\">\u00a0 (But first backing it up to \/etc\/ppp\/chap-secrets.bak)<\/span><br \/><span style=\"color: #0000ff\">\u00a0 (But first backing it up to \/etc\/ppp\/pap-secrets.bak)<\/span><\/p>\n<p><span style=\"color: #0000ff\">Congratulations, it should be all set up!<\/span><\/p>\n<p><span style=\"color: #0000ff\">Type &#8216;\/sbin\/ifup ppp0&#8217; to bring up your xDSL link and &#8216;\/sbin\/ifdown ppp0&#8217;<\/span><br \/><span style=\"color: #0000ff\">to bring it down.<\/span><br \/><span style=\"color: #0000ff\">Type &#8216;\/sbin\/pppoe-status \/etc\/sysconfig\/network-scripts\/ifcfg-ppp0&#8217;<\/span><br \/><span style=\"color: #0000ff\">to see the link status.<\/span><\/p>\n<p>\u539f\u672c\u7684\u7db2\u8def\u8a2d\u5b9a<br \/># <span style=\"color: #ff0000\">ifconfig<\/span><br \/><span style=\"color: #0000ff\">eno16777736: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt;\u00a0 mtu 1500<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 inet 192.168.1.15\u00a0 netmask 255.255.255.0\u00a0 broadcast 192.168.1.255<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 inet6 fe80::20c:29ff:feaf:d7df\u00a0 prefixlen 64\u00a0 scopeid 0x20&lt;link&gt;<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ether 00:0c:2x:ax:dx:dx\u00a0 txqueuelen 1000\u00a0 (Ethernet)<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 RX packets 2343\u00a0 bytes 313808 (306.4 KiB)<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 RX errors 0\u00a0 dropped 2\u00a0 overruns 0\u00a0 frame 0<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 TX packets 816\u00a0 bytes 195933 (191.3 KiB)<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 TX errors 0\u00a0 dropped 0 overruns 0\u00a0 carrier 0\u00a0 collisions 0<\/span><\/p>\n<p><span style=\"color: #0000ff\">lo: flags=73&lt;UP,LOOPBACK,RUNNING&gt;\u00a0 mtu 65536<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 inet 127.0.0.1\u00a0 netmask 255.0.0.0<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 inet6 ::1\u00a0 prefixlen 128\u00a0 scopeid 0x10&lt;host&gt;<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 loop\u00a0 txqueuelen 0\u00a0 (Local Loopback)<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 RX packets 0\u00a0 bytes 0 (0.0 B)<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 RX errors 0\u00a0 dropped 0\u00a0 overruns 0\u00a0 frame 0<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 TX packets 0\u00a0 bytes 0 (0.0 B)<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 TX errors 0\u00a0 dropped 0 overruns 0\u00a0 carrier 0\u00a0 collisions 0<\/span><\/p>\n<p>\u65b0\u589e <span style=\"color: #ff0000\">ppp0<\/span><br \/># <span style=\"color: #ff0000\">ifconfig<\/span><br \/><span style=\"color: #0000ff\">eno16777736: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt;\u00a0 mtu 1500<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 inet 192.168.1.15\u00a0 netmask 255.255.255.0\u00a0 broadcast 192.168.1.255<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 inet6 fe80::20c:29ff:feaf:d7df\u00a0 prefixlen 64\u00a0 scopeid 0x20&lt;link&gt;<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ether 00:0c:2x:ax:dx:dx\u00a0 txqueuelen 1000\u00a0 (Ethernet)<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 RX packets 2343\u00a0 bytes 313808 (306.4 KiB)<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 RX errors 0\u00a0 dropped 2\u00a0 overruns 0\u00a0 frame 0<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 TX packets 816\u00a0 bytes 195933 (191.3 KiB)<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 TX errors 0\u00a0 dropped 0 overruns 0\u00a0 carrier 0\u00a0 collisions 0<\/span><\/p>\n<p><span style=\"color: #0000ff\">lo: flags=73&lt;UP,LOOPBACK,RUNNING&gt;\u00a0 mtu 65536<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 inet 127.0.0.1\u00a0 netmask 255.0.0.0<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 inet6 ::1\u00a0 prefixlen 128\u00a0 scopeid 0x10&lt;host&gt;<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 loop\u00a0 txqueuelen 0\u00a0 (Local Loopback)<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 RX packets 0\u00a0 bytes 0 (0.0 B)<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 RX errors 0\u00a0 dropped 0\u00a0 overruns 0\u00a0 frame 0<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 TX packets 0\u00a0 bytes 0 (0.0 B)<\/span><br \/><span style=\"color: #0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 TX errors 0\u00a0 dropped 0 overruns 0\u00a0 carrier 0\u00a0 collisions 0<\/span><\/p>\n<p><span style=\"color: #ff0000\">ppp0: flags=4305&lt;UP,POINTOPOINT,RUNNING,NOARP,MULTICAST&gt;\u00a0 mtu 1492<\/span><br \/><span style=\"color: #ff0000\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 inet 1.162.11.63\u00a0 netmask 255.255.255.255\u00a0 destination 168.95.98.254<\/span><br \/><span style=\"color: #ff0000\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ppp\u00a0 txqueuelen 3\u00a0 (Point-to-Point Protocol)<\/span><br \/><span style=\"color: #ff0000\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 RX packets 6\u00a0 bytes 178 (178.0 B)<\/span><br \/><span style=\"color: #ff0000\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 RX errors 0\u00a0 dropped 0\u00a0 overruns 0\u00a0 frame 0<\/span><br \/><span style=\"color: #ff0000\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 TX packets 7\u00a0 bytes 269 (269.0 B)<\/span><br \/><span style=\"color: #ff0000\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 TX errors 0\u00a0 dropped 0 overruns 0\u00a0 carrier 0\u00a0 collisions 0<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u53c3\u8003\u7db2\u7ad9\uff1a\u5728CentOS 7\u8a2d\u5b9aPPPoE\u64a5\u63a5\u529f\u80fd | Kevin Linul \u7db2\u8def\u65e5\u8a18\u672c 1. \u5b89\u88dd rp- &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/2blog.ilc.edu.tw\/25793\/2016\/08\/21\/%e5%9c%a8-centos-7-x-%e5%ae%89%e8%a3%9d-pppoe-%e6%92%a5%e6%8e%a5%e5%8a%9f%e8%83%bd\/\" class=\"more-link\">\u95b1\u8b80\u5168\u6587<span class=\"screen-reader-text\">\u3008\u5728 CentOS 7.x \u5b89\u88dd PPPoE \u64a5\u63a5\u529f\u80fd\u3009<\/span><\/a><\/p>\n","protected":false},"author":55,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[117],"tags":[],"class_list":["post-19276","post","type-post","status-publish","format-standard","hentry","category-c-78462"],"meta_key":{"_pingme":["1"],"_encloseme":["1"],"lt_post_id":["650582"]},"_links":{"self":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/19276"}],"collection":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/users\/55"}],"replies":[{"embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/comments?post=19276"}],"version-history":[{"count":1,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/19276\/revisions"}],"predecessor-version":[{"id":20826,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/19276\/revisions\/20826"}],"wp:attachment":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/media?parent=19276"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/categories?post=19276"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/tags?post=19276"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}