LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 11-18-2009, 06:54 PM   #1
MJBoa
LQ Newbie
 
Registered: May 2008
Posts: 15

Rep: Reputation: 0
Linux machine not reporting hostname correctly


So I have a linux machine that I'd like to report its hostname correctly so it can be identified on a list of machines connected to my network.
I have /etc/hostname set and hostname correctly reports what it is. But it seems not to report this to other machines that ask for it.
For example, the command nslookup <my ip> reports NXDOMAIN basically meaning, from what I gather, that it couldn't find a hostname. Yet when I run nslookup <other windows machine ip> it correctly reports the hostname for the Windows machine.
What do I need to set up in order to have it be identifiable by its hostname? Do I need a DNS server and does Windows automatically run one?
Thanks.
 
Old 11-18-2009, 07:00 PM   #2
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,850

Rep: Reputation: 350Reputation: 350Reputation: 350Reputation: 350
You need DNS for that. Windows doesn't run DNS by default but does use WINS which is a proprietary distributed method of name discovery. Basically Windows machines just broadcast their hostname out to anyone who is listening.

You can get WINS support on Linux by installing amd configuring SAMBA to use WINS name resolution.

Alternately, if these machines are connected to a home router doing DHCP/DNS, your Linux machine might not be passing it's hostname to the server in the boot scripts. But the installer in most distros would have asked you about that.
 
Old 11-18-2009, 07:22 PM   #3
MJBoa
LQ Newbie
 
Registered: May 2008
Posts: 15

Original Poster
Rep: Reputation: 0
So all I want my machine to do is report itself as <hostname>. I don't want other machines to be able to request DHCP leases or DNS lookups for any other systems.
I tired setting netbios name = <hostname> in /etc/samba/smb.conf but this seems to have no effect.
Although I have a static IP, I don't think that should matter though.
So should I be running dnsmasq? Can I make it only report my hostname when asked and not do anything else?

Last edited by MJBoa; 11-18-2009 at 07:28 PM.
 
Old 11-19-2009, 06:08 AM   #4
Ippy98
LQ Newbie
 
Registered: Dec 2006
Posts: 13

Rep: Reputation: 0
The way other machines would see your hostname is through DNS.

You could try statically adding the hostname of your linux box to your \etc\hosts file in windows.


Its usually in
c:\winnt\system32\drivers\etc\hosts
or
c:\windows\system32\drivers\etc\hosts


or you can run a local DNS that would do DNS just for your local network, and your router would still do DNS for your internet connection.
 
  


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
Cannot access my linux machine when i type the hostname instead of ip address dcordina Linux - Networking 1 04-07-2009 06:43 AM
Cannot find the Linux machine by hostname ufmale Linux - Networking 3 03-18-2008 12:51 PM
My hostname is NOT resolving correctly cucolin@ Linux - Networking 5 08-29-2007 10:22 AM
How do I correctly set a hostname? MiGI Linux - Software 1 03-17-2006 04:03 PM
Can't ping linux machine by hostname jdklein1975 Linux - Networking 3 02-26-2003 01:49 PM


All times are GMT -5. The time now is 10:39 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