DHCP Server Settings....specifically ip range

iamwally
Posts: 12
Joined: Fri Dec 23, 2011 5:50 am

DHCP Server Settings....specifically ip range

Postby iamwally » Thu Apr 19, 2012 7:18 pm

Is there anyway to set the ip distribution range of the Amahi DHCP server?

Thanks,

John

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: DHCP Server Settings....specifically ip range

Postby bigfoot65 » Fri Apr 20, 2012 4:41 am

Not at this time. All static IPs are restricted to less than 100. DHCP provides leased for IP range of 100-255. There is a feature request established, but it may be a while before we get to it.

What are you trying to do? If it's to control what IPs your machines receive, set them as static. That will ensure they get the same one every time.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

PatrickDickey
Posts: 75
Joined: Thu Jan 19, 2012 6:52 am

Re: DHCP Server Settings....specifically ip range

Postby PatrickDickey » Fri Jan 30, 2015 6:20 am

Out of curiosity, has this been worked on since the thread was started?

Also what controls the range? If it's something that's set in the hda-ctl script (or another script), I'd like to take a shot at customizing it. My reasons are that I may want to set up a backup dhcp server, in case amahi crashes. Right now, I have another computer handling the dhcp and dns for my network, but I'd like to add some redundancy. Plus there's no reason to have a range of 154 computers (as .255 is typically a broadcast address), if you only have 20 devices on the network.

Have a great day.:)
Patrick.

P.S. Yes, I realize this isn't a supported option--I'm willing to assume the risks, and fix my own mistakes down the road.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: DHCP Server Settings....specifically ip range

Postby bigfoot65 » Fri Jan 30, 2015 8:09 am

Not sure, but I think this may be coded in the Fedora DHCP server configuration. I do not have access to my HDA currently to poke at it.

This would be something good to add to the wiki once sorted out.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

PatrickDickey
Posts: 75
Joined: Thu Jan 19, 2012 6:52 am

Re: DHCP Server Settings....specifically ip range

Postby PatrickDickey » Sat Jan 31, 2015 8:21 am

Not sure, but I think this may be coded in the Fedora DHCP server configuration. I do not have access to my HDA currently to poke at it.

This would be something good to add to the wiki once sorted out.
In Amahi 7, you were using dnsmasq, correct? So something tells dnsmasq to configure dhcp to use this range. That's what I'm looking for. That way I can change the range, as necessary. I know it's stored in dnsmasq.conf or in amahi-dhcp.conf inside of the dnsmasq.d directory. But is it hda-ctl that sets it up?

Have a great day, and thanks for the reply. :)
Patrick.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: DHCP Server Settings....specifically ip range

Postby bigfoot65 » Sat Jan 31, 2015 8:51 am

Ok looks like there is some capability in hda-ctl to manually configure the DHCP range settings.
# NOTE: You can change default settings by creating /etc/hda-ctl.conf
# and putting perl variable assignments there, like for example:
#
# $DEVICE = "eth0";
# $NETMASK_SIZE = "24";
# $NET_START = "0";
# $DYN_LO = "100";
# $DYN_HI = "254";
# $DHCP_LEASE = "14400";
# $use_opendns_secondary = 0;
# $use_dnsmasq_dns = 0;
# $use_dnsmasq_dhcp = 0;
# $dnsmasq_resolve_catch_all = 0;
#
# the file is interpreted as perl, so do not break it!
# note that if these settings are in the database, those always take priority when the program starts
These variables are set in hda-ctl as noted, so creating hda-ctl.conf and changing them should allow you to change the range at which DHCP starts.

Many of these variables are in the database, so changing them would require updating the "settings" table in hda_production. However, I do not see the DHCP range there, so making the change in the file should override the default setting.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

PatrickDickey
Posts: 75
Joined: Thu Jan 19, 2012 6:52 am

Re: DHCP Server Settings....specifically ip range

Postby PatrickDickey » Sat Jan 31, 2015 1:27 pm

Ok looks like there is some capability in hda-ctl to manually configure the DHCP range settings.
# NOTE: You can change default settings by creating /etc/hda-ctl.conf
# and putting perl variable assignments there, like for example:
#
# $DEVICE = "eth0";
# $NETMASK_SIZE = "24";
# $NET_START = "0";
# $DYN_LO = "100";
# $DYN_HI = "254";
# $DHCP_LEASE = "14400";
# $use_opendns_secondary = 0;
# $use_dnsmasq_dns = 0;
# $use_dnsmasq_dhcp = 0;
# $dnsmasq_resolve_catch_all = 0;
#
# the file is interpreted as perl, so do not break it!
# note that if these settings are in the database, those always take priority when the program starts
These variables are set in hda-ctl as noted, so creating hda-ctl.conf and changing them should allow you to change the range at which DHCP starts.

Many of these variables are in the database, so changing them would require updating the "settings" table in hda_production. However, I do not see the DHCP range there, so making the change in the file should override the default setting.
So does hda-ctl run automatically, or do I need to re-run it after making the conf file? Also I'm assuming that I need to uncomment and change to "1" the use_dnsmasq_dns and use_dnsmasq_dhcp options?

Thanks, again for all of your help with this. :) Have a great day.
Patrick.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: DHCP Server Settings....specifically ip range

Postby bigfoot65 » Sat Jan 31, 2015 1:33 pm

So does hda-ctl run automatically, or do I need to re-run it after making the conf file?
I would recommend restarting hda-ctl.

Code: Select all

systemctl restart hda-ctl
Also I'm assuming that I need to uncomment and change to "1" the use_dnsmasq_dns and use_dnsmasq_dhcp options?
Those need to be set via the Dashboard under Network, Settings. Pretty much any setting in the Dashboard is also in the hda_production database.

Happy to help. This might be something we should add to the wiki as well. If you have time, could you do so? We would greatly appreciate it.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

Who is online

Users browsing this forum: No registered users and 10 guests