Monday, January 24, 2011

How to Bind IP Address to MAC Address using DHCP3-SERVER

dhcp3-server, as obvious from the name is a DHCP server that serves DHCP requests on the defined network interfaces. If you want a specific IP to be remembered for a specific machine, you can bind the IP address to the MAC address of that machine. The lease won't expire in that case.

Edit /etc/dhcp3/dhcpd.conf

sudo nano /etc/dhcp3/dhcpd.conf

And paste these lines in that file just above the last bracket '}'.

host username {
hardware ethernet 00:30:05:cf:a2:b7;

Replace username with whatever username. hardware ethernet is the MAC address of the NIC in that computer and fixed address is the intended IP address. Repeat the process for as many IP addresses as you want to bind.

Your dhcpd.conf should look like this.


Save and close the file after making changes. Now, restart dhcp3-server.

sudo service dhcp3-server restart

You can use ifconfig command in Ubuntu to find out the mac address or ipconfig /all in Windows.


Related Posts:

Network , Server