{"id":2094,"date":"2022-12-22T11:10:43","date_gmt":"2022-12-22T15:10:43","guid":{"rendered":"https:\/\/lowtek.ca\/roo\/?p=2094"},"modified":"2022-12-22T11:10:43","modified_gmt":"2022-12-22T15:10:43","slug":"openwrt-luci-missing-dhcp-and-dns-menu-option","status":"publish","type":"post","link":"https:\/\/lowtek.ca\/roo\/2022\/openwrt-luci-missing-dhcp-and-dns-menu-option\/","title":{"rendered":"OpenWRT &#8211; LuCI missing DHCP and DNS menu option"},"content":{"rendered":"<p><a href=\"https:\/\/openwrt.org\/\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-2095\" src=\"https:\/\/lowtek.ca\/roo\/wp-content\/uploads\/2022\/12\/openwrt-luci-missing-menu-500x322.jpg\" alt=\"\" width=\"500\" height=\"322\" srcset=\"https:\/\/lowtek.ca\/roo\/wp-content\/uploads\/2022\/12\/openwrt-luci-missing-menu-500x322.jpg 500w, https:\/\/lowtek.ca\/roo\/wp-content\/uploads\/2022\/12\/openwrt-luci-missing-menu.jpg 768w\" sizes=\"auto, (max-width: 500px) 85vw, 500px\" \/><\/a>OpenWRT usually has a &#8220;DHCP and DNS&#8221; menu in the web UI (<a href=\"https:\/\/openwrt.org\/docs\/guide-user\/luci\/start\">LuCI<\/a>), it will also have &#8220;Hostnames&#8221; as well. Something was amiss with my setup, as the menu wasn&#8217;t showing up.<\/p>\n<p>This menu is a web based view of the <code>\/etc\/config\/dhcp<\/code> configuration file. I&#8217;ve got quite a bit of customization in this file and for the most part my network was behaving normally, so this was a bit of a puzzle for me. Why would most things be working as expected, but the LuCI web UI wasn&#8217;t?<\/p>\n<p>My first inclination was to reboot things to see if this was something that <a href=\"https:\/\/lowtek.ca\/roo\/wp-content\/uploads\/2022\/12\/Have-you-tried-turning-it-off-and-on-again.webm\">turning it off and on again<\/a> would resolve, nope that didn&#8217;t do it. Thankfully it wasn&#8217;t hard to search up a <a href=\"https:\/\/forum.openwrt.org\/t\/solved-dhcp-settings-missing-from-luci\/18644\">forum post<\/a> that covered exactly this problem. The LuCI web UI will not show you the menu if the configuration file contains an error. This is easy to check with the CLI.<\/p>\n<pre class=\"lang:default decode:true \"># uci show dhcp\r\nuci: Parse error (invalid command) at line 156, byte 1<\/pre>\n<p>Editing the file and going to that line made the problem obvious. I&#8217;d made an error when I was manually editing the file and had <code>optino<\/code> instead of <code>option<\/code>. Easy to fix.<\/p>\n<p>One reboot later and my LuCI menu was back. Again, I find it very interesting that configuration items lower down in the file were working fine. I&#8217;m guessing that errors in the file don&#8217;t prevent it from skipping the error entries and parsing the ones that do work, this is pretty handy because it means a single error won&#8217;t cause things to be inoperable. It&#8217;d be nice if the web UI gave you some sort of easy to spot error indication vs. just removing menu items.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>OpenWRT usually has a &#8220;DHCP and DNS&#8221; menu in the web UI (LuCI), it will also have &#8220;Hostnames&#8221; as well. Something was amiss with my setup, as the menu wasn&#8217;t showing up. This menu is a web based view of the \/etc\/config\/dhcp configuration file. I&#8217;ve got quite a bit of customization in this file and &hellip; <a href=\"https:\/\/lowtek.ca\/roo\/2022\/openwrt-luci-missing-dhcp-and-dns-menu-option\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;OpenWRT &#8211; LuCI missing DHCP and DNS menu option&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[],"class_list":["post-2094","post","type-post","status-publish","format-standard","hentry","category-network"],"_links":{"self":[{"href":"https:\/\/lowtek.ca\/roo\/wp-json\/wp\/v2\/posts\/2094","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lowtek.ca\/roo\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lowtek.ca\/roo\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lowtek.ca\/roo\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lowtek.ca\/roo\/wp-json\/wp\/v2\/comments?post=2094"}],"version-history":[{"count":3,"href":"https:\/\/lowtek.ca\/roo\/wp-json\/wp\/v2\/posts\/2094\/revisions"}],"predecessor-version":[{"id":2099,"href":"https:\/\/lowtek.ca\/roo\/wp-json\/wp\/v2\/posts\/2094\/revisions\/2099"}],"wp:attachment":[{"href":"https:\/\/lowtek.ca\/roo\/wp-json\/wp\/v2\/media?parent=2094"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lowtek.ca\/roo\/wp-json\/wp\/v2\/categories?post=2094"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lowtek.ca\/roo\/wp-json\/wp\/v2\/tags?post=2094"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}