Click to See Complete Forum and Search --> : Two questions, again.


i845_
06-02-2008, 10:47 AM
Hi all.

I've been working with Linux for the past 6 years. However, all this time, I had been using distros that used funky GUIs to shield me from getting my hands dirty with administrative and configuration tasks. So, I've recently moved on to Slackware.

Now, time for the questions:

a. In the earlier distros that I used, something would stay in the background, detect whenever I started up my router, poll it for an IP address, and then assign one to my machine. What is that something? A daemon? (I had thought of implementing the same on my Slackware box using ifplugd (http://0pointer.de/lennart/projects/ifplugd/), but for some weird reason, won't compile correctly on my machine. And I'm yet to find a Slackware package for the same... :confused:)

b. What does one mean by HAL? (a layman's definition...) What does it do? (I tried reading up the Wikipedia entry on it, but I'm afraid I could make neither head nor tail out of it.)

Thank you.

ph34r
06-02-2008, 10:52 AM
1) DHCP client

2) Hardware Abstraction Layer

i845_
06-02-2008, 11:47 AM
I'm aware of DHCP clients. Slackware comes bundled with dhcpcd, BTW.

Sorry, my bad! Let me rephrase the question.

What I want to know is how to make the DHCP client aware as to when my router has been switched on... I mean, on my Slackware machine, even after I switch on the router I need to manually do a

dhcpcd -d -t 10 eth0

as root, in order to get things started.

P.S. I want to solve this on my own... just give me an *algorithm* of sorts as to how I can achieve the above. I shall try and implement it on my own. :)

----------------------------------------

I just read up on dhcpcd. Here's what the manpage has to say on the -t option:

Specifies (in seconds) for how long dhcpcd will try to get an IP address. The default is 60 seconds. dhcpcd will not fork into background until it gets a valid IP address, in which case, dhcpcd will return 0 to the parent process. In case dhcpcd times out before receiving a valid IP address from the DHCP server, dhcpcd will return 1 to the parent process. Setting the timeout to zero disables it: dhcpcd will keep trying forever to get a lease, and if the lease is lost, it will keep trying forever to get another.

Whenever I start Slack with my router switched off, I see this message during bootup:

No carrier detected on eth0. Reducing timeout to 10 seconds.
dhcpcd: MAC address = xx:xx:xx:xx:xx:xx (xx:xx:xx:xx:xx:xx being my MAC address)

Obviously, dhcpcd is being run by an init script here. What about editing the same and forcing dhcpcd to take an argument of -t 0? (I'm a little uneasy with the idea of keeping dhcpcd running all the time, though...)

E1PHOTON
06-02-2008, 11:55 AM
I've always used dhclient. It keeps a persistent list of past/current leases. Maybe it will help you out, too.

happybunny
06-03-2008, 12:08 PM
you can alter /etc/dhcp/dhclient.conf for retry times and attempts...maybe something in there will help

IsaacKuo
06-03-2008, 04:35 PM
The thing in the background was probably network-manager. If you used GNOME, the little taskbar network icon was nm-applet (it shows if a network is connected, and will try to connect if it can).

i845_
06-07-2008, 01:54 PM
The thing in the background was probably network-manager.

Coolness...!

I'm on XFCE, so I think I'll have to go with wicd.

Thanks for the help.

JohnT
06-08-2008, 03:53 PM
Welcome to Slackware!!!

Satanic Atheist
06-17-2008, 04:45 AM
Try "man dhclient" or "man pump" to get an IP address from a DHCP server.

James

i845_
06-18-2008, 02:48 PM
Try "man dhclient" or "man pump" to get an IP address from a DHCP server.

a. Like I mentioned in a previous post, Slackware comes bundled with dhcpcd. The DHCP clients you mention, dhclient and pump, usually come bundled with Ubuntu and Fedora respectively. As such, "man dhclient" or "man pump" won't work out of the box on Slackware.

b. True, I could install one of these and be done with it, but I usually prefer using what comes bundled with the system. Only in extreme cases do I go for alternatives.

c. Technically, "man dhclient" or "man pump" shall only open manpages for the respective clients, and not get my machine an IP address.

d. As IsaacKuo has rightly pointed out, what I'm looking for is a network manager application. wicd more than fits the bill.

i845_

Satanic Atheist
06-19-2008, 03:22 AM
Originally posted by i845_:
P.S. I want to solve this on my own... just give me an *algorithm* of sorts as to how I can achieve the above. I shall try and implement it on my own.
That's the reason I pointed you at the man pages and not just the command itself.

Anyway, if the network manager application works for you, then job done!

James

i845_
06-20-2008, 01:39 PM
That's the reason I pointed you at the man pages and not just the command itself.

Sorry, my bad... :o:o:o :D:D:D.

Thanks anyways.

i845_

Satanic Atheist
06-20-2008, 05:57 PM
Your welcome.

James