What do I need to make Linux host names resolvable on LAN?

2

What do I need to get local host names to be resolvable? BIND? DHCP? dnsmasq? With the needed components, how do you configure it?

We use Vyatta 6.4 as our router and we have CentOS 6.3 boxes. I haven't been able to figure out how to make it work on Vyatta. I'm assuming I'll have to setup some sort of local DNS server on a CentOS box.

Currently we're using static ip addresses. We'd prefer not to use DHCP if possible. We just need a way to make local host names resolvable without having to enter A records manually for each host.

I should also note this is a business network.

Luke

Posted 2012-10-08T19:15:05.043

Reputation: 165

Answers

0

This seems like a paradoxical question.

You want some sort of naming service for your domain, but don't want to add A records for each machine. You want it to happen automatically, but don't want to use a dynamic configuration protocol (DHCP).

What about a writing a script that:

  1. Periodically does ARP requests on your LAN
  2. Connects to a defined port on each IP address it finds and queries the machine for its name
  3. Writes new A records into your LAN's DNS server

You won't have to manually enter A records. You will have to devise some way for this probing process to identify each machine. (You'll also have to convince your security staff that this probe isn't a problem.)

Doug Harris

Posted 2012-10-08T19:15:05.043

Reputation: 23 578

Let me clarify. A records are fine as long as I don't have to add them manually. DHCP can be fine, as long as we can assign the ip addresses manually (pool size of zero). – Luke – 2012-10-08T19:40:47.767

@Luke I do something similar, but set the pool to cover all the IPs available and then create static leases for IPs that I want to be fixed. This will allow the DHCP server create automatic entries in the local DNS server, while still giving you "static" IPs. – Darth Android – 2012-10-08T20:28:21.080

1

I use Avahi and nss-mdns to make each system resolve as <hostname>.local on my home LAN. Simply make sure that Avahi is started and port 5353 is open on each system so they can hear mDNS announcements.

Ignacio Vazquez-Abrams

Posted 2012-10-08T19:15:05.043

Reputation: 100 516

Unfortunately mDNS won't work on our network for security reasons. – Luke – 2012-10-08T19:28:47.200