LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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
 
LinkBack Search this Thread
Old 03-18-2008, 10:36 AM   #1
ufmale
Member
 
Registered: Feb 2007
Posts: 378

Rep: Reputation: 30
Cannot find the Linux machine by hostname


I setup a Redhat machine and set its hostname to server1.mycompany.com.
Now I cannot ping it or access it by the hostname. However, accessing via the IP address works fine. Is there any way to flushdns or something like that on Linux?
 
Old 03-18-2008, 10:39 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 39,849

Rep: Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121
well what DNS do you have? has it ever worked? I assume you have done more than just set the hostname and expect that to magiaclly become known by other systems?
 
Old 03-18-2008, 11:21 AM   #3
ufmale
Member
 
Registered: Feb 2007
Posts: 378

Original Poster
Rep: Reputation: 30
Yes. It works before. I am on a dynamic IP within a company network so I wasn't sure if when the IP change, it will mess up the hostname.
 
Old 03-18-2008, 12:51 PM   #4
Linville79
Member
 
Registered: Nov 2006
Location: Indiana, U.S.A.
Distribution: Red Hat Enterprise Linux, Fedora, and others as time allows.
Posts: 134

Rep: Reputation: 16
From www.tech-faq.com:
Quote:
In Linux, the nscd daemon manages the DNS cache. To flush the DNS cache, restart the nscd daemon. To restart the nscd daemon, use the command `/etc/rc.d/init.d/nscd restart`.

However, just setting a host name on a server does not make it available to other machines, neither inside our outside of the network that it is on. Some sort of name resolution is needed, either via DNS or by using your /etc/hosts file on the machine you are trying to connect from.

Last edited by Linville79; 03-18-2008 at 12:53 PM.
 
  


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
to find RAM info in a linux machine madhugp Linux - General 5 07-08-2010 06:33 AM
XP machine cannot find Linux machines moonmoth Linux - Networking 1 07-31-2005 01:26 PM
How do i use a hostname given by No-IP as my machine name? z-vet Linux - Networking 3 10-22-2004 08:06 PM
Can't ping linux machine by hostname jdklein1975 Linux - Networking 3 02-26-2003 01:49 PM
I cant find linux machine in win2k godwin_73 Linux - Networking 0 11-28-2001 06:43 AM


All times are GMT -5. The time now is 05:01 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
Open Source Consulting | Domain Registration