LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-23-2007, 10:22 AM   #1
Richtown
Member
 
Registered: Apr 2006
Location: Portsmouth
Distribution: CentOS & Ubuntu
Posts: 49

Rep: Reputation: 15
Question DNS /var/named/named.hosts


Hi,

I am wrtting the following file "/var/named/blast.hosts" and was wondering about the line highlighted in bold. Will DNS run without this line? I understand that it's a alias for the hostname but when would you use it?

@ IN SOA darkice.blast. root.darkice.blast. (
2006112100; Serial Number Year Month Day Serial Number
28800; Refresh
14400; Retry
3600000; Expire
86400); Minimum
IN NS darkice.blast.

localhost IN A 127.0.0.1
darkice IN A 192.168.1.124
darkice IN A 172.16.87.1
client IN A 172.16.87.129

cl IN CNAME client


Kind Regards
Rich.

Last edited by Richtown; 04-23-2007 at 10:23 AM.
 
Old 04-23-2007, 12:06 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Yes it will run without it.

CNAME records are pointers (think of them as aliases). You can set them up so your system can be accessed by these aliases.

Say you wanted to have people think of your "darkice" like a black gem such as "onyx". You already have the address record equating darkice to the IP so you just create the CNAME:

onyx IN CNAME darkice.darkice.blast.

Anyone looking for onyx in that zone will find it and immediately go to the IP you assigned to darkice in the earlier A record.
 
Old 04-23-2007, 12:09 PM   #3
ramram29
Member
 
Registered: Jul 2003
Location: Miami, Florida, USA
Distribution: Debian
Posts: 848
Blog Entries: 1

Rep: Reputation: 47
Yes, you can run it without your cl cname. a CNAME is a canonical name or an alias or a nickname. Hence, connecting to cl.darkice.blast is the exact same thing as connecting to client.darkice.blast. People mostly use it for virtual hosts. For example, if you have www.example.com, ftp.example.com and webmail.example.com, all being hosted on the same IP address then you can create CNAME's for all of them but one.
 
Old 04-23-2007, 02:04 PM   #4
Richtown
Member
 
Registered: Apr 2006
Location: Portsmouth
Distribution: CentOS & Ubuntu
Posts: 49

Original Poster
Rep: Reputation: 15
Thanks guys, that makes it easier for me to code my php interface for dns.

:-)
 
  


Reply

Tags
bind, dns



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dns /var/run/bind/named.pid permission denied namit Linux - Software 1 04-22-2007 04:16 PM
DNS error from /var/log Named[156] guanyu Linux - General 3 12-17-2006 07:07 AM
/var/named grimse Linux - Security 2 01-15-2005 06:23 AM
DNS named and /etc/hosts Pollyanna Linux - Networking 0 03-22-2004 02:39 PM
cannot find named.conf and /var/named kaushikma Red Hat 1 02-07-2004 12:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration