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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
06-15-2004, 07:57 PM
|
#1
|
|
LQ Newbie
Registered: Jun 2004
Posts: 6
Rep:
|
dhcp and multiple machines
I have just moved to Linux and have set up a small home network of 5 machines. All machines receive IP addresses from a (non-linux) DHCP server. This works fine as far as it goes.
However, if the power fails or machines reboot, they all come back up with different IP addresses, and this begins my infuriating time. It seems that the IP addresses of the other machines on the local network are stored in various places in the filesystems - not only /etc/hosts, but other places such as ssh configuration files and so forth. This all breaks when the machines reboot! I end up spending an hour hunting down all the places I have to update the new set of IP addreses.
Is there some way I can configure my machines so that when they come back up with different IPs, they keep working fine (as they used to do under 'doze)?
It's fine to point me at a FAQ - although so far all the googling I've done has only pointed me to info on either (1) setting up a Linux DHCP server, or (2) configuring a single machine to get its IP from DHCP, neither of which is my problem.
Thanks,
xthel
|
|
|
|
06-15-2004, 08:02 PM
|
#2
|
|
LQ Newbie
Registered: Jun 2004
Posts: 6
Original Poster
Rep:
|
I should also mention: this is mandrake 9.2, boxed set with latest patches.
|
|
|
|
06-15-2004, 08:16 PM
|
#3
|
|
Member
Registered: Sep 2002
Location: .at
Distribution: SuSE, Knoppix
Posts: 532
Rep:
|
To solver your problem you might want to
a) instruct your dhcp server to give out static ip addresses based on NIC hardware address (simple)
b) set up your a private dns server with dynamic updates allowed (more comlicated)
windows does not need this because it tries to resolve local ip addresses by "asking" for the hostname/ip info on the LAN (google for "broadcast name resolution")
|
|
|
|
06-15-2004, 08:44 PM
|
#4
|
|
LQ Newbie
Registered: Jun 2004
Posts: 6
Original Poster
Rep:
|
Quote:
Originally posted by AltF4
a) instruct your dhcp server to give out static ip addresses based on NIC hardware address (simple)
b) set up your a private dns server with dynamic updates allowed (more comlicated)
|
Thanks for the reply. Alas, my DHCP server is a dumb linksys consumer hardware thing, and I'm not sure it supports static IP address assignment based on MAC addrss. At least, I haven't found a way to do it. I can see the mapping table of MACs to IPs, but that's it.
I'd rather not go through the bother of running a local DNS either. Am I then out of luck?
xthel
Last edited by xthel; 06-15-2004 at 08:45 PM.
|
|
|
|
06-15-2004, 09:32 PM
|
#5
|
|
LQ Newbie
Registered: Jun 2004
Posts: 6
Original Poster
Rep:
|
Hmm, I have just discovered that nmblookup works fine to come up with the IP addresses. If only I had a way to make that happen by default when gethostbyname() is called! Would solve my problem handily, I think.
|
|
|
|
06-15-2004, 10:00 PM
|
#6
|
|
LQ Newbie
Registered: Jun 2004
Posts: 6
Original Poster
Rep:
|
nsswitch.conf
Ok, I hate to follow up to my own post too many times in a row, but I have found /etc/nsswitch.conf, which appears to let me specify wins for name resolution. It seems to pretty much do what I want.
My only concerns now are:
(1) It takes a lot of extra time to open windows in X, presumably due to an initial gethostbyname call having to go out to the network. I can fix this by adding each hostname to /etc/hosts pointing to 127.0.0.1, but then I can't sync my /etc/hosts files between all my machines (since they'd all be different).
(2) I'm still worried that ssh will misbehave, since it seems to stick hostnames in its config files by itself. They'll become wrong after the next reboot, and this seems to cause complaints about "man in the middle" attacks from ssh.
Sorry for my newbiness!
|
|
|
|
06-16-2004, 07:07 AM
|
#7
|
|
Moderator
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
Do you have a BEFSR41 or similar linksys router/switch? If so, you can set the starting IP address. The default is 192.168.1.100, so you don't even need to change it. Just give your computers IP address below this one with static configurations.
|
|
|
|
06-16-2004, 08:32 PM
|
#8
|
|
LQ Newbie
Registered: Jun 2004
Posts: 6
Original Poster
Rep:
|
Quote:
Originally posted by jschiwal
Do you have a BEFSR41 or similar linksys router/switch? If so, you can set the starting IP address.
|
Yeah. I know I can use static IPs - was just hoping not to.
I have successfully got most things working with WINS. However, alas, emacs seems to segfault when I start it that way. Most other things are OK (gnome, at least). Ssh still embeds fixed IPs, which I wish I could make it stop doing.
IMHO, this is an area that could stand a bit of improvement.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 08:46 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
|
|