[SOLVED] Fixed IP being taken - DHCP Server - CentOS 6
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm facing a problem with my DHCP server. I have a linux box using CentOS 6. My DHCP server is up and running.
I've needed to format my server and reconfigure my DHCP and everything else. After that all the computer on my Network needed to have their IP back and they took all sorts of IP addresses that they where not supposed to take. I even assigned 15 minutes as lease time to solve this problem at the beginning. It actually worked to put some order on my IP leases, but the problem persists.
For instance, the IP 192.168.1.138 (a real example, in this case) is stated to be given to a certain MAC address and there's another computer using this IP at the moment. My IP range goes from 192.168.1.2 up to .170. The fixed IPs are in the range of 2-15 and 120-170. All the rest is free to be taken but even though sometimes random computers just take fixed IPs and take them.
My Squid rules are based on IP range so it causes me all sorts of problems cause some users have rules applied that are note supposed to be apply to them.
Never had a IP conflict, but it looks-like that when the assigned computer is offline, any other computer that renews the IP can, by chance take that IP. I don't think it's supposed to be that way. Just because the MAC address is not online doesn't mean that my server should give this IP to any other computer, specially if I have a big IP Range that is empty and can be used for this purpose.
Is there anything that I'm missing?
Here is part of my dhcpd.conf, up to 5-6 fixed address. All the rest is basically the same.
If my fixed-IP-machines are out of range, is that a problem? I can make my range goes from .20 till .119, then all my fixed range is protected, the lower part and the higher part. Is that ok?
Didn't know that I could have computers out of my DHCP range. Is there any major consequence applying this new configuration?
When dhcpd tries to find a host declaration for a client, it first
looks for a host declaration which has a fixed-address declaration that
lists an IP address that is valid for the subnet or shared network on
which the client is booting. If it doesn't find any such entry, it
tries to find an entry which has no fixed-address declaration.
So from this it should be fine where it currently is, this suggests that there's no syntactical scoping required in the config, it'll all be parsed and made sense of without further relation between the fixed-address and the subnet definitions.
Ok, I'll try to make the changes that you've proposed and will run some tests. Accordingly to this explanation, I think what I need to modify is pretty basic.
Thanks for your help. I'll come back with some feedback.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.