OPNsense Forum

Archive => 18.7 Legacy Series => Topic started by: hboetes on March 05, 2019, 04:43:41 pm

Title: DHCP Server is currently enabled. Cannot enable the DHCP Relay service while the
Post by: hboetes on March 05, 2019, 04:43:41 pm
Hi there,

So the error is: "DHCP Server is currently enabled. Cannot enable the DHCP Relay service while the DHCP Server is enabled on any interface."

Well it's not enabled.

After googling that I found this: https://forum.netgate.com/topic/42997/can-t-enable-dhcp-relay

So I made a config backup and searched for dhcp and found:


  <dhcpd>                                                                                                                                                                                                                                                     
    <lan>                                                                                                                                                                                                                                                     
      <range>                                                                                                                                                                                                                                                 
        <from>10.10.10.10</from>                                                                                                                                                                                                                               
        <to>10.10.10.245</to>                                                                                                                                                                                                                                 
      </range>                                                                                                                                                                                                                                                 
    </lan>                                                                                                                                                                                                                                                     
    <opt2>                                                                                                                                                                                                                                                     
      <enable>1</enable>                                                                                                                                                                                                                                       
      <gateway>10.10.30.1</gateway>                                                                                                                                                                                                                           
      <domain>axis-guest</domain>                                                                                                                                                                                                                             
      <ddnsdomainalgorithm>hmac-md5</ddnsdomainalgorithm>                                                                                                                                                                                                     
      <numberoptions/>                                                                                                                                                                                                                                         
      <range>                                                                                                                                                                                                                                                 
        <from>10.10.30.100</from>                                                                                                                                                                                                                             
        <to>10.10.30.200</to>                                                                                                                                                                                                                                 
      </range>                                                                                                                                                                                                                                                 
      <dnsserver>1.1.1.1</dnsserver>                                                                                                                                                                                                                           
      <dnsserver>8.8.8.8</dnsserver>                                                                                                                                                                                                                           
    </opt2>                                                                                                                                                                                                                                                   
    <opt3>                                                                                                                                                                                                                                                     
      <ddnsdomainalgorithm>hmac-md5</ddnsdomainalgorithm>                                                                                                                                                                                                     
      <numberoptions/>                                                                                                                                                                                                                                         
      <range>                                                                                                                                                                                                                                                 
        <from>10.10.40.10</from>                                                                                                                                                                                                                               
        <to>10.10.40.240</to>                                                                                                                                                                                                                                 
      </range>                                                                                                                                                                                                                                                 
      <dnsserver>10.10.10.11</dnsserver>                                                                                                                                                                                                                       
      <dnsserver>10.10.10.12</dnsserver>                                                                                                                                                                                                                       
    </opt3>                                                                                                                                                                                                                                                   
    <opt5>                                                                                                                                                                                                                                                     
      <ddnsdomainalgorithm>hmac-md5</ddnsdomainalgorithm>                                                                                                                                                                                                     
      <numberoptions>                                                                                                                                                                                                                                         
        <item/>                                                                                                                                                                                                                                               
      </numberoptions>                                                                                                                                                                                                                                         
      <range>                                                                                                                                                                                                                                                 
        <from>172.16.6.200</from>                                                                                                                                                                                                                             
        <to>172.16.6.250</to>                                                                                                                                                                                                                                 
      </range>                                                                                                                                                                                                                                                 
      <winsserver/>                                                                                                                                                                                                                                           
      <dnsserver/>                                                                                                                                                                                                                                             
      <ntpserver/>                                                                                                                                                                                                                                             
    </opt5>                                                                                                                                                                                                                                                   
  </dhcpd>
                                                                                                                                                                                                                                                   

That opt2 config with the enabled dhcp entry is from an old removed interface. So apparently removing an interface does not remove the dhcp entry and after that you can't remove the matching dhcp entry.
I tried working around the issue by enabling dhcp on another interface and then removing it again. Still the same entry remains.

I will now try downloading the config and editing it, as mentioned in the linked URL.

I think this is a bug. Is this a valid report or should I report it elsewhere?

Thanks
Han
Title: Re: DHCP Server is currently enabled. Cannot enable the DHCP Relay service while the
Post by: hboetes on March 05, 2019, 04:49:15 pm
Taraaa, that fixes the problem.  :)
Title: Re: DHCP Server is currently enabled. Cannot enable the DHCP Relay service while the
Post by: franco on March 05, 2019, 07:13:28 pm
Can you raise a ticket for me please? It seems worth fixing.

https://github.com/opnsense/core/issues


Cheers,
Franco
Title: Re: DHCP Server is currently enabled. Cannot enable the DHCP Relay service while the
Post by: hboetes on April 03, 2019, 10:55:20 am
Done! https://github.com/opnsense/core/issues/3382