> From: sasan3@gmail.com
> Date: 11 Jul 2006 01:49:29 -0700
> Let's say I have a computer comp.mydomain.com in my local DNS. How do I
> add an alias in the DNS files basically saying "comp" is the same as
> "comp.mydomain.com"? I know I can put this in the /etc/hosts, but I
> just can't get this to work with A and CNAME records!!!

First off, you really don't want to go down this path. Use FQDN
names. ALWAYS!

Having said that, the trick is to set up your /etc/resolv.conf on each
client properly.

domain mydomain.com
search mydomain.com someotherdomain.com
nameserver x.x.x.x
nameserver x.x.x.x

A cavaet: Whatever directive (domain/search) is SECOND in
/etc/resolv.conf is the one that is controlling. The SECOND directive
takes precedence over the first. (The "domain" directive is not really
needed here but is included for completeness.)

> Also, I want all names within xxxx.mydomain.com to be resolved by local
> DNS. But I want www.mydomain.com to be resolved by external DNS. How
> can I add this exception to my DNS table?

Point your internal machines at your local nameserver via your
/etc/resolv.conf. Let the root delegation for mydomain.com handle
external clients. This means that you have two sets of nameservers to

Of course, your internal nameservers will have to be authoritative for
mydomain.com (stealth masters) and may, or may not, have any relation
to the external servers.

You're going to run into a bit of a problem here if you want only one
host in your domain to be resolved by the external nameservers. To
wit, either the local nameservers are authoritative or they are not.
If they ARE authoritative but do not define www.mydomain.com, then as
far as the internal clients are concerned, that host does not exist.
Because the internal servers are authoritative, those DNS requests will
not be forwarded.

Sorry, but that's the way the system works.

Gregory Hicks

I am perfectly capable of learning from my mistakes. I will surely
learn a great deal today.

"A democracy is a sheep and two wolves deciding on what to have for
lunch. Freedom is a well armed sheep contesting the results of the
decision." - Benjamin Franklin

"The best we can hope for concerning the people at large is that they
be properly armed." --Alexander Hamilton