{"id":4897,"date":"2023-03-20T17:23:00","date_gmt":"2023-03-20T22:23:00","guid":{"rendered":"https:\/\/www.incredigeek.com\/home\/?p=4897"},"modified":"2023-03-20T15:19:52","modified_gmt":"2023-03-20T20:19:52","slug":"mikrotik-dhcp-server-lease-script-variables","status":"publish","type":"post","link":"https:\/\/www.incredigeek.com\/home\/mikrotik-dhcp-server-lease-script-variables\/","title":{"rendered":"Mikrotik DHCP Server Lease Script Variables"},"content":{"rendered":"\n<p>The following variables are usable inside of the DHCP-Server script tab.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>leaseBound &#8211; set to &#8220;1&#8221; if bound, otherwise set to &#8220;0&#8221;<\/li>\n\n\n\n<li>leaseServerName &#8211; dhcp server name<\/li>\n\n\n\n<li>leaseActMAC &#8211; active mac address<\/li>\n\n\n\n<li>leaseActIP &#8211; active IP address<\/li>\n\n\n\n<li>lease-hostname &#8211; client hostname<\/li>\n\n\n\n<li>lease-options &#8211; array of received options<\/li>\n<\/ul>\n\n\n\n<p>The DHCP server script runs every time there is a new lease, or a lease expires.  Doesn&#8217;t look to run when static leases renew.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2023\/03\/image-2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"422\" height=\"281\" src=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2023\/03\/image-2.png\" alt=\"\" class=\"wp-image-4898\" srcset=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2023\/03\/image-2.png 422w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2023\/03\/image-2-300x200.png 300w\" sizes=\"auto, (max-width: 422px) 100vw, 422px\" \/><\/a><figcaption class=\"wp-element-caption\">DHCP Server Scripts<\/figcaption><\/figure>\n\n\n\n<p><a href=\"https:\/\/wiki.mikrotik.com\/wiki\/Manual:IP\/DHCP_Server#General\">https:\/\/wiki.mikrotik.com\/wiki\/Manual:IP\/DHCP_Server#General<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The following variables are usable inside of the DHCP-Server script tab. The DHCP server script runs every time there is a new lease, or a lease expires. Doesn&#8217;t look to run when static leases renew. https:\/\/wiki.mikrotik.com\/wiki\/Manual:IP\/DHCP_Server#General<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[452],"tags":[744,301,173,1422],"class_list":["post-4897","post","type-post","status-publish","format-standard","hentry","category-mikrotik","tag-dhcp","tag-mikrotik","tag-script","tag-variables"],"_links":{"self":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/4897","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/comments?post=4897"}],"version-history":[{"count":3,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/4897\/revisions"}],"predecessor-version":[{"id":4901,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/4897\/revisions\/4901"}],"wp:attachment":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/media?parent=4897"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/categories?post=4897"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/tags?post=4897"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}