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 am trying to set up NFS on my home net work, 1 desktop 1 laptop both running RH9. My router is using DHCS. Both machines are now named localhost. I want to change names using hostname and /etc/hosts. What IP addresses should I use in /etc/hosts since the addresses change. There is also a windows machine getting an address from the router. Samba is running OK there.
Pick anything of the form 192.168.1.xxx, where xxx is a number between 1 and 255 that isn't already in use. Your router is probably 192.168.1.1, and it probably starts allocating dynamic IPs at 192.168.1.100 and counts up (you can probably check this in its settings page).
Thanks, that helps. Can I assume that any IP address within my router's range is OK? Or should I pick numbers which are unlikely to be assigned? ie my DHCP server is using
192.168.0.100 thru 192.168.0.199. Typically it assigns starting at the lowest number in the range and continues sequentially. Do I pick high numbers, or is it OK to use a number that is assigned to another host?
I would suggest using static IP addresses. Just because your router handles DHCP doesn't mean that you have to use it. The /etc/hosts are by design a static solution.
Your problem would be solved right away.
If you would like to still use DHCP then you would have to set up DDNS (Dynamic DNS) along side your DHCP server. That might not work with a home router.
The solution above might work, but it may stop work anytime.
Yes, that sounds like the simplest solution. I was so locked in to solving a problem that I couldn't see that I could just side step the whole issue. Sort of like the adage, "can't see the forest for the trees". Thanks for the insight.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.