LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 12-05-2007, 08:43 AM   #1
ingerul9
Member
 
Registered: Jan 2007
Posts: 35

Rep: Reputation: 15
Cool Append DNS suffix in Linux


I have the following problem or dilema:

In windows whenever I try to ping a hostname I just use for example
"ping avatar" in which the dns server responds and answers me with the ip of the machine named avatar.

In windows however the append suffix name is made automatically so when I do "ping avatar" it goes automatically to "ping avatar.test" cause that's the dns suffix.

When I try to use the same command in linux "ping avatar" it says it's unknown host name. So I'm going to /etc/hosts file and I make it manually. In this way it works. But from the /etc/host.conf file it says that first it goes to hosts and then bind file.

My question is how do I make it to append dns suffix automatically in Linux so when I try to "ping avatar" it goes automatically like in windows to "ping avatar.test".

Offcourse if I give the command "ping avatar.test" in linux it works. Am I missing something?
 
Old 12-05-2007, 08:48 AM   #2
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,906

Rep: Reputation: Disabled
Code:
$ cat /etc/resolv.conf
search rlwhome.lan
nameserver 192.168.13.1
nameserver 10.10.13.1
 
Old 12-05-2007, 08:52 AM   #3
ingerul9
Member
 
Registered: Jan 2007
Posts: 35

Original Poster
Rep: Reputation: 15
I have the following settings in resolv.conf

search test.net
nameserver 10.1.1.1
nameserver 10.1.1.2

But it still doesn't work.

Last edited by ingerul9; 12-05-2007 at 08:53 AM.
 
Old 12-05-2007, 09:03 AM   #4
Gault LaRue
Member
 
Registered: Jul 2005
Location: Columbia, MD
Distribution: Slackware 10.2 / 11.0 / 12.0
Posts: 38

Rep: Reputation: 15
Change "search test.net" to just "search test" if you are looking for avatar.test.

GL
 
Old 12-05-2007, 09:16 AM   #5
ingerul9
Member
 
Registered: Jan 2007
Posts: 35

Original Poster
Rep: Reputation: 15
Ok. It worked. I am so stupid .

Now I have another question regarding the DNS section of the same problem. Whenever I try to use the command dig avatar it doesn't work but when I use dig avatar.test it works.

I know it's related to FQDN I think. Is it possible to change somewhere to resolve only when I type "dig avatar" and not "dig avatar.net"

Last edited by ingerul9; 12-05-2007 at 09:31 AM.
 
Old 12-05-2007, 10:30 AM   #6
shahz
Member
 
Registered: Sep 2006
Location: Quetta, Pakistan
Distribution: RHEL 4
Posts: 360

Rep: Reputation: 29
can you just type the command

man dig

you will get a answer
 
Old 12-05-2007, 11:09 AM   #7
ingerul9
Member
 
Registered: Jan 2007
Posts: 35

Original Poster
Rep: Reputation: 15
I know how to look into man pages of the commands. But if I would have understood the first time from reading the man page of the dig command I wouldn't have posted here.

So do u want to enlighten me? Sometimes I miss the obvious.
 
Old 12-05-2007, 11:39 AM   #8
digitalboy74
Member
 
Registered: Aug 2004
Location: Matrix
Distribution: slack currrent
Posts: 61

Rep: Reputation: 16
Working on your homework?
 
Old 12-05-2007, 12:28 PM   #9
ingerul9
Member
 
Registered: Jan 2007
Posts: 35

Original Poster
Rep: Reputation: 15
I'm trying to understand. I have no homework. I'm trying to learn.
 
Old 12-07-2007, 02:47 AM   #10
evilDagmar
Member
 
Registered: Mar 2005
Location: Right behind you.
Distribution: NBG, then randomed.
Posts: 480

Rep: Reputation: 31
Avatar.test has to actually exist, which means you'd need to have a local nameserver running the .test top-level domain (which you likely don't) for this to work.
 
  


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
LXer: Hash Suffix Array Delta Compression on Linux LXer Syndicated Linux News 0 11-28-2007 07:50 PM
How do I configure DNS suffix in Fedora Core 6 dperryr Linux - Newbie 1 11-01-2007 06:52 AM
DNS suffix Golzari-Ali Linux - General 2 09-30-2006 01:23 PM
can't access/locate other PCs with different DNS suffix rsumbeling Linux - Networking 1 12-06-2004 05:41 PM
BIND9 and W2k dhcp clients DNS suffix issue. wasp4141 Linux - Networking 1 04-06-2004 10:56 PM


All times are GMT -5. The time now is 11:44 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration