Serving dhcp 10.10.10.100-10.254.254.200 config help
-
Greetings and Happy New Year.
I am trying to enable dhcp on a lan 10.0.0.1/8 Serving dhcp 10.10.10.100-10.254.254.200
When I enable this option I do not get an IP address. I can manually apply one and can surf fine. I get a error in the system from dhcp stating "dhcpd: No memory for address range" The system has 256MB of memory. Is this a system memory issue? Thanks, Ken -
Thats a lot of addresses: about 16 million. dhcpd probably needs to keep some sort of state about each address it might manage; lets say 100 bytes (I have no idea of the actual number). dhcpd could then need over 1GB of virtual address space which is bigger than your RAM size (and probably much bigger than your swap space).
I'd suggest you reduce the number of addresses you are prepared to allocate to something much smaller (say 10.10.10.100 to 10.10.255.255) and see if the problem goes away.
If it does go away with a significantly smaller address space then I suspect you will have to choose between
-
reducing the range of addresses you are prepared to allocate
-
significantly increasing the RAM
-
significantly increasing the swap space - would probably best be done through a re-installation.
I don't know for certain, but I expect just increasing the swap space will result in a fairly sluggish dhcpd.
How many addresses do you NEED for dhcp?
-
-
I have to agree with wallabybob - why on earth are you running a /8 as a single network? Do you really have 16,777,213 hosts on that network that you need to support?
Try using a netmask more appropriate to the size of your network and see if that helps.
-
Moved they system to another machine with more resources. That did the trick. Now I would like to serve a 255.255.255.252 in the dhcp to my clients and was wondering what I would put in the dhcpd.conf file. Been fooling around with it but it keeps reverting back to the original config. Thanks, for the help so far. Ken
-
On startup pfSense regenerates a number of program configuration files from the configuration given through the web GUI. With rare exceptions, configuration should be done through the web GUI. dhcp server is not of those exceptions.
-
How about something like this
#!/bin/sh
Save file as: /usr/local/etc/rc.d/dnsmasq.sh
TURN OFF DHCPD - Verify DHCP Server is disabled on all interfaces.
killall dnsmasq
/usr/local/sbin/dnsmasq -C /root/dnsmasq.conf -l /var/dhcpd/var/db/dhcpd.leases -sSave file as: /root/dnsmasq.conf
Find ".N." Replace "N" with IP Number (2-254).
domain-needed
bogus-priv
interface=sis0
bind-interfaces
expand-hosts
domain=wifi
dhcp-range=sis0,10.0.0.100,10.0.0.250,255.255.255.0,7200
dhcp-range=sis0,10.0.1.100,10.0.1.250,255.255.255.0,7200
dhcp-range=sis0,10.0.2.100,10.0.2.250,255.255.255.0,7200
dhcp-range=sis0,10.0.3.100,10.0.3.250,255.255.255.0,7200
no-negcache -
If I run my dnsmasq on a 10.0.0.0/8 network will it give out the 10.0.0.255 broadcast address in the leases or will it bypass this address? If it hands out this ip, is there a way to exclude it in the config file? Thanks, Ken
-
If I run my dnsmasq on a 10.0.0.0/8 network will it give out the 10.0.0.255 broadcast address in the leases or will it bypass this address? If it hands out this ip, is there a way to exclude it in the config file? Thanks, Ken
10.0.0.255 is NOT the broadcast address for the subnet 10.0.0.0/8 but it is the broadcast address for the subnet 10.0.0.0/24.
When use use dnsmasq and leases and hand out ip together I'm guessing you meant dhcpd (the DHCP server) rather than dnsmasq (the dns forwarder). If you don't want dhcpd to hand out particular addresses or address ranges don't says those addresses are available for DHCP allocation. In other words, the pfSense DHCP server will hand out only the addresses you tell it may be used.
If you really meant dnsmasq then please explain what leases you mean.
-
My bad, I ment dhcpd. I was wondering if dhcpd will remove the broadcast from the available ips or do I have to exclude it? Thanks for the help, Ken
-
I was wondering if dhcpd will remove the broadcast from the available ips or do I have to exclude it?
I wouldn't tempt fate. Even if you experiment and find dhcpd does remove genuine broadcast addresses for the available list I would be cautious about expecting that behaviour to continue into the future.
I haven't tried this: its possible the WEB GUI will prevent you including a genuine broadcast address in your DHCP range.