Dynamic IP with Slackware

I recently got a DSL line but do not have a static IP and I use my Linux box to route internet traffix for my house...

With my Dial-up connection it worked great but now I don't know what IP to assign the NIC that is connected to the DSL modem because I don't have a static IP

I am using slackware...

All I have is netconfig

Who is Participating?
j2Connect With a Mentor Commented:
slackware doesnt have linuxconf.

what you need to do is obtain a dhcp client. I recomend dhcpxd ( http://apps.freshmeat.net/download/926030341/ )

Download, untar, install. Then you will have to edit /etc/rc.d/rc.inet1

find a line similar to

/sbin/ifconfig eth0 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}

comment it out, and replace it with

/sbin/dhcpxd -w -c -n eth0

(this is so your system will grab a lease when rebooting)

then execute

rm /etc/dhcpxd/out ; touch /etc/dhcpxd/out

(else it will log to a tty and not a file)

then either reboot, or a more clean way is to exectute

/sbin/dhcpxd -w -c -n eth0

to bring the interface up.

unfortunately slackware isnt (by default) flexible enough to rehup all daemons if your IP changes while it is running. But i've never actually seen an ISP that changes an IP "on the fly".
If you don't have a static IP, then the DSL line expects to use DHCP to set up the system. Have you tried enabling DHCP on your ethernet interface?
eric007Author Commented:
Thats what I am wondering how to do in slackware...

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

I think you should have linuxconf and it would be the easiest way. The network settings are under "Networking>Client tasks>Basic host information>Adapter 1". Mark the adapter as "Enabled", select "Dhcp" and select "eth0" for the "Net device". "Accept" the settings and "Act/Changes".The next reboot should try to do a DHCP assignment.
eric007Author Commented:
that would probabally work, but i am given redhat 6.1 a try now but if it doesn't work out i will go back to slackware and do what u said..

Thanx for the help..

RH ships with pump which is a piece of sh*t. dhcpx is much more useful in RH aswell, but yo uneed to modify other files.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.