How Do I Switch From Static IP To DHCP
Running Slackware (10.1 if that makes much diff). I've always had a static IP for my Slack boxes but I need to switch them to use DHCP. What do I have to do to switch from static IP to DHCP (and back)?
I have a feeling I have to start in /etc/rc.d but not quite sure. I also think I cought something that dhcpcd is my friend here, but haven't been formally introduced. :scratch:
Much thanks in advance...
You're right in that the solution lies in /etc/rc.d :) However, you don't have to fiddle around with dhcpcd directly. dhcpcd will be called from /etc/rc.d/rc.inet1, which is configured in /etc/rc.d/rc.inet1.conf.
You can configure your IP address settings directly in etc/rc.d/rc.inet1.conf. If you do this, you have to change the appropriate instance of USE_DHCP[n]="" to USE_DHCP[n]="yes", where n is the number corresponding to the NIC which connects to the DHCP server. Meaning, if the output of ifconfig says something like
However, I must say that I find it easier to use the command netconfig, which lets you set your IP address(es) up really easily. I'm sure you remember this from when you installed Slack.
Welcome to LQ!
You could edit /etc/rc.d/rc.inet1.conf by hand. Or you could issue "netconfig" as root.
The Revised Slackware Book Project is a good reference. In it the netconfig program is
mentioned, but it's still suggested that we review the configuration ourselves and learn
how this works. I think it's easy, and nice to understand what's happening behind that
Much thanks for all the info guys. I'll definatly pass it on. :)
Chinaman: You're right, the book is quite good. Reading it fervently. :study:
|All times are GMT -5. The time now is 02:25 PM.|