-   Linux - Networking (
-   -   broadcast computer name on network? (

vdemuth 11-09-2005 11:32 AM

broadcast computer name on network?
Ok, I am in need of some help from you networking/internet gurus. This is the picture.
I have just set up a four computer network, well, rather expanded on the works PC which runs WinXP, and added 3 pc's running Slack.
I can see each pc from the others, ping, ssh where I need to, and browse via Samba, but I have installed on one of the extra PCs, which is now being used as a print server, and for backup services, the webmin program.
So, when I want to administer this server, I can login to it from any of the other PCs, including my laptop when I attach it by browsing to its ip address, but I can't get it to broadcast its name.
e.g. to login I go to, when really I would like to go to http://darkstar:10000.
So is there anyway to get the pc to broadcast its name around the local network.

FYI, the pcs are as follows:-

Win XP machine, Depot10,
1st Linux machine, darkstar,
2nd Linux machine, dimbulb,
3rd Linux machine, blackhole,
laptop when on, blackpig,


MensaWater 11-09-2005 12:27 PM

The system itself won't "broadcast". However you can setup a DNS server that does this for all your hosts. I probably wouldn't bother with only 4 PCs - Instead I'd edit the local hosts files on each.

Add entries /etc/hosts on the Linux servers. There is also a hosts file on Windows but I forget where it is located at the moment (windows/system maybe?) - doing search will find it for you.

Entries should all be BELOW the one that already exists for (localhost) in the file and also BELOW any local IP for the host itself.

Entries are in the format:
ipaddress realname alias1 alias2

Where ipaddress is the IP Address, realname is the real host name, alias1 is another name you'd like to be able to find it by and alias2 being a third name. You are NOT required to have the aliases. Many people put in the real name as a short name then an alias for the Fully Qualified Domain Name (FQDN).

Example: myhost

theYinYeti 11-09-2005 12:35 PM

To "broadcast" your PC name on the local network, you can configure all your PCs to use ZeroConf.

It is not always an easy task. I found it easiest with the tmdns program only, instead of mdnsresponder+nss-mdns.


vdemuth 11-10-2005 05:47 AM

jlightner, thanks for the quick reply. That did the trick.
Just one question though, when browsing the network via Win XP network nieghborhood, or using the smb:// protocol in konqueror, the PCs show there designated names, so is there no utility that will look at these names and 'cross translate' them, (for want of a better term) so that they can be seen by a normal web browser. Just asking out of curiosity, and because I always like to learn a little more about Linux.

MensaWater 11-10-2005 08:18 AM

Nothing that does it by default.

You can configure DNS (actually BIND 9x) for hosts only info. You have to make a DNS server using BIND on Unix/Linux (there is also a Windows DNS but I don't know details about that one). You'd then have to edit /etc/resolv.conf on each of your hosts to point at the DNS server and resolve names from it.

Alternatively you could install and configure NIS which is a tool that allows you to create common map files for multiple things (hosts, passwd, group, services etc...). This service is not thought of as very secure but for large environments where you have the same users on multiple hosts is a good tool for making the host environments similar and in tandem with NFS filesystem shares is a good way for making common users and home directories.

As I noted for only 4 servers I probably wouldn't bother with DNS or NIS unless I was just feeling industrious. Here at my workplace we have dozens of servers and also have some that are internet facing (i.e. the public sees them) so have to have DNS.

phatboyz 11-10-2005 04:39 PM

Your windows hosts files are here

XP Home
XP Pro

Just use the hosts file it works great for what you need and then you can just use the name like you want.

All times are GMT -5. The time now is 04:08 AM.