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 have a handheld device (Nokia 800) running Linux. I am usually in DHCP environments. However I wonder if I would configure the network per environments without having to modify the back end. Since I just want to static ip on my home network I guess I can assign something like 192.168.2.82 given that I will never accumulate to have a 81 machines requesting ip from the router DHCP.
So my question is how to assign 192.168.2.82 just on my home network without having to change the Router DHCP and still be able to have a dynamic ip on the rest of the networks?
Any ideas....
BTW this is something that already works since for XYZ reason my router assign 192.168.2.2 to my handheld regardless if my laptops connects first or latter. I just wonder if I actually did this odd configuration without even realizing.
well a dhcp router would have a range of addresses, e.g 192.168.2.10 to 192.168.2.100, if you are outside of those ranges, you can always use whatever ip address you want. most routers allow for specific exclusions too, but that's down to the router you have.
Thanks but I guess you missed my question. Yes a DHCP router works usually like that. However I want to discover how can I am wonder what makes my device get the same IP regardless of the order of the connection.
I just thought about it and I think the answer is the following:
The router has a 4 port wired... so my guess is that the router allocates the first 4 ports to 192.168.x.[1,2,3,4] and that makes the ip be the same regardless if one devices ask for the IP before the other.
However if this is true, is odd that the wifi is on 192.168.2.2 (since it doesnt require a cable port).
well that's just how DHCP works. the server holds a lease for a given MAC address and should that client connect again then the router recognizes it and uses that same detail. additionally, many dhcp clients record what IP they had last and expressly request that IP from the network.
well that's just how DHCP works. the server holds a lease for a given MAC address and should that client connect again then the router recognizes it and uses that same detail. additionally, many dhcp clients record what IP they had last and expressly request that IP from the network.
Ok interesting, how reliable is that? Can i add that IP to my /etc/hosts file so I can map the handheld and laptop?
I know a DNS server or a static ip might be a more stable solution but for just a network of 4 computers.
well there's no guarentee at any stage, it's purely what is usually done... if there's no contention for ip addresses it would often never change, but it's open to many subtle changes in each implementation
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.