Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have both a Slackware 9.1 box and an XP box hanging on a router/switch which serves as a DHCP server. Both get their IP address via DHCP, and both PC's can ping each other using the IP address. I am at a loss as to how I could make sure that these PC's can know each other's hostname?
Sure, I could enter the IP addresses in the host files manually, but that works only as long as the DHCP server does not assign a new IP address.
I guess there must be a way to automatically keep the hosts file up to date (or have some kind of daemon do the resolution), but I have no idea of the kind of configuration I would need for this.
The network is currently peer-to-peer (and I would like to keep it that way if possible), and samba is not yet installed, but at this moment I am just looking into ways to have the PCs knowing each other's name.
P.s. both PC's are in the same subnet (or was that obvious?)
Does this mean that you have plans of installing Samba in the near future? if so it can use the master browser on your network or force it's way to the top of the list as a master browser.
@ppuru
From what I read I understand that dnsmasq is something that should be run on the gateway/router. In my case, the gateway/router is not a computer, so I cannot configure it in this way.
As this is a simple peer-to-peer network, there is no single server that is always on, so I think I need something where names are autodetected and exchanged between peers.
@Brian
My comment on samba meant that I thought this would be the way to go. I was mainly wondering if something simpler/equivalent/non-MS would be possible.
If samba is needed, is it possible to restrict it to only exchanging the names using the master browser mechanism.
Actually the application I was going for was using the Linux PC as a print server using CUPS (which works). However, I don't want to change the port address on the windows box every time the Linux Box gets a new IP address.
Actually, with my small setup, the simplest way to work is probably assigning static IP addresses and edit host files on other boxes, but on the other hand, how would we learn from sticking with the simplest solution ?
If you can modify the DHCP IP lease time to infinite, you can still work with /etc/hosts. Again, DHCP addresses won't change very often if there are adequate number of IPs to be leased and fewer systems contending for an IP. In your case, there are just 2 systems and can I assume your router leases the entire 192.168.0 subnet.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.