Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 02-29-2008, 10:22 AM   #1
Registered: Mar 2007
Distribution: Hardy (Gnome on Ubuntu 8.04) on Compaq N600c laptop
Posts: 323

Rep: Reputation: 30
nameserver resolves unqualified hostname in nslookup, ping (at CLI) doesn't-- why?

I open nslookup and merely type "computer1" and it replies with the correct ip address. I then exit and go to the command line, and type "ping computer1" and it's completely baffled. Yet /etc/resolv.conf contains the very same server as nslookup chooses.

Why is this?
Old 02-29-2008, 07:23 PM   #2
Senior Member
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 5, Linux Lite
Posts: 4,312

Rep: Reputation: 210Reputation: 210Reputation: 210
Hostnames go into your /etc/hosts file: <ip_address> <hostname>. Now if you ping with the hostname is should work. The name in your resolv.conf file is what resolvconf has picked up as your nameserver.


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
no matter what I ping it resolves to the localhosts's IP.... aubrey-calm2 Linux - Newbie 4 08-31-2006 12:17 PM
nslookup - secondary (alternate) nameserver k1mgy Linux - Networking 2 02-20-2005 09:00 AM
sendmail hanging on boot (unqualified hostname) Warmduvet Linux - Networking 2 08-24-2004 09:41 PM
sendmail and unqualified hostname wlfdgcrkz Linux - Software 1 06-02-2003 03:53 PM
IPChains hostname has multiple IPs is resolves to? Ionized Linux - Networking 1 07-30-2002 01:03 AM > Forums > Linux Forums > Linux - Networking

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

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