{"id":453747,"date":"2025-03-30T09:01:46","date_gmt":"2025-03-30T09:01:46","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=453747"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=453747","title":{"rendered":"<span>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 DHCP-server \u043d\u0430 Ubuntu Server \u043d\u0430 VMware Workstation<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 DHCP-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 Ubuntu Server. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043d\u0430 <strong>Ubuntu Server <\/strong>(\u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u043e\u0443\u0442\u0435\u0440\u0430)<strong>.<\/strong><\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 DHCP-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043f\u0438\u044e \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430:<\/p>\n<p><code>sudo cp \/etc\/dhcp\/dhcpd.conf \/etc\/dhcp\/dhcpd.conf.bak<\/code><\/p>\n<p>\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430, \u0432\u043f\u0438\u0441\u0430\u0432:<\/p>\n<p><code>sudo sh -c \"cat \/dev\/null &gt; \/etc\/dhcp\/dhcpd.conf\"<\/code><\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 nano \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b:<\/p>\n<p><code>sudo nano \/etc\/dhcp\/dhcpd.conf<\/code><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b87\/f10\/c57\/b87f10c570266dd9f32b6d13cff4506a.png\" width=\"977\" height=\"391\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b87\/f10\/c57\/b87f10c570266dd9f32b6d13cff4506a.png\"\/><\/figure>\n<p>\u041d\u0438\u0436\u0435 \u043d\u0430\u043f\u0438\u0448\u0443 \u0442\u0435\u043a\u0441\u0442\u043e\u043c \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c:<\/p>\n<pre><code>option domain-name \"au-team.irpo\";  default-lease-time 3600;  max-lease-time 3600;  \u00a0  subnet 192.168.200.0 netmask 255.255.255.240 {  \u00a0 range 192.168.200.2 192.168.200.8;  \u00a0 option routers 172. 168.4.1;  \u00a0 option domain-name-servers 172. 16.4.1;  }<\/code><\/pre>\n<p>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p><strong>default-lease-time<\/strong>\u00a0\u2014 \u0432\u0440\u0435\u043c\u044f \u0430\u0440\u0435\u043d\u0434\u044b (\u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445) \u0430\u0434\u0440\u0435\u0441\u0430 \u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0435\u0441\u043b\u0438 \u043a\u043b\u0438\u0435\u043d\u0442 \u043d\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u043b \u0434\u0440\u0443\u0433\u043e\u0435;<\/p>\n<p><strong>max-lease-time<\/strong>\u00a0\u2014 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0430\u0440\u0435\u043d\u0434\u044b \u0430\u0434\u0440\u0435\u0441\u0430 (\u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445);<\/p>\n<p><strong>subnet<\/strong>\u00a0\u2014 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 IP-\u0430\u0434\u0440\u0435\u0441 \u0438 \u043c\u0430\u0441\u043a\u0443 \u0441\u0435\u0442\u0438;<\/p>\n<p><strong>range<\/strong>\u00a0\u2014 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0430\u0434\u0440\u0435\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c (\u0440\u0430\u0431\u043e\u0447\u0438\u043c \u0441\u0442\u0430\u043d\u0446\u0438\u044f\u043c) \u043f\u043e \u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c;<\/p>\n<p><strong>option<\/strong>\u00a0<strong>routers<\/strong>\u00a0\u2014 \u0430\u0434\u0440\u0435\u0441 \u0448\u043b\u044e\u0437\u0430 (\u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430) \u0434\u043b\u044f \u0432\u044b\u0445\u043e\u0434\u0430 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442. \u0412 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u044d\u0442\u043e \u0430\u0434\u0440\u0435\u0441 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430;<\/p>\n<p><strong>option<\/strong>\u00a0<strong>domain-name-servers<\/strong>\u00a0\u2014 \u0430\u0434\u0440\u0435\u0441 DNS-\u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0412 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u044d\u0442\u043e \u0430\u0434\u0440\u0435\u0441 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438 \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c, \u0441 \u043a\u0430\u043a\u043e\u0433\u043e \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c DHCP-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430 \u0432\u044b\u0434\u0430\u0447\u0443 \u0430\u0434\u0440\u0435\u0441\u043e\u0432. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u00a0<strong>\/etc\/default<\/strong>\u00a0\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0444\u0430\u0439\u043b\u00a0<strong>isc-dhcp-server<\/strong>. \u0412 \u0441\u0442\u0440\u043e\u043a\u0435, \u0433\u0434\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e <strong>INTERFACESv4<\/strong> \u0432 \u043a\u0430\u0432\u044b\u0447\u043a\u0430\u0445 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430, \u0440\u0430\u0437\u0434\u0430\u044e\u0449\u0435\u0433\u043e IP-\u0430\u0434\u0440\u0435\u0441\u0430. \u0412 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u044d\u0442\u043e\u00a0<strong>vlan200<\/strong>.(\u0443 \u043c\u0435\u043d\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 openvswitch, \u0430 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0430 Ubuntu \u044d\u0442\u043e ens33, ens34 \u0438 \u0442.\u0434., \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0432\u044f\u0437\u0430\u043d \u0441 <strong>\u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c<\/strong>)<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/20d\/302\/904\/20d3029049b364d68e8f24a12fb8c414.png\" width=\"1516\" height=\"716\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/20d\/302\/904\/20d3029049b364d68e8f24a12fb8c414.png\"\/><\/figure>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430, \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u0435\u0433\u043e \u0438 \u0432\u044b\u0439\u0442\u0438 \u0438\u0437 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0433\u043e \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430\u00a0MC. \u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043b\u0443\u0436\u0431\u0443\u00a0DHCP\u00a0\u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<p><code>sudo systemctl restart isc-dhcp-server<\/code><\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u043b\u0443\u0436\u0431\u044b\u00a0DHCP:<\/p>\n<p><code>sudo systemctl status isc-dhcp-server<\/code><\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d36\/d4e\/029\/d36d4e029f5d7010c8a8cbd9ccd279a8.png\" width=\"1522\" height=\"464\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d36\/d4e\/029\/d36d4e029f5d7010c8a8cbd9ccd279a8.png\"\/><\/figure>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043d\u0430 <strong>\u043a\u043b\u0438\u0435\u043d\u0442\u0435.<\/strong><\/p>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441\u0435\u0442\u0438 \/etc\/netplan. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b 00-installer-config.yalm \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e nano.<\/p>\n<p>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0441 \u0440\u043e\u0443\u0442\u0435\u0440\u043e\u043c \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u0430\u043a:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/645\/93b\/c94\/64593bc94ed0b424ff45b5b76291d883.png\" alt=\"\" title=\"\" width=\"505\" height=\"221\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/645\/93b\/c94\/64593bc94ed0b424ff45b5b76291d883.png\"\/><\/figure>\n<p>\u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c dhcp4: true(\u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c ip) \u0438 gateway4: 192.168.0.2(\u0448\u043b\u044e\u0437 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0430\u0434\u0440\u0435\u0441 dhcp \u0441\u0435\u0440\u0432\u0435\u0440\u0430).<\/p>\n<p>\u041d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 ip \u0432\u0432\u0435\u0434\u0435\u043c:<\/p>\n<p><code>ip -br a<\/code><\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/127\/60a\/dca\/12760adca49a9381624d447b8b12dd6b.png\" width=\"431\" height=\"49\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/127\/60a\/dca\/12760adca49a9381624d447b8b12dd6b.png\"\/><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 dhcp \u043d\u0430 \u0440\u043e\u0443\u0442\u0435\u0440\u0435 \u0432\u0441\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/895282\/\"> https:\/\/habr.com\/ru\/articles\/895282\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 DHCP-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 Ubuntu Server. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043d\u0430 <strong>Ubuntu Server <\/strong>(\u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u043e\u0443\u0442\u0435\u0440\u0430)<strong>.<\/strong><\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 DHCP-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u043e\u043f\u0438\u044e \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430:<\/p>\n<p><code>sudo cp \/etc\/dhcp\/dhcpd.conf \/etc\/dhcp\/dhcpd.conf.bak<\/code><\/p>\n<p>\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430, \u0432\u043f\u0438\u0441\u0430\u0432:<\/p>\n<p><code>sudo sh -c \"cat \/dev\/null &gt; \/etc\/dhcp\/dhcpd.conf\"<\/code><\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 nano \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b:<\/p>\n<p><code>sudo nano \/etc\/dhcp\/dhcpd.conf<\/code><\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041d\u0438\u0436\u0435 \u043d\u0430\u043f\u0438\u0448\u0443 \u0442\u0435\u043a\u0441\u0442\u043e\u043c \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c:<\/p>\n<pre><code>option domain-name \"au-team.irpo\";  default-lease-time 3600;  max-lease-time 3600;  \u00a0  subnet 192.168.200.0 netmask 255.255.255.240 {  \u00a0 range 192.168.200.2 192.168.200.8;  \u00a0 option routers 172. 168.4.1;  \u00a0 option domain-name-servers 172. 16.4.1;  }<\/code><\/pre>\n<p>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 \u0440\u0430\u0441\u0448\u0438\u0444\u0440\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p><strong>default-lease-time<\/strong>\u00a0\u2014 \u0432\u0440\u0435\u043c\u044f \u0430\u0440\u0435\u043d\u0434\u044b (\u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445) \u0430\u0434\u0440\u0435\u0441\u0430 \u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0435\u0441\u043b\u0438 \u043a\u043b\u0438\u0435\u043d\u0442 \u043d\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u043b \u0434\u0440\u0443\u0433\u043e\u0435;<\/p>\n<p><strong>max-lease-time<\/strong>\u00a0\u2014 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0430\u0440\u0435\u043d\u0434\u044b \u0430\u0434\u0440\u0435\u0441\u0430 (\u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445);<\/p>\n<p><strong>subnet<\/strong>\u00a0\u2014 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 IP-\u0430\u0434\u0440\u0435\u0441 \u0438 \u043c\u0430\u0441\u043a\u0443 \u0441\u0435\u0442\u0438;<\/p>\n<p><strong>range<\/strong>\u00a0\u2014 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0430\u0434\u0440\u0435\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c (\u0440\u0430\u0431\u043e\u0447\u0438\u043c \u0441\u0442\u0430\u043d\u0446\u0438\u044f\u043c) \u043f\u043e \u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c;<\/p>\n<p><strong>option<\/strong>\u00a0<strong>routers<\/strong>\u00a0\u2014 \u0430\u0434\u0440\u0435\u0441 \u0448\u043b\u044e\u0437\u0430 (\u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u0430) \u0434\u043b\u044f \u0432\u044b\u0445\u043e\u0434\u0430 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442. \u0412 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u044d\u0442\u043e \u0430\u0434\u0440\u0435\u0441 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430;<\/p>\n<p><strong>option<\/strong>\u00a0<strong>domain-name-servers<\/strong>\u00a0\u2014 \u0430\u0434\u0440\u0435\u0441 DNS-\u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0412 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u044d\u0442\u043e \u0430\u0434\u0440\u0435\u0441 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438 \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c, \u0441 \u043a\u0430\u043a\u043e\u0433\u043e \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c DHCP-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430 \u0432\u044b\u0434\u0430\u0447\u0443 \u0430\u0434\u0440\u0435\u0441\u043e\u0432. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u00a0<strong>\/etc\/default<\/strong>\u00a0\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0444\u0430\u0439\u043b\u00a0<strong>isc-dhcp-server<\/strong>. \u0412 \u0441\u0442\u0440\u043e\u043a\u0435, \u0433\u0434\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e <strong>INTERFACESv4<\/strong> \u0432 \u043a\u0430\u0432\u044b\u0447\u043a\u0430\u0445 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430, \u0440\u0430\u0437\u0434\u0430\u044e\u0449\u0435\u0433\u043e IP-\u0430\u0434\u0440\u0435\u0441\u0430. \u0412 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u044d\u0442\u043e\u00a0<strong>vlan200<\/strong>.(\u0443 \u043c\u0435\u043d\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 openvswitch, \u0430 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0430 Ubuntu \u044d\u0442\u043e ens33, ens34 \u0438 \u0442.\u0434., \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0432\u044f\u0437\u0430\u043d \u0441 <strong>\u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c<\/strong>)<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430, \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u0435\u0433\u043e \u0438 \u0432\u044b\u0439\u0442\u0438 \u0438\u0437 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0433\u043e \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430\u00a0MC. \u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043b\u0443\u0436\u0431\u0443\u00a0DHCP\u00a0\u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<p><code>sudo systemctl restart isc-dhcp-server<\/code><\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u043b\u0443\u0436\u0431\u044b\u00a0DHCP:<\/p>\n<p><code>sudo systemctl status isc-dhcp-server<\/code><\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043d\u0430 <strong>\u043a\u043b\u0438\u0435\u043d\u0442\u0435.<\/strong><\/p>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441\u0435\u0442\u0438 \/etc\/netplan. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b 00-installer-config.yalm \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e nano.<\/p>\n<p>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0441 \u0440\u043e\u0443\u0442\u0435\u0440\u043e\u043c \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u0430\u043a:<\/p>\n<figure class=\"\"><\/figure>\n<p>\u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c dhcp4: true(\u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c ip) \u0438 gateway4: 192.168.0.2(\u0448\u043b\u044e\u0437 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0430\u0434\u0440\u0435\u0441 dhcp \u0441\u0435\u0440\u0432\u0435\u0440\u0430).<\/p>\n<p>\u041d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 ip \u0432\u0432\u0435\u0434\u0435\u043c:<\/p>\n<p><code>ip -br a<\/code><\/p>\n<figure class=\"\"><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 dhcp \u043d\u0430 \u0440\u043e\u0443\u0442\u0435\u0440\u0435 \u0432\u0441\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/895282\/\"> https:\/\/habr.com\/ru\/articles\/895282\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-453747","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/453747","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=453747"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/453747\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=453747"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=453747"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=453747"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}