Welcome to WebmasterWorld Guest from 50.17.87.126

Forum Moderators: bakedjake

Message Too Old, No Replies

Hostname Issue With CentOS

What am I doing wrong?

     

ChainsawXIV

11:12 pm on Jan 23, 2008 (gmt 0)

5+ Year Member



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.

Any ideas what I've got wrong?

lammert

11:05 am on Jan 24, 2008 (gmt 0)

WebmasterWorld Senior Member lammert is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



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

ChainsawXIV

2:19 pm on Jan 24, 2008 (gmt 0)

5+ Year Member



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.

steve

10:08 am on Jan 25, 2008 (gmt 0)

10+ Year Member



Can you access your server by IP address, i.e 192.168.123.#*$!?

ChainsawXIV

4:47 am on Jan 28, 2008 (gmt 0)

5+ Year Member



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.

Thanks for the help and information all.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month