{"id":2010,"date":"2019-05-16T23:32:04","date_gmt":"2019-05-16T15:32:04","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=2010"},"modified":"2022-05-06T17:27:18","modified_gmt":"2022-05-06T09:27:18","slug":"dhclient","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/dhclient","title":{"rendered":"dhclient\u547d\u4ee4 – \u52a8\u6001\u83b7\u53d6\u6216\u91ca\u653eIP\u5730\u5740"},"content":{"rendered":"\n
dhclient\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u8bcd\u7ec4\u201cDHCP client\u201d\u7684\u7f29\u5199\uff0c\u5176\u529f\u80fd\u662f\u7528\u4e8e\u52a8\u6001\u83b7\u53d6\u6216\u91ca\u653eIP\u5730\u5740\u3002\u4f7f\u7528dhclient\u547d\u4ee4\u524d\u9700\u8981\u5c06\u7f51\u5361\u6a21\u5f0f\u8bbe\u7f6e\u6210DHCP\u81ea\u52a8\u83b7\u53d6\uff0c\u5426\u5219\u9759\u6001\u6a21\u5f0f\u7684\u7f51\u5361\u662f\u4e0d\u4f1a\u4e3b\u52a8\u5411\u670d\u52a1\u5668\u83b7\u53d6\u5982IP\u5730\u5740\u7b49\u7f51\u5361\u4fe1\u606f\u7684\u3002<\/p>\n\n\n\n
\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>dhclient \u53c2\u6570 [\u7f51\u5361]<\/p>\n\n\n\n \u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n \u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n \u901a\u8fc7\u6307\u5b9a\u7f51\u5361\u53d1\u8d77DHCP\u8bf7\u6c42\uff0c\u83b7\u53d6\u7f51\u5361\u53c2\u6570\uff1a<\/p>\n\n\n\n \u91ca\u653e\u7cfb\u7edf\u4e2d\u5df2\u83b7\u53d6\u7684\u7f51\u5361\u53c2\u6570\uff1a<\/p>\n\n\n\n \u5411\u6307\u5b9a\u7684\u670d\u52a1\u5668\u8bf7\u6c42\u83b7\u53d6\u7f51\u5361\u53c2\u6570\uff1a<\/p>\n\n\n\n \u624b\u52a8\u505c\u6b62\u6267\u884cdhclient\u670d\u52a1\u8fdb\u7a0b\uff1a<\/p>\n\n\n\n dhclient\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u8bcd\u7ec4\u201cDHCP client\u201d\u7684\u7f29\u5199\uff0c\u5176\u529f\u80fd\u662f\u7528\u4e8e\u52a8\u6001\u83b7\u53d6\u6216\u91ca\u653eIP\u5730\u5740\u3002\u4f7f\u7528d […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/2010"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=2010"}],"version-history":[{"count":7,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/2010\/revisions"}],"predecessor-version":[{"id":9314,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/2010\/revisions\/9314"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=2010"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=2010"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=2010"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}-p<\/td> \u6307\u5b9adhcp\u5ba2\u6237\u7aef\u76d1\u542c\u7684\u7aef\u53e3\u53f7\uff08\u9ed8\u8ba4\u7aef\u53e3\u53f786\uff09<\/td><\/tr> -d<\/td> \u603b\u662f\u4ee5\u524d\u53f0\u65b9\u5f0f\u8fd0\u884c\u7a0b\u5e8f<\/td><\/tr> -q<\/td> \u5b89\u9759\u6a21\u5f0f\uff0c\u4e0d\u6253\u5370\u4efb\u4f55\u9519\u8bef\u7684\u63d0\u793a\u4fe1\u606f<\/td><\/tr> -r<\/td> \u91ca\u653eip\u5730\u5740<\/td><\/tr> -n<\/td> \u4e0d\u914d\u7f6e\u4efb\u4f55\u63a5\u53e3<\/td><\/tr> -x<\/td> \u505c\u6b62\u6b63\u5728\u8fd0\u884c\u7684DHCP\u5ba2\u6237\u7aef\uff0c\u800c\u4e0d\u91ca\u653e\u5f53\u524d\u79df\u7ea6\uff0c\u6740\u6b7b\u73b0\u6709\u7684dhclient<\/td><\/tr> -s<\/td> \u5728\u83b7\u53d6ip\u5730\u5740\u4e4b\u524d\u6307\u5b9aDHCP\u670d\u52a1\u5668<\/td><\/tr> -w<\/td> \u5373\u4f7f\u6ca1\u6709\u627e\u5230\u5e7f\u64ad\u63a5\u53e3\uff0c\u4e5f\u7ee7\u7eed\u8fd0\u884c <\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n [root@linuxcool ~]# dhclient ens160<\/strong><\/pre>\n\n\n\n
[root@linuxcool ~]# dhclient -r<\/strong>\nKilled old client process\n<\/pre>\n\n\n\n
[root@linuxcool ~]# dhclient -s 192.168.10.10<\/strong><\/pre>\n\n\n\n
[root@linuxcool ~]# dhclient -x<\/strong>\nRemoved stale PID file<\/pre>\n","protected":false},"excerpt":{"rendered":"