LinuxQuestions.org
Visit Jeremy's Blog.
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 10-18-2005, 11:58 AM   #1
demerson3
Member
 
Registered: Sep 2004
Location: Los Angeles
Distribution: debian stable
Posts: 43

Rep: Reputation: 15
Question home network with no server?


So, I've got three boxes here that are kind of networked. Two are running debian-based mepis, the other win 98 se.


=== QUESTION ===
How can I make each of the linux boxes take responsibility for name resolution of the other computers on the network?


Unfortunately, there is no machine that can be powered on at all times -- thus we can't have a "server". I need to be able to power off any machine, and have the other two continue to network amongst themselves. (Actually, the more likely scenario is that two will be powered up in the morning, and the other will not be.) IP's are assigned via dhcp by a linksys router. I wish it could be done statically, but alas it cannot be. Virtually every bit of advice I find on networking assumes that a server will be present in the setup.


=== QUESTION ===
Does anyone know of a good place to look for home networking advice without a server? I don't know if it would be called a peer-to-peer home network?


The good news is that nfs, samba and ssh are working ... MOST of the time. Internet dns works flawlessly. Also, samba seems to pick up the computer names just fine. But for nfs, ssh, ping, etc., I have to type IP's. So how can I get the linux boxes to periodically scan the network and assign/reassign host names to local ips?

Thanks,
David.

... I eventually figured this out. There was a lot of time wasted exploring /etc/hosts and static IPs, and BIND. The real answer is winbind, at the end of this thread. Look here.

Last edited by demerson3; 02-03-2006 at 03:58 PM. Reason: refer to real answer
 
Old 10-18-2005, 12:04 PM   #2
zymurgist
Member
 
Registered: Jan 2003
Location: Long Island
Distribution: Redhat 8.0
Posts: 109

Rep: Reputation: 15
Just put your IPs in the /etc/hosts file(s) and you won't have any problems.
 
Old 10-18-2005, 01:09 PM   #3
demerson3
Member
 
Registered: Sep 2004
Location: Los Angeles
Distribution: debian stable
Posts: 43

Original Poster
Rep: Reputation: 15
no go

As stated, I must use DHCP, so the IPs frequently change. Like, every day.

One day "mark" is 192.168.1.100 and "david" is 192.168.1.101.
The next day they could be switched, or at 102 and 103.
 
Old 10-18-2005, 01:13 PM   #4
zymurgist
Member
 
Registered: Jan 2003
Location: Long Island
Distribution: Redhat 8.0
Posts: 109

Rep: Reputation: 15
You can set static IPs in dhcpd.conf. Its easier than setting up BIND, but if you really need DNS, then you can set up a BIND master and slave on the two servers.
 
Old 10-18-2005, 01:35 PM   #5
demerson3
Member
 
Registered: Sep 2004
Location: Los Angeles
Distribution: debian stable
Posts: 43

Original Poster
Rep: Reputation: 15
Hi zymurgist,

I'd love to have SOME static IPs, but I struggled for quite some time and couldn't get the linksys to mix static IPs and DHCP. The windoze box MUST use DHCP, for reasons beyond the scope of this message.

1) It sounds like you're saying that the only way I can get the linux boxes to search the network for names is by using BIND. Is that correct?

2) Is it possible to set up BIND to JUST do local network DNS, and not bother with anything outside the local network?

3) Will BIND work on a computer that has its IP assigned by DHCP?

4) Would you advise that I go and struggle with the linksys some more to see if it will mix static and DHCP before I try and set up BIND?

Thanks!
 
Old 10-18-2005, 01:43 PM   #6
zymurgist
Member
 
Registered: Jan 2003
Location: Long Island
Distribution: Redhat 8.0
Posts: 109

Rep: Reputation: 15
Hi zymurgist,

I'd love to have SOME static IPs, but I struggled for quite some time and couldn't get the linksys to mix static IPs and DHCP. The windoze box MUST use DHCP, for reasons beyond the scope of this message.
You're not really mixing them. There should be a section in your linksys config to map specific IPs to MAC addresses and still enable DHCP for the rest. I'll take a look at my linksys router when I get home.

1) It sounds like you're saying that the only way I can get the linux boxes to search the network for names is by using BIND. Is that correct?
Either bind or /etc/hosts!

2) Is it possible to set up BIND to JUST do local network DNS, and not bother with anything outside the local network?
Yup, just configure named.conf with your local network.

3) Will BIND work on a computer that has its IP assigned by DHCP?
Of course! Just set the DNS servers issued by DHCP to be your BIND servers.

4) Would you advise that I go and struggle with the linksys some more to see if it will mix static and DHCP before I try and set up BIND?
Absolutely! See above.
 
Old 10-19-2005, 12:21 AM   #7
demerson3
Member
 
Registered: Sep 2004
Location: Los Angeles
Distribution: debian stable
Posts: 43

Original Poster
Rep: Reputation: 15
/etc/hosts seems only to be useful for static IPs. The man says "hosts - The static table lookup for host names". I can't imagine how /etc/hosts could be useful for matching IPs with hostnames when they are constantly changing with DHCP. Am I missing something?

Is bind any different? All of the BIND documentation I've read indicates that its primary purpose is to connect to another DNS server upstream, and copy and proliferate that data. I can't find anything that says that it will go looking around a network and create its own database of IPs and hostnames, which is precisely what I need. Does BIND actually do that searching and create and re-create a list of IPs and hostnames?


Ah yes, I'm remembering now why I gave up on the static IPs... I tried it again:
"david" = 192.168.1.44
"gatewaypc" = 192.168.1.77
(d is the 4th letter, g is the 7th. Just trying to make this more readable)
- DHCP starting address is 192.168.1.100
- both "david" and "gatewaypc" can, e.g., ping yahoo.com and function normally on the internet.
- both can ping self via the static ip addresses, i.e., david can ping 192.168.1.44, and gatewaypc can ping 192.168.1.77
- both can ping the windoze box assigned via DHCP at, e.g., 192.168.1.100
- However, I cannot ping the static IPs from elsewhere -- david cannot ping 192.168.1.77, and gatewaypc cannot ping 192.168.1.44. Neither can the windoze box ping either 192.168.1.44 or 77


I've looked all over my router's configuration pages and manual, and I can't find any place to map IPs to MAC addresses. (Linksys BEFSR41 ver.2.)

Any suggestions?

Last edited by demerson3; 10-19-2005 at 04:41 AM.
 
Old 10-19-2005, 12:43 PM   #8
zymurgist
Member
 
Registered: Jan 2003
Location: Long Island
Distribution: Redhat 8.0
Posts: 109

Rep: Reputation: 15
I'm not familiar with that router, but I guess it doesn't allow MAC/IP mapping. BIND can be configured to allow dynamic updates, but its tricky and requires the DHCP clients and server to behave properly. Since your dependent on DHCP from the router, it may not work correctly. Read the BIND documentation and give it a try!
 
Old 10-20-2005, 01:33 PM   #9
demerson3
Member
 
Registered: Sep 2004
Location: Los Angeles
Distribution: debian stable
Posts: 43

Original Poster
Rep: Reputation: 15
Got the answer!

Barking up a lot of the wrong trees here...

The way to do this is with winbind -- e.g., apt-get install winbind

make sure /etc/nsswitch.conf includes wins resolution:

hosts: files dns wins

I did these two in the reverse order: First I inserted wins into the hosts line of nsswitch.conf, then I installed winbind, and the winbind daemon (winbindd) was automagically started after installation.

Then, it just worked!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Setting Up Server for Home Network geewildman Linux - Newbie 6 11-21-2005 11:17 PM
Home Network Server brainless8888 Linux - Newbie 1 06-11-2004 04:48 PM
home network server help wylie eyed Linux - Networking 1 10-15-2003 10:19 AM
making a webpage server and home network server on the same computer ferretmanus Linux - Networking 1 09-11-2003 11:45 AM
home network server radnix Linux - Networking 5 11-11-2002 09:03 PM


All times are GMT -5. The time now is 05:16 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration