LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-03-2004, 06:38 AM   #1
javeree
Member
 
Registered: Jun 2004
Location: Belgium
Posts: 49

Rep: Reputation: 15
Getting hostnames known in the local network


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?)
 
Old 08-03-2004, 07:12 AM   #2
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
You can use dnsmasq that comes along with slackware.. ./etc/rc.d/rc.dnsmasq.
 
Old 08-03-2004, 10:13 AM   #3
BrianWGray
Member
 
Registered: Oct 2003
Posts: 54

Rep: Reputation: 15
Yet?

Quote:
samba is not yet installed - javeree
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.
 
Old 08-04-2004, 05:18 AM   #4
javeree
Member
 
Registered: Jun 2004
Location: Belgium
Posts: 49

Original Poster
Rep: Reputation: 15
@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 ?
 
Old 08-04-2004, 05:39 AM   #5
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
local network OldToker Linux - Networking 2 03-06-2005 05:35 PM
two network cards - one for local network, one for http/vsftpd server scottster Linux - Networking 1 01-20-2005 08:52 PM
local network JJV Linux - Networking 7 03-11-2004 01:44 PM
Cannot resolve local addresses on local network danielgrenyer Linux - Networking 6 01-14-2004 11:03 AM
Can't get out of local network mjf17 Linux - Networking 6 06-01-2003 04:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration