Msg#: 3556355 posted 11:12 pm on Jan 23, 2008 (gmt 0)
I'm setting up a CentOS 5 box on my local network to serve as a test platform and file server, and I'm having some trouble getting it's host name to register properly on the network. I'm hoping someone can tell me what I'm doing wrong.
I've set the hostname in etc/hosts, etc/sysconfig/network, and ifcfg-eth0, but it doesn't seem to be registering with the rest of the network. I can't refer to the CentOS box by name from the other machines on the network (Windows XP boxes), and the machine's Hostname listing in my router's DHCP display is blank.
Msg#: 3556355 posted 11:05 am on Jan 24, 2008 (gmt 0)
With the protocols Microsoft uses by default in Windows, all machines are telling their names to everyone who wants to hear it and even if they don't want to hear it. Unix implementations are a little bit more shy :) You have to add the name of the your CentOS server to a local DNS server you operate, or to every single hosts file on the other machines. On XP machines you can find the hosts file in C:\WIN...\SYSTEM32\drivers\etc
Msg#: 3556355 posted 2:19 pm on Jan 24, 2008 (gmt 0)
Thanks, that helps a lot. Am I correct in thinking that setting up my own DNS server is not something that's practical for a home LAN? If it's something I just need to configure, it seems like a better option than setting numerous individual files, but it's not like I plan to actually host to the outside from home.
Msg#: 3556355 posted 4:47 am on Jan 28, 2008 (gmt 0)
As it happens, this seems to have resolved itself almost by accident. After getting Samba working and configured for my file share, I'm able to address the machine by name just as I wanted (including non-Samba related connections, such as HTTP).
I'm not 100% certain it was setting up Samba that made it work. I had tinkered unsuccessfully with a couple of DNS server options, so it could be some side effect of that. But since I never actually got the DNS working, or even fully set up, I'm pretty sure.
I don't like the 'magic' factor in the solution, but I'm not savvy enough with Linux at this point to be more sure.