LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-14-2009, 04:01 PM   #1
Cottsay
Member
 
Registered: Feb 2004
Location: Chaska, MN
Distribution: Fedora
Posts: 195

Rep: Reputation: 31
Use Nameserver for local hostnames?


Hi all. I'll be brief; is there a way to use named to resolve the hostnames on my network? ie..."ping computername" properly resolves through the server? I tried adding the name as a normal zone, but that didn't work right. On the windows machines, I had to "ping computername." with the period at the end for it to resolve. Any ideas?

Thanks,

--scott
 
Old 01-14-2009, 08:43 PM   #2
pentode
Member
 
Registered: Dec 2005
Location: Oregon
Distribution: Debian Testing
Posts: 488

Rep: Reputation: 38
Are these Windows machines or Linux? Are you running DNS on a machine in your sub-net? Are you using DHCP to assign addresses? You'll need to tell us a little more about your system.

Also, read up on nsswitch.conf.
 
Old 01-14-2009, 08:55 PM   #3
Cottsay
Member
 
Registered: Feb 2004
Location: Chaska, MN
Distribution: Fedora
Posts: 195

Original Poster
Rep: Reputation: 31
Of course, my fault.

--We use a mixture of OSs, as powerful as linux is, we need windows machines, too.
--The key machines (servers, etc) are on a static IP, while most are DHCP.
--We use a Fedora server running named with caching enabled.

I can, of course, use the hosts file to manually set the hostname/IP mappings, but I'm looking for a dynamic method. I figured, with a caching nameserver running, there would be a way to make this happen. Thanks for the response!

--scott
 
Old 01-14-2009, 08:56 PM   #4
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Are you using a FQDN, because what you are trying to do should work?
 
Old 01-14-2009, 09:02 PM   #5
Cottsay
Member
 
Registered: Feb 2004
Location: Chaska, MN
Distribution: Fedora
Posts: 195

Original Poster
Rep: Reputation: 31
It does, its a subdomin with a class A record. All of the computers are behind the same router, which has DNS forwarded to the nameserver.

Every client has the local nameserver as the first nameserver on their list; that means both static and DHCP clients.

The linux clients work correctly

The windows clients do not, but if I attempt to ping the hostnames with a "." (period) at the end, it resolves correctly.

Thanks again,

--scott
 
Old 01-14-2009, 09:14 PM   #6
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Under TCP/IP settings in Windows, if you go to Advanced->DNS, it gives the option to append a suffix, so if your server is server.example.com, you'd set this to example.com

See if that helps
 
Old 01-14-2009, 09:18 PM   #7
Cottsay
Member
 
Registered: Feb 2004
Location: Chaska, MN
Distribution: Fedora
Posts: 195

Original Poster
Rep: Reputation: 31
Okay, I understand. So, I need to setup each computer with a suffix and when I setup the nameserver to resolve the hostnames, set them up as a subdomain?

This would work, but is there a way to do it without the subdomain? Can I use any bogus domain?
 
Old 01-14-2009, 09:34 PM   #8
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Well if your server's name is server.example.com, you need to use example.com. If it's server.subdomain.example.com, use subdomain.example.com

Basically what you are saying is: assume I need to add example.com to non FQDNs

I don't quite follow your bogus domain comment.
 
Old 01-14-2009, 09:39 PM   #9
Cottsay
Member
 
Registered: Feb 2004
Location: Chaska, MN
Distribution: Fedora
Posts: 195

Original Poster
Rep: Reputation: 31
You answered that for me - now, if I'm understanding you, in order to resolve using the linux nameserver, the hostnames need a suffix. That suffix should be whatever the suffix is on the FQDN of the nameserver.

I just wondered whether I could setup any suffix just to be used internally, but I'll use the suffix of the nameserver. No worries.

Thanks all

--scott
 
Old 01-14-2009, 09:51 PM   #10
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
You could use whatever, but if you want to use mylan.local as a suffix, you need your nameserver to resolve server.mylan.local.
 
Old 01-14-2009, 09:52 PM   #11
Cottsay
Member
 
Registered: Feb 2004
Location: Chaska, MN
Distribution: Fedora
Posts: 195

Original Poster
Rep: Reputation: 31
Understood, thanks much!
 
Old 01-14-2009, 10:49 PM   #12
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Hopefully that works. You should be able to try it on one Windows box first.
 
  


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
Creating local hostnames? greekgoddj General 5 03-22-2008 07:49 PM
FC4: cannot resolve hostnames on local network pyepye Linux - Networking 12 04-05-2006 12:29 PM
Getting hostnames known in the local network javeree Linux - Networking 4 08-04-2004 05:39 AM
hostnames thenewguy05 Linux - Networking 1 07-12-2004 05:08 PM
Hostnames glj Linux - Networking 3 02-12-2002 10:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:38 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration