quarta-feira, 29 de outubro de 2008

Question: DHCP and automatic DNS Updates

Question: DHCP and automatic DNS Updates

Posted by ajt on Mon 26 Sep 2005 at 11:07

How do I get the DHCP server to dynamically update the DNS server? I know it's possible, but how do I do it?

I'm running dhcp3-server 3.0.1-2, bind 9.2.4-1 on Debian Sarge. I found documents for older versions, but not these. A google search turns up several "how tos" but they are different, and slightly conflicting, so far nothing seems to work. I know there are other tools that do this, but I'd like to know how to get this pair working.

As ever, thanks in advance.

Share/Save/Bookmark

Posted by Steve (82.41.xx.xx) on Mon 26 Sep 2005 at 11:14
[ Send Message | View Steve's Scratchpad | View Weblogs ]

Personally I'd run something else for an internal setup - bind is overkill unless you're doing complex things you don't want to explain.

Anyway this guide appeared reasonable at first glance.

I know I've used a similar setup in the past for allowing updates from DHCP - before I switched to using dnsmasq instead for combined DNS + DHCP operation.

Steve
--

[ Parent | Reply to this comment ]

Posted by ajt (204.193.xx.xx) on Mon 26 Sep 2005 at 12:43
[ Send Message | View Weblogs ]
I know BIND9 has a "reputation" but I'd like to learn how to use it. I'm doing nothing fancy at all, so it's a simple enough system to understand. At the moment BIND9 works perfectly as DNS, I just need to get Dynamic-DHCP working.

The guide looks okay, I'll report back if it works.

If I can't get BIND9/DHCP-Server3 to work, I'll give dnsmasq a go. I could just give my machines static IPs, my network is that small, I'm just trying to learn stuff.

--
"It's Not Magic, It's Work"
Adam

[ Parent | Reply to this comment ]

Posted by bmontgom (68.15.xx.xx) on Tue 27 Sep 2005 at 00:02
[ Send Message ]
dnsmasq looks interesting. One thing I'm curious about is the ability to support split horizon setups. I'm currently running bind on my network for the purpose of split horizon. I serve a different view of my domain to the outside world than what is seen internally. The internal domain gets updated by the DHCP server. Can dnsmasq do this?

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Tue 27 Sep 2005 at 00:45
[ Send Message | View Steve's Scratchpad | View Weblogs ]

I don't believe it can, although it does allow rewriting of external queries which it has forwarded to another DNS server.

I've not investigated it fully, but I'd be suprised if it offered this ability; mostly because it is designed to be fairly simple to run ..

Steve
--

[ Parent | Reply to this comment ]

Posted by TedKotz (63.109.xx.xx) on Mon 26 Sep 2005 at 15:09
[ Send Message ]
First I would reccomend using dnsmasq for this task unless your network is fairly complicates or you are a glutton for punishment.
That being said I have had a good deal of success with having bind9 and dhcp3 inter communicate. I used the how-to located here:
http://www.realmtech.net/documents/DynamicDNS.pdf

My only real changes, besides using different keys, was I used algorithm hmac-md5; in all the files.

Good Luck

[ Parent | Reply to this comment ]

Posted by adam (198.133.xx.xx) on Mon 26 Sep 2005 at 15:55
[ Send Message ]
Bump.

Running bind is a great exercise, and frankly a lot of us who are doing it are doing it to learn enough to implement it on our corporate networks, which aren't managable without it.

I've long wanted to figure this one out -- ie using industry standard products to do dynamic dns in a big and scalable way.

Originally my interest was for the FAS undergrad network at Harvard. It's a lot of people, they all get routable addresses, and the network segments aren't so big that we can give everyone an effectively static IP. Any time you have more people who COULD be on a network segment at some time than 253 and want everyone to have a static alias whichever segment they're on at the moment, this need makes a lot of sense. I'd love to see some good answers on the topic.

[ Parent | Reply to this comment ]

Posted by Anonymous (62.49.xx.xx) on Mon 26 Sep 2005 at 16:53
The documentation is in the dhcpd.conf manpage. The section called DYNAMIC DNS UPDATE SECURITY covers it.

I'm about to have a go at it myself.

[ Parent | Reply to this comment ]

Posted by ajt (84.12.xx.xx) on Mon 26 Sep 2005 at 19:10
[ Send Message | View Weblogs ]
Got it all working. The dhcpd.conf man page pushed me over the edge of getting it to work.

It's actually dead easy, ONCE you find the right commands in the mountain of documentation.

There isn't a lot too it, but I'd be willing to write down what I did, if anyone is interested.

--
"It's Not Magic, It's Work"
Adam

[ Parent | Reply to this comment ]

Posted by Steve (82.41.xx.xx) on Wed 28 Sep 2005 at 12:10
[ Send Message | View Steve's Scratchpad | View Weblogs ]

It would make a nice follow-up piece ...

Steve
--

[ Parent | Reply to this comment ]

Posted by ajt (204.193.xx.xx) on Thu 29 Sep 2005 at 09:34
[ Send Message | View Weblogs ]
I think I'll have too..

--
"It's Not Magic, It's Work"
Adam

[ Parent | Reply to this comment ]

Posted by Serge (213.118.xx.xx) on Mon 26 Sep 2005 at 21:43
[ Send Message | View Serge's Scratchpad | View Weblogs ]
Given the imoportance of DNS operations, which is still too much underestimated by a lot of IT technicians, I can only warmly recommend studying a software package like BIND, which in my opinion can be very simple to setup for simple operations.

As for documenation, I also warmly recommand reading O'reilly's Butterfly (http://www.oreilly.com/catalog/dns4/), which gives besides thorough information on Bind, including dynamic updates, also gives important general network information everyone one of us should at least have read once.

My 0.02 EURO ;-)


--

Serge van Ginderachter


[ Parent | Reply to this comment ]

Posted by simonw (84.45.xx.xx) on Tue 27 Sep 2005 at 23:59
[ Send Message | View Weblogs ]
Butterfly? It is a grasshopper, obviously a pun on Cricket's name - he has a sense of humour he didn't mind (well he did another three editions so presumably he didn't mind).

QUE's book DNS and BIND by Langfeldt is also very good, but I think neither really cover dynamic DNS with DHCP very well.

My question would be "is it worth doing?".

Do you really want people doing ad-hoc peer to peer networking? Which is what dynamic DNS is about in this context.

The DNS is a store of vitally important data for reaching key servers on most corporate networks, controlling email, web access, and access to core application servers, so you want to delegate any dynamic messing around into less important, small sub domains, so when the Windows boxes start crashing and burning the impact is limited to small sets of client systems. Assuming you are dealing with Windows clients, you can just delegate those subdomains to ADS servers.

Allocating things that offer services static addresses via DHCP, is old fashioned, but works well enough for some very big networks.

Doing scalable enterpise class dynamic DNS with is challenging with ISC BIND because of handling fail over of the DHCP servers and "primary" (named in SOA) DNS server. And I remain to be convinced it is really worth the effort for most organisations. I suspect to do it "right" you'll want a relational database backend to BIND, all very messy.

I found the dynamic updates in DNS a good sanity check when "manually editting" DNS records, because you have to be explicit about what records to delete, and what to add, and it spits out most typos. So I stuck with that even after abandoning the dynamic updates from DHCP.

[ Parent | Reply to this comment ]

Posted by joeblack (168.210.xx.xx) on Tue 27 Sep 2005 at 14:09
[ Send Message | View Weblogs ]
Follow this link, it works really well. I use it to resolve hostnames for srg.

http://www.mattfoster.clara.co.uk/ddns.htm

[ Parent | Reply to this comment ]

Posted by daemon (196.25.xx.xx) on Wed 28 Sep 2005 at 20:40
[ Send Message | View Weblogs ]
I've did pretty much the same as a learning experience, and it really was pretty useful. In future I might well go the simpler route of something like dnsmasq, but even on a small HAN I like the tinkerbility of BIND and ISC-DHCP.

However, 2 points:
  1. Check out this site for a really good run down on how to get it all working. What's really nice is that he uses GNU/Linux and FreeBSD, so you get to learn about more OS's, and it's really thorough.
  2. The other links in comments seem to all use BIND's "allow-update" clauses. Forget that, if you're after a learning experience, rather use the better, and more granular, "update-policy" statments, as they're far more likely to be needed in a "real-world" setting.
Cheers.

[ Parent | Reply to this comment ]

Posted by ajt (204.193.xx.xx) on Tue 31 Jan 2006 at 09:28
[ Send Message | View Weblogs ]
See http://www.debian-administration.org/articles/343 for my own answer!

--
"It's Not Magic, It's Work"
Adam

[ Parent | Reply to this comment ]

Posted by Anonymous (172.130.xx.xx) on Mon 14 Jul 2008 at 02:44
Use the Sourceforge.net Dual DHCP DNS Server. This Server has built in DNS Updates. All DHCP alloted hosts are automatically added to DNS List, Perfectly synchronized.

This Server also supports nearly every feature like Zone Transfer and Replication, Relay Agent, Child Zones and DNS Proxy, DHPC Options and BOOTP.

http://sourceforge.net/projects/dhcp-dns-server/


Nenhum comentário: