{"id":3158,"date":"2018-02-17T11:48:58","date_gmt":"2018-02-17T03:48:58","guid":{"rendered":"http:\/\/cn.hostease.com\/xueyuan\/?p=3158"},"modified":"2018-02-17T11:48:58","modified_gmt":"2018-02-17T03:48:58","slug":"ubuntu-%e5%ae%89%e8%a3%85dhcp%e6%9c%8d%e5%8a%a1","status":"publish","type":"post","link":"https:\/\/cn.hostease.com\/xueyuan\/hemanual\/ubuntu-%e5%ae%89%e8%a3%85dhcp%e6%9c%8d%e5%8a%a1\/","title":{"rendered":"Ubuntu-\u5b89\u88c5DHCP\u670d\u52a1"},"content":{"rendered":"<p><strong><b>\u5b89\u88c5<\/b><\/strong><\/p>\n<p>$ sudo apt-get install dhcp3-server<\/p>\n<p>&nbsp;<\/p>\n<p><strong><b>\u914d\u7f6e<\/b><\/strong><\/p>\n<p>DHCP\u670d\u52a1\u5668\u7684\u914d\u7f6e\u4e3a \/etc\/dhcp3\/dhcpd.conf<\/p>\n<p>&nbsp;<\/p>\n<p>\u4e00\u4e2a\u793a\u4f8b\u914d\u7f6e\u6587\u4ef6\uff1a<\/p>\n<p>ddns-update-style none;<\/p>\n<p>#deny unknown-clients;<\/p>\n<p># only listen on eth1<\/p>\n<p>local-address 192.168.168.30;<\/p>\n<p>&nbsp;<\/p>\n<p># option definitions common to all supported networks&#8230;<\/p>\n<p>option domain-name &#8220;china.nsn-net.net&#8221;;<\/p>\n<p>option domain-name-servers 10.159.195.10,10.159.208.5,10.159.192.10;<\/p>\n<p>&nbsp;<\/p>\n<p>default-lease-time 6000;<\/p>\n<p>max-lease-time 72000;<\/p>\n<p>&nbsp;<\/p>\n<p># Use this to send dhcp log messages to a different log file (you also<\/p>\n<p># have to hack syslog.conf to complete the redirection).<\/p>\n<p>log-facility local7;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>subnet 192.168.168.0 netmask 255.255.255.0 {<\/p>\n<p>allow booting;<\/p>\n<p>allow bootp;<\/p>\n<p>interface br0;<\/p>\n<p>default-lease-time 72000;<\/p>\n<p>max-lease-time 144000;<\/p>\n<p>option domain-name &#8220;china.nsn-net.net&#8221;;<\/p>\n<p>option domain-name-servers 10.159.195.10,10.159.208.5,10.159.192.10;<\/p>\n<p>option routers 192.168.168.30;<\/p>\n<p>&nbsp;<\/p>\n<p>range dynamic-bootp 192.168.168.200 192.168.168.250;<\/p>\n<p>#range 192.168.168.200 192.168.168.250;<\/p>\n<p>&nbsp;<\/p>\n<p># WINS server<\/p>\n<p>option netbios-name-servers 10.160.244.90,10.160.244.89;<\/p>\n<p>&nbsp;<\/p>\n<p># bootp: used for network install<\/p>\n<p>filename &#8220;linux-install\/pxelinux.0&#8221;;<\/p>\n<p>}<\/p>\n<p>&nbsp;<\/p>\n<p>host 3CNL00274 {<\/p>\n<p>hardware ethernet 0:15:58:30:28:f4;<\/p>\n<p>fixed-address 192.168.168.66;<\/p>\n<p>option host-name &#8220;3CNL00274.china.nsn-net.net&#8221;;<\/p>\n<p>&nbsp;<\/p>\n<p>#filename &#8220;vmunix.passacaglia&#8221;;<\/p>\n<p>#server-name &#8220;toccata.fugue.com&#8221;;<\/p>\n<p>}<\/p>\n<p>&nbsp;<\/p>\n<p>host bar {<\/p>\n<p>hardware ethernet 0:1e:c9:6a:e3:b2;<\/p>\n<p>fixed-address 192.168.168.210;<\/p>\n<p>option host-name &#8220;secret.garden.com&#8221;;<\/p>\n<p>}<\/p>\n<p>&nbsp;<\/p>\n<p>host mockey {<\/p>\n<p>hardware ethernet 0:10:18:19:92:39;<\/p>\n<p>fixed-address 192.168.168.10;<\/p>\n<p>option host-name &#8220;flower.garden.com&#8221;;<\/p>\n<p>}<\/p>\n<p>&nbsp;<\/p>\n<p><strong><b>\u542f\u52a8\u548c\u505c\u6b62<\/b><\/strong><\/p>\n<p>\u542f\u52a8<\/p>\n<p># \/etc\/init.d\/dhcp3-server start<\/p>\n<p>&nbsp;<\/p>\n<p>\u505c\u6b62<\/p>\n<p># \/etc\/init.d\/dhcp3-server stop<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b89\u88c5 $ sudo apt-get install dhcp3-server &nbsp; \u914d\u7f6e DHCP\u670d\u52a1 &#8230; <a title=\"Ubuntu-\u5b89\u88c5DHCP\u670d\u52a1\" class=\"read-more\" href=\"https:\/\/cn.hostease.com\/xueyuan\/hemanual\/ubuntu-%e5%ae%89%e8%a3%85dhcp%e6%9c%8d%e5%8a%a1\/\" aria-label=\"\u9605\u8bfb Ubuntu-\u5b89\u88c5DHCP\u670d\u52a1\">\u9605\u8bfb\u66f4\u591a<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3,49,5],"tags":[827,383],"class_list":["post-3158","post","type-post","status-publish","format-standard","hentry","category-hemanual","category-linux","category-jishu","tag-dhcp","tag-ubuntu"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/posts\/3158","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/comments?post=3158"}],"version-history":[{"count":1,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/posts\/3158\/revisions"}],"predecessor-version":[{"id":3159,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/posts\/3158\/revisions\/3159"}],"wp:attachment":[{"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/media?parent=3158"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/categories?post=3158"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/tags?post=3158"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}