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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-14-2009, 05:01 PM
|
#1
|
Member
Registered: Feb 2004
Location: Chaska, MN
Distribution: Fedora
Posts: 195
Rep:
|
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
|
|
|
01-14-2009, 09:43 PM
|
#2
|
Member
Registered: Dec 2005
Location: Oregon
Distribution: Debian Testing
Posts: 488
Rep:
|
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.
|
|
|
01-14-2009, 09:55 PM
|
#3
|
Member
Registered: Feb 2004
Location: Chaska, MN
Distribution: Fedora
Posts: 195
Original Poster
Rep:
|
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
|
|
|
01-14-2009, 09:56 PM
|
#4
|
LQ Guru
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678
Rep:
|
Are you using a FQDN, because what you are trying to do should work?
|
|
|
01-14-2009, 10:02 PM
|
#5
|
Member
Registered: Feb 2004
Location: Chaska, MN
Distribution: Fedora
Posts: 195
Original Poster
Rep:
|
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
|
|
|
01-14-2009, 10:14 PM
|
#6
|
LQ Guru
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678
Rep:
|
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
|
|
|
01-14-2009, 10:18 PM
|
#7
|
Member
Registered: Feb 2004
Location: Chaska, MN
Distribution: Fedora
Posts: 195
Original Poster
Rep:
|
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?
|
|
|
01-14-2009, 10:34 PM
|
#8
|
LQ Guru
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678
Rep:
|
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.
|
|
|
01-14-2009, 10:39 PM
|
#9
|
Member
Registered: Feb 2004
Location: Chaska, MN
Distribution: Fedora
Posts: 195
Original Poster
Rep:
|
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
|
|
|
01-14-2009, 10:51 PM
|
#10
|
LQ Guru
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678
Rep:
|
You could use whatever, but if you want to use mylan.local as a suffix, you need your nameserver to resolve server.mylan.local.
|
|
|
01-14-2009, 10:52 PM
|
#11
|
Member
Registered: Feb 2004
Location: Chaska, MN
Distribution: Fedora
Posts: 195
Original Poster
Rep:
|
Understood, thanks much!
|
|
|
01-14-2009, 11:49 PM
|
#12
|
LQ Guru
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678
Rep:
|
Hopefully that works. You should be able to try it on one Windows box first.
|
|
|
All times are GMT -5. The time now is 12:34 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|