{"id":75,"date":"2022-04-25T23:03:38","date_gmt":"2022-04-25T21:03:38","guid":{"rendered":"https:\/\/activum24.pl\/?p=75"},"modified":"2024-02-24T18:56:41","modified_gmt":"2024-02-24T17:56:41","slug":"dhcpd-failover","status":"publish","type":"post","link":"https:\/\/activum24.pl\/index.php\/2022\/04\/25\/dhcpd-failover\/","title":{"rendered":"DHCP &#8211; failover"},"content":{"rendered":"\n<p>Zrealizowa\u0142em w domowej sieci mechanizm failover dla DHCP. <\/p>\n\n\n\n<p>Rozwi\u0105zanie skonfigurowane na 2 x rpi4, docker, image: <a href=\"http:\/\/192.168.0.31:9001\/#!\/2\/docker\/images\/microscotch~2Fdhcpd-alpine%3Alatest\">microscotch\/dhcpd-alpine:latest<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"675\" height=\"768\" src=\"https:\/\/activum24.pl\/wp-content\/uploads\/2023\/10\/clip_image0017.png\" alt=\"\" class=\"wp-image-344\" srcset=\"https:\/\/activum24.pl\/wp-content\/uploads\/2023\/10\/clip_image0017.png 675w, https:\/\/activum24.pl\/wp-content\/uploads\/2023\/10\/clip_image0017-264x300.png 264w\" sizes=\"auto, (max-width: 675px) 100vw, 675px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Primary<\/h2>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:100%\">\n<pre class=\"wp-block-code\"><code>default-lease-time 3600;\nmax-lease-time 86400;\nauthoritative;\nlog-facility local7;\n\nfailover peer \u201edhcpfailover\u201d {\nprimary;\naddress 192.168.0.30;\nport 648;\npeer address 192.168.0.32;\npeer port 648;\nmclt 1800;\nsplit 128;\nmax-response-delay 30;\nmax-unacked-updates 10;\nload balance max seconds 3;\n}\n\nsubnet 192.168.0.0 netmask 255.255.255.0 {\npool {\nfailover peer \u201edhcpfailover\u201d;\nmax-lease-time 1800;\nrange 192.168.0.200 192.168.0.249;\n}\noption routers 192.168.0.1;\noption domain-name-servers 192.168.0.31, 192.168.0.30;\n}<\/code><\/pre>\n<\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Secondary<\/h2>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:100%\">\n<pre class=\"wp-block-code\"><code>default-lease-time 3600;\nmax-lease-time 86400;\nauthoritative;\nlog-facility local7;\n\nfailover peer \"dhcpfailover\" {\nsecondary;\naddress 192.168.0.32;\nport 648;\npeer address 192.168.0.30;\npeer port 648;\nmclt 1800;\nmax-response-delay 30;\nmax-unacked-updates 10;\nload balance max seconds 3;\n}\n\nsubnet 192.168.0.0 netmask 255.255.255.0 {\npool {\nfailover peer \"dhcpfailover\";\nmax-lease-time 1800;\nrange 192.168.0.200 192.168.0.249;\n}\noption routers 192.168.0.1;\noption domain-name-servers 192.168.0.31, 192.168.0.30;\n\n}<\/code><\/pre>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:100%\">\n<pre class=\"wp-block-code\"><code>docker run -d --net host --name dhcpd-primary -v \"$(pwd)\/dhcpd\":\/data microscotch\/dhcpd-alpine eth0\n\ndocker run -d --net host --name dhcpd-secondary -v \"$(pwd)\/dhcpd\":\/data microscotch\/dhcpd-alpine eth0<\/code><\/pre>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Zrealizowa\u0142em w domowej sieci mechanizm failover dla DHCP. Rozwi\u0105zanie skonfigurowane na 2 x rpi4, docker, image: microscotch\/dhcpd-alpine:latest Primary Secondary<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-75","post","type-post","status-publish","format-standard","hentry","category-hardware"],"_links":{"self":[{"href":"https:\/\/activum24.pl\/index.php\/wp-json\/wp\/v2\/posts\/75","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/activum24.pl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/activum24.pl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/activum24.pl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/activum24.pl\/index.php\/wp-json\/wp\/v2\/comments?post=75"}],"version-history":[{"count":7,"href":"https:\/\/activum24.pl\/index.php\/wp-json\/wp\/v2\/posts\/75\/revisions"}],"predecessor-version":[{"id":409,"href":"https:\/\/activum24.pl\/index.php\/wp-json\/wp\/v2\/posts\/75\/revisions\/409"}],"wp:attachment":[{"href":"https:\/\/activum24.pl\/index.php\/wp-json\/wp\/v2\/media?parent=75"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/activum24.pl\/index.php\/wp-json\/wp\/v2\/categories?post=75"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/activum24.pl\/index.php\/wp-json\/wp\/v2\/tags?post=75"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}