Home › Forums › OS X Server and Client Discussion › DNS › Help with Dynamic DNS on Xserve and OSX clients
- This topic has 14 replies, 4 voices, and was last updated 17 years, 2 months ago by
lschafroth.
-
AuthorPosts
-
October 22, 2007 at 5:53 pm #370254
lschafroth
ParticipantWe have a need for Dynamic DNS updates on our network. All our windows clients do this via the DNS configuration on XP. We tell each machine to register it’s hostname with the DNS server whether it is DHCP or STATIC.
This allows our network monitoring and mapping systems to resolve the hostnames of each machine.
90% of our machines are Mac and we need them to resolve as well.
I was given a script to do this but each attempt to make it work resulted in all my dns zones and entries being deleted from the DNS server. All our clients are 10.4.10. We run the latest Xserve as well.
Here is the script I received with generic info. It needs to be tweeked for individual site usage.
Create the below script in /S/L/SystemConfiguration/Kicker.Bundles/C/Resources that is executed every time Kicker runs the set-hostname script (with a tweak to the Kicker.xml file).
#!/bin/sh
#
# update_dns
#primary=$(netstat -rn | sed -n ‘s/default [ ]*[^ ]*[ ]*[^ ]*[ ]*[^ ]*[ ]*[^ ]*[ ]*\([^ ]*\)[ ]*[^ ]*/\1/p’)
if [ “${primary}” = “” ]; then
logger -i -p daemon.notice -t update_dns “Unable to determine the primary network interface”
fiip_address=$(ifconfig ${primary} inet 2>/dev/null | sed -n ‘/169\.254/d;/127\.0\.0\.1/d;/0\.0\.0\.0/d;s/^.*inet \([0-9\.]*\) netmask.*/\1/p’)
if [ “${ip_address}” = “” ] ; then
logger -i -p daemon.notice -t update_dns “Unable to determine the IP address of the ${primary} interface”
fi# Update the DNS record if the IP address has changed
host=$(hostname)
old_ip=$(/usr/bin/host $host 2>/dev/null | awk ‘{print $NF}’)if [ “${old_ip}” = “${ip_address}” ] ; then
logger -i -p daemon.notice -t update_dns “Skipping DNS update, IP hasn’t changed”
exit 0
filogger -i -p daemon.notice -t update_dns “Updating the DNS record(s) to indicate IP address: ${ip_address}”
KEY=/etc/Kmyhost.example.com.+157+40645.keycat <
October 22, 2007 at 5:56 pm #370255lschafroth
ParticipantBy the way.. I have no idea how to add this to the kicker.xml file. I was testing it by running the script from the CLI.
Lannie
PS A breif summary of my network.
servers reside on their own VLAN.
Each building is on it’s own Vlan.DHCP server runs on one Xserve, DNS on another and backup DNS on a third.
There are not reverse DNS zones on the servers as of right now.
October 23, 2007 at 1:14 pm #370263lschafroth
ParticipantYes, but I havent found out how to get the Xserve DHCP server to hand out static IP’s based on MAC address.
That would work best if it could do that. We have about 75% of our clients statically mapped and the rest DHCP so we would need all of them to show up in the DNS server.
I do think that would be the best solution so I would not have to modify all the workstations. I could do it all from the DHCP server.
We do have a 2003 server we could dedicate to DNS, WINS and DHCP if we needed to but we would like to make it work with our Xserve machines since that is our long term server plan.
Thanks!
Lannie
October 23, 2007 at 2:23 pm #370267lschafroth
ParticipantCan you show me how? I do not see this functionality anywhere in the Server Admin on the Xserve.
Maybe it’s right in front of my eyes, but so far, I dont see how or dont see any articles on how to do it.
Thanks!
Lannie
PS: I’m pretty new to the Xserve side of things.
October 24, 2007 at 2:01 pm #370282lschafroth
ParticipantCan someone tell me how to enable Dynamic DNS updates via DHCP? The previous post by MacTroll says you need to replace the built in DHCP server to do it, but in the next sentence he states the built in DHCP server WILL do it via the Admin GUI.
I’m confused. 🙂
THanks!!
Lannie
January 30, 2008 at 1:03 pm #371316John Lockwood
Participant[QUOTE][u]Quote by: lschafroth[/u][p]Can someone tell me how to enable Dynamic DNS updates via DHCP? The previous post by MacTroll says you need to replace the built in DHCP server to do it, but in the next sentence he states the built in DHCP server WILL do it via the Admin GUI.
I’m confused. 🙂
THanks!!
Lannie[/p][/QUOTE]
What MacTroll meant was that Server Admin can now setup static DHCP mappings using the built-in DHCP server, but that the built-in DHCP server cannot support Dynamic DNS. For Dynamic DNS you need to replace the built-in DHCP server in which case you will no longer be able to use Server Admin to configure it.January 30, 2008 at 3:53 pm #371318lschafroth
ParticipantWe removed our Xserve and replaced it with a MS 2003 server and it is working now.
We had to issue a set computername and local name commands on each mac to get them to release their name to our MS server.
Xserve just isnt quite there yet.
Lannie
January 30, 2008 at 7:59 pm #371321khiltd
ParticipantI’m not sure the XServe can be appropriately blamed for one’s lack of familiarity with it.
January 30, 2008 at 10:52 pm #371324lschafroth
ParticipantIt was a lack of familiarity, it was lack of capability.
We still have 6 Xserves, just not using one for DNS, DHCP stuff. It coudln’t do it.
Lannie
January 31, 2008 at 4:06 pm #371328khiltd
ParticipantI probably wouldn’t invest in an XServe just to run BIND, either, but all signs point to the fact that [b]you[/b] were the one that “couldn’t do it” and are now publicly rationalizing a personal agenda through scapegoating. Did you actually try anything in the article on this subject that was initially recommended? If there were problems with the instructions I’m sure the author would like to know about it so that they can be corrected or amended as needed.
January 31, 2008 at 5:01 pm #371329lschafroth
Participant[QUOTE][u]Quote by: khiltd[/u][p]I probably wouldn’t invest in an XServe just to run BIND, either, but all signs point to the fact that [b]you[/b] were the one that “couldn’t do it” and are now publicly rationalizing a personal agenda through scapegoating. Did you actually try anything in the article on this subject that was initially recommended? If there were problems with the instructions I’m sure the author would like to know about it so that they can be corrected or amended as needed.[/p][/QUOTE]
WHAT?????
Al I did was say that I witched to 2003 to do it. It does it nativly whitout any changes or reconfiguring. It was a easy solution with existing hardware. We use our Xserve’s religously and have no intensions of slamming anything.
We are a Windows and MAC shop and like both and serve no purpose attacking either one. I think you need to step back, take a deep breath and move on.
Lannie
February 7, 2008 at 11:29 pm #371407khiltd
ParticipantSo judging by your reaction I’m going to guess that you did not actually try following the instructions before asserting that it wasn’t possible.
February 8, 2008 at 2:29 pm #371412lschafroth
Participant[QUOTE][u]Quote by: khiltd[/u][p]So judging by your reaction I’m going to guess that you did not actually try following the instructions before asserting that it wasn’t possible. [/p][/QUOTE]
Please read the posts.
I tried several times. The reply I got back is that the Xserve CANNOT dyanmically update the DNS records via DHCP. It was at that point that I quit messing with the Xserve and used the 2003 server.
It works out of the box and I chose that method instead of hacking into the Xserve as it runs other important services so we left it alone.
Please quit trying to turn this into and agenda for yourself against 2003 users.
I use both platforms in our environment and they both work great in their own srengths.
Lannie
-
AuthorPosts
- You must be logged in to reply to this topic.
Comments are closed