A Question on Dynamic DHCP/DNS IP Lease Renew

David Li dlipubkey at gmail.com
Wed Sep 28 20:44:38 UTC 2016


We are using Dynamic DHCP/DNS with ISC DHCP and DNS server on Centos 7.
That is our DHCP server assigns an IP from a range based on the MAC address.
It will then update the DNS record with the IP and hostname.

For example:


Here are a few relevant lines from  /etc/dhcp/dhcpd.conf to assign IP
with hostname "node-1-1" to a server with MAC address
10:00:00:7a:a9:98

#
# Subnet and range
#
subnet 10.3.2.32 netmask 255.255.255.224 {


  option routers 10.3.2.33;

  range 10.3.2.35 10.3.2.44;


#
# host name and MAC
#
host node-1-1 {

  hardware ethernet   10:00:00:7a:a9:98;

  option host-name    "node-1-1";

}


This will result in a entry in the DNS entry like this:



node-1-1 A 10.3.2.38

TXT "003a7e20199e62a68504ff027bf35b1d78"


My question is: if the server is rebooted, will it come back and be
assigned the same IP 10.3.2.38 again as long as its MAC stays the
same?

I tested a few times and it seemed to be the case. Are there any
circumstances that a different IP will be assigned to the same server?



Thanks.

David


More information about the dhcp-users mailing list