LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-02-2008, 10:31 PM   #1
hsia
LQ Newbie
 
Registered: Oct 2008
Posts: 14

Rep: Reputation: 0
Question Can I set a single word to be an FQDN?


I've set an FQDN for an IP address using BIND like suzie.example.com, but I feel that suzie.example.com is too long. I think that it's better if I can set a single word like suzie to be an FQDN. Thanks for helping.
 
Old 11-02-2008, 11:21 PM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Then that would just be a hostname. The FQDN is an extension of the single-word hostname to make it unique. In other words, server1.example.com would be different than server1.test.com.

But if you are just using this name server on a local network, you can refer to the host with just the hostname, assuming the machine you are on is correctly configured to search that domain.
 
Old 11-03-2008, 12:33 AM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Yeah, in the conf file you can declare a CNAME rec that points 'suzie' to suzie.example.com.
That's how everybody does it.
Good example here: http://www.linuxtopia.org/online_boo...bind-zone.html
 
Old 11-03-2008, 12:36 AM   #4
hsia
LQ Newbie
 
Registered: Oct 2008
Posts: 14

Original Poster
Rep: Reputation: 0
Dear, Mr. MS3FGX

Thank you for helping me. I am using this name server on a local network, but the network is too large to set the host file one by one. Can I set this on DNS server?
 
Old 11-03-2008, 12:42 AM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
That link I gave shows you how to set it in a zone file in DNS, either as an A rec or possibly a CNAME.
 
Old 11-03-2008, 05:11 AM   #6
hsia
LQ Newbie
 
Registered: Oct 2008
Posts: 14

Original Poster
Rep: Reputation: 0
Dear Mr Chrism01,

Thanks for helping me. I've tried the link you show me, but I can't make it worked. If I omitted the zone name in named.conf, named fails to start. If I use $ORIGIN example.com., IN NS suzie, and suzie IN A 192.168.1.2., nothing's happen. host suzie.example.com, I get "suzie.example.com has address 192.168.1.2." and host suzie, I get"Host suzie not found:3 (NXDOMAIN)". Actually, I am new in computer thing. Can you help me any further?

Last edited by hsia; 11-03-2008 at 05:16 AM.
 
Old 11-03-2008, 05:25 AM   #7
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Have a look in /etc/resolv.conf

You may want to add

search example.com

to get suzie treated as suzie.example.com
 
Old 11-03-2008, 10:18 PM   #8
hsia
LQ Newbie
 
Registered: Oct 2008
Posts: 14

Original Poster
Rep: Reputation: 0
Dear Mr. BillyMayDay,

Thanks for helping me, now my server can locate suzie, but I can't ping suzie from my client. I can only ping suzie.example.com. Please help me.
 
Old 11-04-2008, 12:00 AM   #9
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
When you change the entries in the zone file, you need to increase the value of the number in the 'serial' field, usually by '1', so that bind/DNS knows it needs to re-broadcast that info to all systems.
That can take a little while. I think (?) if you reboot DNS on that system after you've fixed the file (ie set the recs correctly, increment the serial), that will force a re-broadcast.
See section '16.3.3. Example Zone File' in that doc I linked to.
Actually, prob a good idea if you post your file here.
 
Old 11-04-2008, 03:38 AM   #10
hsia
LQ Newbie
 
Registered: Oct 2008
Posts: 14

Original Poster
Rep: Reputation: 0
Dear Mr. Chrism01,

Thanks again, here is my zone file:

$TTL 86400
@ IN SOA suzie.example.com. root.example.com. (
2008102435 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ) ; minimum TTL of 1 day
IN NS suzie.example.com.
IN MX 10 mail.example.com.
suzie IN A 192.168.1.2
mail IN A 192.168.1.2

I've tried to add $ORIGIN example.com., change every suzie.example.com. to suzie., add serial number by one, and restart named. I've tried to do the same in 1.168.192.in-addr.arpa.zone. But nothing happened.
I've tried to add suzie IN CNAME suzie.example.com, too. But named failed to start.
Please help me.
 
Old 11-04-2008, 07:20 PM   #11
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
What about the last section (in 16.3.3) about needing a matching zone entry in named.conf like this
Code:
 This zone file would be called into service with a zone statement in the named.conf similar to the following:

zone "example.com" IN {
	type master;
	file "example.com.zone";
	allow-update { none; };
};
Also, i think you need the ORIGIN entry as well.
Unfortunately, everything I know about DNS I got from that article, so if any DNS gurus want to jump in, feel free
 
Old 11-05-2008, 03:02 AM   #12
hsia
LQ Newbie
 
Registered: Oct 2008
Posts: 14

Original Poster
Rep: Reputation: 0
Dear Mr.Chrism01,

Here ini my zone statement in named.conf:
zone "example.com" {type master; file "example.com.zone"; allow-update {key "rndckey";}; notify yes;};

If you see any clue to help me, please tell. By the way, Thank you for helping me this far. I really appreciate it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
how to change/set fqdn? johnpaulodonnell Linux - Newbie 1 04-27-2007 08:05 AM
help... get single word from file night-blade1 Programming 3 10-12-2004 09:58 AM
How to set FQDN in debian? davidas Debian 4 04-14-2004 07:37 AM
display full line instead of single word in for loop ken734 Linux - Newbie 3 08-15-2003 03:35 PM
what should i set a local FQDN to? vrillusions Linux - Newbie 1 02-09-2003 04:32 AM


All times are GMT -5. The time now is 02:42 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration