{"id":1454,"date":"2019-08-04T02:11:43","date_gmt":"2019-08-04T02:11:43","guid":{"rendered":"https:\/\/peloo.net\/?p=1454"},"modified":"2019-08-04T02:11:43","modified_gmt":"2019-08-04T02:11:43","slug":"%e6%a0%91%e8%8e%93%e6%b4%be%e9%85%8d%e7%bd%ae%e9%9d%99%e6%80%81ip%e5%92%8c%e5%8a%a8%e6%80%81dhcp%e8%8e%b7%e5%8f%96ip","status":"publish","type":"post","link":"https:\/\/peloo.net\/?p=1454","title":{"rendered":"\u6811\u8393\u6d3e\u914d\u7f6e\u9759\u6001ip\u548c\u52a8\u6001DHCP\u83b7\u53d6ip"},"content":{"rendered":"<div>\n\t1 &nbsp;\u914d\u7f6eDHCP\u52a8\u6001\u83b7\u53d6ip\uff1a\n<\/div>\n<div>\n\t\u5f00\u542fdhcpcd\u670d\u52a1\n<\/div>\n<div>\n\tpi@pi_new:~ $ !718\n<\/div>\n<div>\n\tsudo vi \/etc\/network\/interfaces\n<\/div>\n<div>\n\tpi@pi_new:~ $ sudo systemctl enable dhcpcd&nbsp;\n<\/div>\n<div>\n\tSynchronizing state of dhcpcd.service with SysV service script with \/lib\/systemd\/systemd-sysv-install.\n<\/div>\n<div>\n\tExecuting: \/lib\/systemd\/systemd-sysv-install enable dhcpcd\n<\/div>\n<div>\n\tpi@pi_new:~ $&nbsp;\n<\/div>\n<div>\n\tpi@pi_new:~ $ date&nbsp;\n<\/div>\n<div>\n\tSun 4 Aug 10:05:55 HKT 2019\n<\/div>\n<div>\n\t\u7f16\u8f91\/etc\/network\/interfaces\uff0c\u4fee\u6539\u6709\u7ebf\u7f51\u5361\u83b7\u53d6ip\u65b9\u5f0f\u4e3adhcp\uff0c\n<\/div>\n<div>\n\tpi@pi_new:~ $ sudo tail -30 \/etc\/network\/interfaces\n<\/div>\n<div>\n\t# interfaces(5) file used by ifup(8) and ifdown(8)\n<\/div>\n<div>\n\t&nbsp;\n<\/div>\n<div>\n\t# Please note that this file is written to be used with dhcpcd\n<\/div>\n<div>\n\t# For static IP, consult \/etc\/dhcpcd.conf and &#039;man dhcpcd.conf&#039;\n<\/div>\n<div>\n\t&nbsp;\n<\/div>\n<div>\n\t# Include files from \/etc\/network\/interfaces.d:\n<\/div>\n<div>\n\tsource-directory \/etc\/network\/interfaces.d\n<\/div>\n<div>\n\t&nbsp;\n<\/div>\n<div>\n\tauto enxb827eb873f7f\n<\/div>\n<div>\n\tiface enxb827eb873f7f inet dhcp\n<\/div>\n<div>\n\t#iface enxb827eb873f7f inet static\n<\/div>\n<div>\n\t#address 172.17.1.111\n<\/div>\n<div>\n\t#netmask 255.255.255.0\n<\/div>\n<div>\n\t#network 172.17.1.0\n<\/div>\n<div>\n\t#broadcast 172.17.1.255\n<\/div>\n<div>\n\t#gateway 172.17.1.254\n<\/div>\n<div>\n\t#dns-nameservers 172.17.1.140 223.5.5.5\n<\/div>\n<div>\n\t2 &nbsp;\u914d\u7f6e\u9759\u6001ip\uff1a\n<\/div>\n<div>\n\t\u5173\u95eddhcpcd\u670d\u52a1\uff0c\n<\/div>\n<div>\n\tpi@pi_new:~ $ date ; sudo systemctl disable dhcpcd&nbsp;\n<\/div>\n<div>\n\tSun 4 Aug 10:08:23 HKT 2019\n<\/div>\n<div>\n\tSynchronizing state of dhcpcd.service with SysV service script with \/lib\/systemd\/systemd-sysv-install.\n<\/div>\n<div>\n\tExecuting: \/lib\/systemd\/systemd-sysv-install disable dhcpcd\n<\/div>\n<div>\n\tRemoved \/etc\/systemd\/system\/dhcpcd5.service.\n<\/div>\n<div>\n\t<span>\u7f16\u8f91\/etc\/network\/interfaces\uff0c\u4fee\u6539\u6709\u7ebf\u7f51\u5361ip\u4fe1\u606f\uff0c<\/span>\n<\/div>\n<div>\n\t<span>pi@pi_new:~ $ sudo tail -30 \/etc\/network\/interfaces<\/span>\n<\/div>\n<div>\n\t<span># interfaces(5) file used by ifup(8) and ifdown(8)<\/span>\n<\/div>\n<div>\n\t&nbsp;\n<\/div>\n<div>\n\t<span># Please note that this file is written to be used with dhcpcd<\/span>\n<\/div>\n<div>\n\t<span># For static IP, consult \/etc\/dhcpcd.conf and &#039;man dhcpcd.conf&#039;<\/span>\n<\/div>\n<div>\n\t&nbsp;\n<\/div>\n<div>\n\t<span># Include files from \/etc\/network\/interfaces.d:<\/span>\n<\/div>\n<div>\n\t<span>source-directory \/etc\/network\/interfaces.d<\/span>\n<\/div>\n<div>\n\t&nbsp;\n<\/div>\n<div>\n\t<span>auto enxb827eb873f7f<\/span>\n<\/div>\n<div>\n\t<span>#iface enxb827eb873f7f inet dhcp<\/span>\n<\/div>\n<div>\n\t<span>iface enxb827eb873f7f inet static<\/span>\n<\/div>\n<div>\n\t<span>address 172.17.1.111<\/span>\n<\/div>\n<div>\n\t<span>netmask 255.255.255.0<\/span>\n<\/div>\n<div>\n\t<span>network 172.17.1.0<\/span>\n<\/div>\n<div>\n\t<span>broadcast 172.17.1.255<\/span>\n<\/div>\n<div>\n\t<span>gateway 172.17.1.254<\/span>\n<\/div>\n<div>\n\t<span>dns-nameservers 172.17.1.140 223.5.5.5<\/span>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>1 &nbsp;\u914d\u7f6eDHCP\u52a8\u6001\u83b7\u53d6ip\uff1a \u5f00\u542fdhcpcd\u670d\u52a1 pi@pi_new:~ $ !718 sudo vi \/etc\/network\/interfaces pi@pi_new:~ $ sudo systemctl enable dhcpcd&nbsp; Synchronizing state of dhcpcd.service with SysV service script with \/lib\/systemd\/systemd-sysv-install. Executing: \/lib\/systemd\/systemd-sysv-install enable dhcpcd pi@pi_new:~ $&nbsp; pi@pi_new:~ $ date&nbsp; Sun 4 Aug 10:05:55 HKT 2019 \u7f16\u8f91\/etc\/network\/interfaces\uff0c\u4fee\u6539\u6709\u7ebf\u7f51\u5361\u83b7\u53d6ip\u65b9\u5f0f\u4e3adhcp\uff0c pi@pi_new:~ $ sudo tail -30 \/etc\/network\/interfaces # interfaces(5) file used by ifup(8) and ifdown(8)&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[],"class_list":["post-1454","post","type-post","status-publish","format-standard","hentry","category-pi"],"aioseo_notices":[],"brizy_media":[],"_links":{"self":[{"href":"https:\/\/peloo.net\/index.php?rest_route=\/wp\/v2\/posts\/1454","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/peloo.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/peloo.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/peloo.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/peloo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1454"}],"version-history":[{"count":1,"href":"https:\/\/peloo.net\/index.php?rest_route=\/wp\/v2\/posts\/1454\/revisions"}],"predecessor-version":[{"id":1455,"href":"https:\/\/peloo.net\/index.php?rest_route=\/wp\/v2\/posts\/1454\/revisions\/1455"}],"wp:attachment":[{"href":"https:\/\/peloo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1454"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/peloo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1454"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/peloo.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1454"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}