Two questions, again.


Results 1 to 13 of 13

Thread: Two questions, again.

  1. #1
    Join Date
    Jan 2007
    Posts
    280

    Two questions, again.

    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, but for some weird reason, won't compile correctly on my machine. And I'm yet to find a Slackware package for the same... )

    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.
    Last edited by i845_; 06-02-2008 at 10:52 AM.

  2. #2
    Join Date
    Sep 1999
    Posts
    3,202
    1) DHCP client

    2) Hardware Abstraction Layer

  3. #3
    Join Date
    Jan 2007
    Posts
    280
    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

    Code:
    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:

    Code:
    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...)

  4. #4
    Join Date
    Jan 2001
    Location
    Miami, Fl
    Posts
    134
    I've always used dhclient. It keeps a persistent list of past/current leases. Maybe it will help you out, too.

  5. #5
    Join Date
    Jan 2004
    Location
    boston, mass USA
    Posts
    1,878
    you can alter /etc/dhcp/dhclient.conf for retry times and attempts...maybe something in there will help

  6. #6
    Join Date
    Oct 2002
    Location
    Baton Rouge, Louisiana, USA
    Posts
    799
    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).
    Isaac Kuo, ICQ 29055726 or Yahoo mechdan

  7. #7
    Join Date
    Jan 2007
    Posts
    280
    Quote Originally Posted by IsaacKuo
    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.

  8. #8
    Join Date
    Jul 2002
    Location
    Vladivostok, Russia
    Posts
    9,053
    Welcome to Slackware!!!
    "I was pulled over for speeding today. The officer said, "Don't you know
    the speed limit is 55 miles an hour?" And I said, "Yes, but I wasn't going
    to be out that long."

    How To Ask Questions The Smart Way
    COME VISIT ME IN RUSSIA NOW!!

  9. #9
    Join Date
    Jul 2001
    Location
    Fife, Scotland
    Posts
    1,794
    Try "man dhclient" or "man pump" to get an IP address from a DHCP server.

    James
    -----------------------------
    UseLinux.net
    -----------------------------

    perl -e 'use Math::Complex;$|=1;for$r(0..24){for$c (0..79){$C=cplx(($c/20.0)-3.0,-($r/12.0)+1.0);$Z= cplx(0,0);for($i=0;($i<80)&&(abs($Z)<2.0);$i++){$Z =$Z*$Z+$C;}print$i>=80?"*":" ";}print"\n";}'

  10. #10
    Join Date
    Jan 2007
    Posts
    280
    Quote Originally Posted by Satanic Atheist
    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_

  11. #11
    Join Date
    Jul 2001
    Location
    Fife, Scotland
    Posts
    1,794
    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
    -----------------------------
    UseLinux.net
    -----------------------------

    perl -e 'use Math::Complex;$|=1;for$r(0..24){for$c (0..79){$C=cplx(($c/20.0)-3.0,-($r/12.0)+1.0);$Z= cplx(0,0);for($i=0;($i<80)&&(abs($Z)<2.0);$i++){$Z =$Z*$Z+$C;}print$i>=80?"*":" ";}print"\n";}'

  12. #12
    Join Date
    Jan 2007
    Posts
    280
    Quote Originally Posted by Satanic Atheist
    That's the reason I pointed you at the man pages and not just the command itself.
    Sorry, my bad... .

    Thanks anyways.

    i845_

  13. #13
    Join Date
    Jul 2001
    Location
    Fife, Scotland
    Posts
    1,794
    Your welcome.

    James
    -----------------------------
    UseLinux.net
    -----------------------------

    perl -e 'use Math::Complex;$|=1;for$r(0..24){for$c (0..79){$C=cplx(($c/20.0)-3.0,-($r/12.0)+1.0);$Z= cplx(0,0);for($i=0;($i<80)&&(abs($Z)<2.0);$i++){$Z =$Z*$Z+$C;}print$i>=80?"*":" ";}print"\n";}'

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •