Unable to switch from DHCP to Static IP with Slackware 10.1
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
SDN 101: An Introduction to Software Defined Networking
Discover the advantages of SDN.
SDN has quickly become one of the hottest trends in IT. But not all SDN solutions offer real software-defined functionality. As more enterprises consider SDN, they want to know, “What is SDN? And what are the real benefits?” If you're ready to explore the advantages of SDN, and want to know how it should be implemented within your enterprise, start by reading our introductory white paper.
Click Here to receive this Complete Guide absolutely free.
After rebooting the machine, I can not connect to the Internet anymore. When checking the file /etc/resolv.conf I found nothing in there except a word "search", all the DNS address I'd entered have disappeared.
Could it be the reason of the failure of connection ?
How could I prevent resolv.conf from being modified after a reboot (by dhcpcd ?) ?
Has any Slackware'user made a successful switch from DHCP to Static IP and how to do ?
(I have the same Static IP configuration for Windows dually installed with Slackware and can connect nomally to the Internet)
Every "Broadband Router" I ever owned could do "Address Reservation", or whatever the mfr. called the feature. Some still can. I guess it has been so long since I bought one, I didn't notice that some don't.
Why the sudden need/urge to move from DHCP to static IP?
And, BTW, which DLink router?
I suspect besides /etc/resolv.conf you also have /etc/resolv.conf.sv which means a dhcpd server is still updating this file ( man dhcpd.conf ).
Also suspect you a still running dhcpd or hcpd on the box you are trying to convert to static ip.
1. chmod -x /etc/rc.d/rc.dhcpd ; do the same for hcpd ; ie stop running the client and/or server
2. put your resolv entries in the global section of /etc/dhcpd.conf such that the resolv.conf file stays the same after it is swapped out.
I have the same impression that DHCP still is running and and overwriting the resolv.conf. file. As I desabled DHCP check in /etc/rc.d/rc.inet1.conf, the script that check nameservers find nothing. As a result, the resolv.conf is resfreshed with blank as nameservers.
I'll try your suggestion tonight when back home and give you feedback.
I've tried all this but it didn't work until I commented out the line USE_DHCP="" in /etc/rc.d/rc.inet1.conf that actually preserved my /etc/resolved.conf. But the Internet connection still failed. (When I switched back to DHCP by Netconfig, the connection worked well).
By curiosity, I completely reinstalled Slacware and set Static IP during the installation to see what'll happen. Then the connection worked well with Static ID. Checking out all three files inet1.conf, resolv.conf and hosts I found they have the same settings as when I manually modified them before the re-installation. That means besides those three files, there's something else that affects the Internet connection.