Static IP for a wireless box - Keeps changing back to another IP
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Static IP for a wireless box - Keeps changing back to another IP
Desire a static IP on a wireless Centos6 box. I set it up as such, and it sticks for a while, then I get up in the morning and it has reverted back to another IP. How can I prevent it from changing? Thanks
Thanks beachboy2, but as shown in my original post, I've already done so. Note that my /etc/sysconfig/network-scripts/ifcfg-wlan0 additionally includes the following:
I think the issue might have nothing to do with the centos machine, but I think I forgot to setup my router with an IP range where it will accept self assigned IPs, and centos is forgoing its static ip to use a dhcp ip.. Strange though how centos will ignore its own static ip config to adapt to the routers assignment.
@Beachboy2, No worries, and thanks! One of the comments reminded me about dhcp reservations. Now, 192.168.1.10 sticks! Funny though, my router shows it having two IPs now where one is 192.168.1.140. Guess that is what I get for using static ips on wireless devices!
-----
1. NM must control the IP to peg it in one static IP value, to avoid the manager behaving like an idiot on-call it follows whatever the dhcp entices it to accept.
2. Control the IPs from the dhcp side (usually the router) login to it and bind
HWADDR=b8:76:3f:69:31:95 to IP # 192.168.1.xxx (whatever you like.)
Refresh the network script (restart)
Refresh the dhcp as well.
Hope that helps. Good luck.
m.m.
Last edited by malekmustaq; 08-01-2017 at 08:54 AM.
@rtmistler, Understood. And while I fully agree LQ Rules are appropriate and I would never wish to promote any of the negative qualities which they are meant to prevent, I must say the use of the word does have reference.
@rtmistler, Understood. And while I fully agree LQ Rules are appropriate and I would never wish to promote any of the negative qualities which they are meant to prevent, I must say the use of the word does have reference.
You are quite correct, apologies.
malekmustag:
Please find more appropriate means to describe software behavior.
As you can see, another member possibly felt that this comment was personally directed versus meant to describe software.
As you can see, another member possibly felt that this comment was personally directed versus meant to describe software.
Yes Mod. My sincere apology.
I really had that same problem once and I yelled at my NM (Network Manager) for behaving that way, it follows whatever wherever the dhcp took it. After a sober moment I realized it was my mistake for letting her be.
Again, NotionCommotion my post was about the "NM" network manager. There is no way a good english user shall mistake the subject and predicate.
Did it help? Please post freely again. Everyone here is eager to help.
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364
Rep:
I second the recommendation to use DHCP reservations for assigning specific IP addresses. It centralizes management, making it a lot simpler to make changes.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.