Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do to add DNS entry for an LMHOSTs file for all clients? 1

Status
Not open for further replies.

UnknownEntity

Technical User
Jun 15, 2006
75
GB
Hi all,

Im trying to add an entry to the DNS server for a solution Ive just got working for a third party application. Ive managed to get the third party app working locally on one client PC by modifying the hosts file.

The entries ive added are

127.0.0.1 localhost
192.168.0.1 tgt.rgfr.net (x)
192.168.0.1 78hujhn38 (y)

Is there anywhere I can add this type of entry to the DNS server or anywhere so that it is reflected everywhere on the LAN. There are about 100 or so systems and dont like the idea of adding this entry to every client pc.

Any help appreciated, thanks!

Drakul.



 
Yes, you should be able to add an entry for the hosts to your DNS and yes, if things work by modifying the hosts tables they should work if port this to the DNS.

What DNS are you running and do you have access to its configuration?
Do you use dynamic DNS updates, i.e. the DNS is linked to a DHCP server or do you do everthing via static IP?
 
Yes I have access to the DNS server. It is Windows 2008 Standard ed server that has DNS server running on it. Dynamic updates is used, it is dynamically linked to DHCP. Although we have some static assigned addresses scattered around.

Where do I make these modifications on DNS server?

Thanks.

Drakul.
 
I wish I had a direct answer for you, but I am not familiar with Windows server and its DNS / DHCP functions. I would say that there has to be a zone file for your DNS and you would want to add an entry there.

You mentioned that you have dynamic DNS updates linked to the DHCP and in light of this, your question is potentially bothersome or at least becomes a little more complex. In your original post you said that you put 192.168.0.1 in the host file. I am assuming then that this range is different than the range assigned by the DHCP?

It is permissible to have multiple names map to a single IP. When you do a reverse lookup, you will (probably) only get one of them. You will need to add an entry in the DNS configuration file for your 192.168.0 zone (assumed /24 here). You should be able to simply add another (two) A records with this device.

You will also need to tell the DHCP to either assign 192.168.0.1 to this particular PC - always - or assign it statically and tell the DHCP not to assign to this address.

If the 192.168.0.0/24 is a different subnet than the rest of your lan, you will need to create a new zone in your DNS and you shouldn't have to worry about the DHCP as long as the machine knows its IP address.

 
I currently have 2 zones configured on the DNS server, forward and reverse zones, the address 192.168.0.1 resides in the same range as all the lan clients and is within DHCP scope.

I have already assigned multiple names to map single IP and yes I did get the result you stated in your last post, I only get one result, but I created a CNAME record as well as the existing A record.

The address 192.168.0.1 is a server address that is static and must be referenced in the hosts file for correct functioning of the app.

So basically I have a network where there are 100 or so client systems with dynamically assigned IP addresses in range 192.168.0.5 - 192.168.0.100 by DHCP and these systems all have their own A host records in DNS. The 192.168.0.1 address is statically assigned to a server within the same DHCP scope and has 2 records in DNS, one is A host the other is CNAME.

In essence I just want to add the two additional IP addresses to each on the client systems on the network. Maybe group policy perhaps?..Im sure this can be done somehow in DNS but just cant see the answer.

 
It looks like you have correctly accounted for the addresses, so I agree you should be able to add these to the DNS and they will then become available to all hosts automatically.

I don't know the specifics of your (Windows based) DNS. But I will give you an example from my VPN zone, which runs BIND9.

In one of my forward zone I have the follwing:
Code:
debian.vpn              IN SOA  server.debian.vpn. admin.debian.vpn. (
                                2010050114 ; serial
                                4800       ; refresh (1 hour 20 minutes)
                                86400      ; retry (1 day)
                                86400      ; expire (1 day)
                                604800     ; minimum (1 week)
                                )
                        NS      server.debian.vpn.
                        A       172.17.0.1
$ORIGIN debian.vpn.
dummy                   A       172.17.0.100
$TTL 43200      ; 12 hours
riley-laptop            A       172.17.0.3

server                  A       172.17.0.1

I will bet that you have something similar. In this instance, both "server" and "dummy" are permanent static IPs. I directly assigned an A record to it in the DNS. I added a similar record in the reverse zone file. All devices on the LAN can do a forward and reverse lookup for server or 172.17.0.1 and will get the result.

You should be able to add an A record and CNAME to your DNS and every device that uses the DNS should see it. You will undoubtedly need to restart or reload your DNS to get the change to take effect.

 
Thx for reply Noway2, I cant verify whether this has worked yet. But I will reply to this post as soon I have confirmation it worked.


D.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top