Results 1 to 7 of 7
I have more than 100 clients connected with server where DHCP server is running.I want the DHCP server to provide the same IP to a particular client every time it ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 08-11-2011 #1Just Joined!
- Join Date
- Mar 2009
- Location
- india
- Posts
- 56
How to configure DHCP to provide statis IP
I have more than 100 clients connected with server where DHCP server is running.I want the DHCP server to provide the same IP to a particular client every time it boots up.But its very difficult to copy-paste all the MAC address and put it in dhcpd.conf like below example.
Example:
host*w53-4
{
hardware ethernet 00:E0:CC:21:C1:22;
******* fixed-address 10.28.200.8;
******* option host-name "w53-4.domain.com";
******}
please help if there is any other method
- 08-11-2011 #2
I only use the following here at home without issues
Code:host <system> { hardware ethernet 00:21:70:A3:FA:58; fixed-address 192.168.1.250; }
- 08-12-2011 #3Just Joined!
- Join Date
- Mar 2009
- Location
- india
- Posts
- 56
I know the code.But if there are 2000 computers connected with the DHCP server then i have to write this code 2000 times in dhcp.conf. i wanted to know an alternative process so that i dont need to copy paste 2000 MAC address.
- 08-12-2011 #4
What we do for several hundred server machines:
We (manually) maintain the mac addresses in DNS and HINFO record.
Like this:
<inventory_hostname> IN HINFO "mac" "<mac address>"
With <inventory_hostname> consisting of the datacenter name and a incrementing number.
The machines have CNAMES, describing their purpose (db-1.int.<domain>.<tld>, <appname>.int.<domain>.<tld>, etc)
We maintain mac addresses (up to and sometimes exceeding three per machine) in dns is to have one central source of information.
You have to define hostnames anyhow. Our decision was to do that on dns/dhcp, and not on each host and some ddns magic.
Reason: You do it once, and can then pxe install the machine as needed.
So, the mac addresses and hostnames are in dns.
And we have a svn post-commit hook to generate a dhcpd config from that.You must always face the curtain with a bow.
- 08-12-2011 #5Just Joined!
- Join Date
- Mar 2009
- Location
- india
- Posts
- 56
Actually i am using only DHCP server .I do nt use DNS server because i do not need it.Now i want to configure kickstart that is the reason i want the DHCP server to provide static IP to all the clients.
- 08-12-2011 #6
As there needs to be an assignment from mac to ip and hostname, I donīt think you can skip manual work.
If you donīt care so much which IP/hostname a machine gets as long as it gets always the same IP/hostname,
then you could
- setup a regular dynamic dhcp pool
- boot your machines once with any OS that sends a dhcp request. Maybe a livecd (good remote management systems offer virtual media) or via pxe.
- this way you collect valid mac addresses
- then parse the lease files for these mac addresses and generate static IP/hostname config snippet useable for dhcpd.conf
- then delete the lease files
- and boot them again, this time to kickstart
Other than that, I consider DNS to be part an essential part of infrastructure.
And in your example, you do define hostnames.
What good are they without dns? Or are there no connections *to* these machines?You must always face the curtain with a bow.
- 08-13-2011 #7
Sorry, it was a late night reply. I did not know that a particular client meant every one. To me a a particular client statement says you are only looking at one to maybe a hand full not every one.
Here is a thought, why not assign static IP Addresses to the clients? Would be a lot easier and less work.


Reply With Quote

