[SOLVED] How to reserve IP Address in Linux DHCP Server

FREQUENTLY ASKED QUESTIONS (Linux DHCP Server)
Q: How to reserve an ip address in dhcp server?

  You are administering a DHCP Server in a Linux Distribution, and you need to reserve a fixed ip address for a special dhcp client. DHCP server will always assign fixed ip address  to that specific client. This tutorial should work in all the popular linux distributions like Ubuntu, Fedora, Redhat, CentOS, etc.

This dhcp server ip address reservation is MAC Address 
based reservation. You should know the MAC address of the dhcp client's Ethernet NIC card and add it to dhcp configuration file.


Requirement
Name: Accountant (Any name)
MAC address: A1:B2:C3:D4:E5:F6
Fixed ipaddress: 192.168.10.29


How To Reserve IP Address
First, Edit the dhcpd configuration file and add an ip address reservation 
In Ubuntu, Debian Linux distributions
user@ubuntu:~$ sudo vi /etc/dhcp3/dhcpd.conf
                            OR
In RPM Disrtibutions like Redhat, Fedora, CentOS. etc.
[root@server ~#]vi /etc/dhcp/dhcpd.conf


host Accountant {
hardware ethernet
 A1:B2:C3:D4:E5:F6;
fixed-address 192.168.10.29;
}

#Add the above 4 lines(green in color) to the dhcpd.conf configuration file and save file. 
Now the dhcp server always assign the ipaddress 192.168.10.29 to the system with MAC address of A1:B2:C3:D4:E5:F6.


Restart dhcp service
[root@server ~#]service dhcpd restart
or
user@ubuntu:~$ sudo /etc/init.d/dhcp3-server restart
Restart network in dhcp client system.


Just worked ?  Post your comments and share with friends....


DHCP Server Related Posts

1 comments:

Pepe said...

use this code in my dhcp server, but still sometimes the server assigns the IP fixed although this in the code as reserved, of course this does only when the pc (whith ip-fixed) is off, how i reserve really the ip address?, or why give the ip-fixed?

Related Posts Plugin for WordPress, Blogger...

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Bluehost Coupons