Click to See Complete Forum and Search --> : Configuring network in Slack


WCFJ
01-25-2001, 11:26 AM
Simple question. How do I set a static IP address in Slack 7.0 to DHCP and back?

------------------
Unfortunately nobody can be told what the Matrix is. You have to see it for yourself...

Harvey
01-25-2001, 11:36 AM
I believe it's the netconfig command.

but maybe I'm thinking way too simply here http://www.linuxnewbie.org/ubb/smile.gif

------------------
Help me I'm Harvey!

WCFJ
01-25-2001, 11:37 AM
Yup. See, easy. Thanks

ph34r
01-25-2001, 11:42 AM
Yah, you can setup once with netconfig for static, then copy /etc/rc.d/rc.inet1 to something else (rc.inet1.static) and then do it again for dhcp and copy that one to rc.inet1.dhcp - then just link or copy the appropriate one to rc.inet1 and then run it as root.

skweegie
01-25-2001, 11:51 AM
if you didn't want to hassle with the netconfig script (ie, hostname defining, supterprobing, etc.), another quick way is to edit /etc/rc.d/rc.inet1 file itself.

1) drop to single user (Important)!

:# telinit 1

2) edit the /etc/rc.d/rc.inet1

:# vi /etc/rc.d/rc.inet1

side: vi is at default symlinked to elvis so there is one more thing craig should like about slack http://www.linuxnewbie.org/ubb/smile.gif

at the top of that file, edit to appropraite settings. (if static you have to define IPADDY to GATEWAY and set DHCP to "no". if DHCP, no editing needed EXCEPT to define DHCP to "yes":

IPADDR=""
NETMASK=""
NETWORK=""
BROADCAST=""
GATEWAY=""
DHCP=""

3) go back to multiuser and enjoy!

:# telinit 3

NOTE: even though it sounds like alot of steps, you can do the above in about a minute or so. you could prolly beat anyone using the netconfig script with the above steps. (unless you don't know what you're doing and then you should use netconfig)...

cheers

------------------
my lame slackpage (http://www.skweegie.f2s.com)

[This message has been edited by skweegie (edited 25 January 2001).]

skweegie
01-25-2001, 11:53 AM
Originally posted by ph34r:
Yah, you can setup once with netconfig for static, then copy /etc/rc.d/rc.inet1 to something else (rc.inet1.static) and then do it again for dhcp and copy that one to rc.inet1.dhcp - then just link or copy the appropriate one to rc.inet1 and then run it as root.

coolz phear, that is also a great way to accomplish the task!