LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to publish my hostname? (http://www.linuxquestions.org/questions/linux-newbie-8/how-to-publish-my-hostname-732992/)

wiener 06-15-2009 04:19 AM

how to publish my hostname?
 
Hi all,
I have installed Debian Lenny on my PC, which is connected to a network of Unix machines and Windows machines. I can ping from any machine to my Linux PC if I provide the IP address of my PC. Yet, if I try to use my hostname, it fails, saying that the host is unknown.
What must I do in order to make my hostname known by peer machines?

jsteel 06-15-2009 04:31 AM

Can you add DNS entries on your router (or DNS server)? That would be the best way, or you could add the DNS entries to the other computers on your network. I do not know a way to broadcast this information.

peonuser 06-15-2009 04:44 AM

Quote:

Originally Posted by jsteel (Post 3574192)
Can you add DNS entries on your router? That would be the best way, or you could add the DNS entries to the other computers on your network. I do not know a way to broadcast this information.

Yes, it needs to be set up on the dns server. If you are doing this at work, the admins should be able to do that for you. If you are doing it at home and do not have access to the dns in the router or your dns server, you could add the entry for your machine into the host files of all the local machines. I only recommend that as a last resort. Any decent guru should be able to do that for you.

farslayer 06-15-2009 08:16 AM

You would have to install and configure Samba, to get NetBIOS over TCP/IP, so the windows boxes would find it automatically.

The DNS solution is easier and cleaner imho, and will work just as well if not better.

peonuser 06-16-2009 01:08 AM

Quote:

Originally Posted by farslayer (Post 3574390)
You would have to install and configure Samba, to get NetBIOS over TCP/IP, so the windows boxes would find it automatically.

The DNS solution is easier and cleaner imho, and will work just as well if not better.

Samba/etc is even more of a can of worms with security issues. We have a mixed network and just a dns server is all that is needed for us. We dumped samba a long time ago. we use sshfs instead even for windows boxes.

wiener 06-16-2009 04:23 AM

Quote:

Originally Posted by peonuser (Post 3575449)
Samba/etc is even more of a can of worms with security issues. We have a mixed network and just a dns server is all that is needed for us. We dumped samba a long time ago. we use sshfs instead even for windows boxes.

Hi Peonuser,
Will sshf help me to make my host name familiar by peer computers on my network? Can you provide some detail what I need to install/do etc?
Thanks in advance.

jamescondron 06-16-2009 04:50 AM

Check /etc/hosts on the Unix boxes. I forget the file on Windows.

You will need a static IP for the box in question.

farslayer 06-16-2009 02:11 PM

Quote:

Originally Posted by jamescondron (Post 3575639)
Check /etc/hosts on the Unix boxes. I forget the file on Windows.

You will need a static IP for the box in question.

The hosts file on Windows boxes is located at:
c:\windows\system32\drivers\etc\hosts

That solution would work OK for a very small network, but if there is more than a couple PCs involved it can be time consuming to upkeep if you have to update it frequenty.

tinyDNS might be an option, but the OP hasn't specified how many PC's we are talking about or the overall environment. I'd be surprised with a "network of Unix machines and Windows machines" as the OP stated that there isn't already DNS running on the network.

jamescondron 06-16-2009 02:14 PM

I suppose with a little socket programming you could update all the files as quickly as possible, maybe with multicast; the problem being you'd have to have all the exisitng hosts set up and use that as an updater.

Fair point as to the question on whether DNS is running on the network, though

peonuser 06-17-2009 02:47 AM

Quote:

Originally Posted by jamescondron (Post 3576236)
I suppose with a little socket programming you could update all the files as quickly as possible, maybe with multicast; the problem being you'd have to have all the exisitng hosts set up and use that as an updater.

Fair point as to the question on whether DNS is running on the network, though

I agree about knowing whether dns is running on the network. I should have asked that first. The internet has dns servers but usually only support systems on the other side fo the router so to speak. The networks I work on, we always set up the local dns first so i have grown to expect it to be there. Do any of the machines on the network automatically get ip addresses? If you have a device passing out ipaddresses, that would be the first place to see if you can add hostnames to it. For a home network that is usually the router. I use third party software on my router so I know it can be done. If you do not have that and are not familliar with linux, there is some third party software that will let a mswindows box act as a dns server for a local network, but you will have to leave that machine on all the time while the network is being used. for linux there is a package called dsnmasq, that is very easy to setup, if you understand ipaddresses and the like. This a bit more that I would let people new to networking do, but it can be done. There a lot of gotchas here. Without knowing all the details of your network it is hard to give a specific answer. You should map out your network first as if doing a highway map of where you live. You need to know what exact devices (computers, printers, routers, servers, and etc) and what protocols (how devices talk to each other) they use (tcpip, ipx, appletalk, arcnet (god forbid), or etc) are on your network.

http://www.google.com/url?sa=t&sourc...fWbQkOjD4-FCBw


All times are GMT -5. The time now is 05:59 PM.