-1

I configured a DNS server with static IP configuration with named service on Centos 7. Servers are currently running in an environment without DHCP.

  1. hostname1: ip1
  2. hostname2: ip2
  3. Etc.

If the machine with the hostname hostnmame1 pops, is it possible for the DNS to assign its right IP without a DHCP server (and without having to define the static IP in /etc/sysconfig/network-scripts/ifcfg-eth0)? I would prefer not to add a DHCP server if it exists a simpler way to associate hostname with the corresponding IP defined in my DNS configuration.

I assume machines have the DNS server defined in /etc/resolv.conf.

10
  • 4
    DNS doesn’t assign IP addresses. DHCP does. Apr 18, 2018 at 12:20
  • So I am forced to install a DHCP server for such a simple thing?
    – Ninroot
    Apr 18, 2018 at 12:28
  • A simple SOHO router can do DHCP too
    – yagmoth555
    Apr 18, 2018 at 12:40
  • 3
    “such a simple thing?” I would point out that pretty much every network on the planet has some sort of DHCP services running. But, no you’re not forced to use one, just use static IP addresses. Otherwise you’ll need DHCP. DNS doesn’t do what you are asking. Apr 18, 2018 at 12:42
  • OP, what you are probably missing is this. On boot up, the server doesn't know its own address, so it cannot talk "normal" TCP/UDP protocols like DNS. DHCP is a very special protocol mainly in this respect: it can still be used even if you don't know your own IP address.
    – kubanczyk
    Apr 20, 2018 at 7:34

2 Answers 2

3

DNS Servers: Translates hostnames to ip address example when you type serverfault.com in browser its gets translated or resolves to ip address which is stored in DNS server database and then the server serves the requested page and serevrfault.com page is opened. The DNS server is the translator between the hostname and IP address.

DNS servers can be deployed inhouse or we can use ISP or public DNS servers, example 8.8.8.8 is a DNS ip of google

DHCP Servers: DHCP Server automatically provides and assigns IP addresses, default gateways and other network parameters to client devices. It relies on the standard protocol known as Dynamic Host Configuration Protocol or DHCP to respond to broadcast queries by clients.

Basic home/office routers have inbuild DHCP server which assigns ip to laptop/systems when connected via ethernet or wifi

0

I think zeroconf/bonjour/avahi and link-local addresses may be something to consider in this scenario. But I never used it (I use my own DHCP and DNS server) so cannot provide any details :(.

Not the answer you're looking for? Browse other questions tagged .