LinuxQuestions.org
Help answer threads with 0 replies.
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
 
LinkBack Search this Thread
Old 02-17-2011, 10:23 AM   #1
karlochacon
Member
 
Registered: Dec 2006
Posts: 107

Rep: Reputation: 17
host issue to resolve itself


hi guys

I have standalone Suse 10 SP3 that when I run
Code:
# hostname
webserver
but when I run host command
Code:
# host webserver
;; connection timed out; no servers could be reached
I would like to get the IP when I issue
Code:
host webserver
x.x.x.x
and the name when
Code:
host x.x.x.x
webserver
in /etc/hosts I have
Code:
x.x.x.x  webserver
in /etc/HOSTNAME
Code:
webserver
I don't know what to put in /etc/resolv.conf


any idea how to make to resolve to itself?

thanks a lot
 
Old 02-17-2011, 10:29 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,345

Rep: Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945
the host command is for dns lookups only. it won't use data in /etc/hosts. so if you specifically want to resolve that data using dns then you'd need a dns server that contains that record, possibly dnsmasq. However other programs, e.g. ping use a stack as defined in /etc/nsswitch.conf to resolve names, not just dns, so maybe you're troubleshooting the wrong issue and there's no problem to addres in the first place.
 
Old 02-17-2011, 10:41 AM   #3
karlochacon
Member
 
Registered: Dec 2006
Posts: 107

Original Poster
Rep: Reputation: 17
but I really don't want to use DNS since it is not needed.

in that case hostname will check if the hostname is correct right?
 
Old 02-17-2011, 12:03 PM   #4
valen_tino
Member
 
Registered: Jan 2008
Posts: 105

Rep: Reputation: 28
hostname -i
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu Server 8.10 cannot resolve host wvw Linux - Server 2 02-17-2009 07:31 AM
host resolve via dns shan_nathan Linux - Server 2 10-01-2008 12:18 AM
unable to resolve host in ubuntu 8.04 pdelcast Linux - Networking 6 07-25-2008 06:01 PM
Unable to resolve host name MistaT Linux - Server 5 07-16-2007 04:22 PM
DHCP not able to resolve host rmcastil Linux - Newbie 8 08-10-2005 06:31 AM


All times are GMT -5. The time now is 05:33 AM.

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