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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BIND (AGAIN) 1

Status
Not open for further replies.

alidon

Technical User
Jan 2, 2001
9
CA
Things seems to work. But when I do "nslookup anotherdns.com", nslookup response correctly, that goes the same for mail.mydomain.com, and whatever else, except when I do "nslookup mydomain.com anotherdns.com" it fails.

I did something wrong, what is it?
 
That's a common configuration that I see a lot of admins do who should know better.

Since the DNS system treats and mydomain.com as two separate hostnames, you must setup two entries in your dns config for them both to point to the same place. I'm guessing you just have an A record setup for pointing to your IP. You could technically just add another A record for mydomain.com but a CNAME is the more accepted practice.

CNAMES are basically aliases and it's better to use them because you only have to change one IP if your address changes.

Here's an example:

mydomain.com IN A 10.10.10.1
www IN CNAME mydomain.com
ftp IN CNAME mydomain.com
mail IN CNAME mydomain.com
stats IN CNAME mydomain.com

For large zones, it's easier and you're less likely to make typos if you use the CNAME records as one IP change updates them all.

Hope this helps.
GJ
 
GunJack,

Thanks that was it, how long does it usually take for dns records to get updated, up to "."?
 
One important piece of this is the version number in your SOA record. This tells other servers that the zone has changed and they should look for updated information. I believe this really only affects your secondary servers that backup your primary but I would have to look it up in my Bind book to be sure. Just make sure you always increment this when you make a change to a zone.

As soon as you reload the database on your server, the records are updated on your server. There is another value in your SOA record which tells external dns servers how long to cache information for this zone. Depending on what your settings are, it could take hours or days for the change to show up. I don't think external dns servers will cache a "not found" answer so I think when you added your new name, it should be available immediately to everyone but I could be wrong on this point.

If you do much of this, I would recommend getting the O'Reilley Bind book as it's been very helpful for me when I was learning and now as a reference. If you need an explanation of the SOA values, let me know as I'll have to look them up :)

Hope this helps,
GJ
 
Thanks I did buy DNS and Bind by Albitz & Liu, from O'Reilly. I'm getting through it.

Again, your knownlegde is a appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top