Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've got a small business network. We have a few Windows machines, a Linux-based NAS box, and a Linux box on the network. Everything is connected to the Internet through a DSL router (Netopia 3000).

I set it up so the Netopia is the DHCP server.

The problem is that I can only reach the Linux box by IP address, not hostname. When we installed CentOS on that box we picked the option to report the hostname to the DHCP server. But it doesn't work; I can't ping the box by name.

This is odd, because the Linux-based NAS box (a DLink DNS-323) shows up in Windows Explorer just fine, and I can ping it.

What do I need to do to get the Linux box to show up?

share|improve this question
add comment

4 Answers

Do you know anything about DNS? That's the Domain Name Service, it translates names into IP addresses. If you have a DNS server currently internal on your network, you need to ensure that your clients are using it, and that the Linux server has an entry in it.

If not, set one up.

If you can't, you're going to have to update the HOSTS file on every machine in your network, and then update it every time you add or change a hostname.

share|improve this answer
add comment

Install bind on Linux and configure it with some internal DNS name, something like - company.loc Define as a forwarder either the router or your ISP's dns. Assign the IP of the Linux as a DNS on all the workstations. Or even better, move DHCP to Linux server and have it handout IPs and DNS definitions.

share|improve this answer
add comment

You need to setup a local DNS server setup to hold records for your computers, DHCP doesn't do that... Assuming these computers need to use the internet too, you need to setup root hints for domains that you don't control so your server knows where else to ask for IPs.

share|improve this answer
add comment

You need a DNS server and a DHCP server to accomplish that. Windows from the XP try DNS based resolving first, and NetBIOS after. So you can easily setup a DNS server (on CentOS BIND is preferable) to resove these names. Install named (this is the name of BIND in the Red Hat world) with the yum install named command. Set DHCP to send DNS suffix to clients .local for example. After it, you should create the local zone in BIND. In /etc/named/host.local something like this : ` $ttl 38400

local. IN SOA server. youremail.domain.com. (

                    1275728857
                    10800
                    3600
                    604800
                    38400 )

local. IN NS server

server1 IN A 10.1.1.1

server2 IN A 10.1.1.2

`

named.conf.local will load this zone with your servers, and when you try to access server1, DNS append the suffix, and resolve the server1.local perfectly. After DNS setup, don't forget to call service named restart to apply your new configuration.

share|improve this answer
    
Since he's already doing DHCP on his router, this may be a little confusing to him. –  mfinni Mar 16 '11 at 21:11
    
Yes, but he need to setup the DNS suffix in it. I didn't wrote anything about to install DHCP server software, but without DHCP reconfiguration, DNS based name resolving won't work. Sorry about the confuse, I hope this comments help to clear. –  Glendyr Mar 17 '11 at 8:14
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.