Linux - Networking This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
10-18-2005, 11:58 AM
|
#1
|
Member
Registered: Sep 2004
Location: Seattle area
Distribution: debian stable
Posts: 51
Rep:
|
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
|
|
|
10-18-2005, 12:04 PM
|
#2
|
Member
Registered: Jan 2003
Location: Long Island
Distribution: Redhat 8.0
Posts: 109
Rep:
|
Just put your IPs in the /etc/hosts file(s) and you won't have any problems.
|
|
|
10-18-2005, 01:09 PM
|
#3
|
Member
Registered: Sep 2004
Location: Seattle area
Distribution: debian stable
Posts: 51
Original Poster
Rep:
|
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.
|
|
|
10-18-2005, 01:13 PM
|
#4
|
Member
Registered: Jan 2003
Location: Long Island
Distribution: Redhat 8.0
Posts: 109
Rep:
|
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.
|
|
|
10-18-2005, 01:35 PM
|
#5
|
Member
Registered: Sep 2004
Location: Seattle area
Distribution: debian stable
Posts: 51
Original Poster
Rep:
|
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!
|
|
|
10-18-2005, 01:43 PM
|
#6
|
Member
Registered: Jan 2003
Location: Long Island
Distribution: Redhat 8.0
Posts: 109
Rep:
|
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.
|
|
|
10-19-2005, 12:21 AM
|
#7
|
Member
Registered: Sep 2004
Location: Seattle area
Distribution: debian stable
Posts: 51
Original Poster
Rep:
|
/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.
|
|
|
10-19-2005, 12:43 PM
|
#8
|
Member
Registered: Jan 2003
Location: Long Island
Distribution: Redhat 8.0
Posts: 109
Rep:
|
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!
|
|
|
10-20-2005, 01:33 PM
|
#9
|
Member
Registered: Sep 2004
Location: Seattle area
Distribution: debian stable
Posts: 51
Original Poster
Rep:
|
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!
|
|
|
All times are GMT -5. The time now is 11:02 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|