DHCP in Debian

Why doesn’t my DHCP client work in Debian?
I’ve got my ADSL connection working alright in Windows, but of course I want to get it to work with Debian also (dual boot on the same machine).
In Windows I’ve checked the “Obtain IP address automatically” checkbox, and it all works fine. My modem / router hands out the IP address 192.168.1.3. Great! But when I boot Debian, I get no response from the DHCP server whatsoever.


I’ve installed the dhcp3-client and dhcp3-common packages (yes, I’ve also tried pump), but when I run dhclient3 eth0, all I get is something like

DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3

repeated a couple of times and finally:

No DHCPOFFERS received.
No working leases in persistent database – sleeping.

When I manually assign an IP address and add my modem as the default gateway, it all works, but I simply cannot get DHCP to work.

Does anybody have a solution?

BTW, I do have

auto eth0
iface eth0 inet dhcp

in my /etc/network/interfaces.

Tags: , ,

Tuesday, March 9th, 2004 Computing

7 Comments to DHCP in Debian

  1. It’s not an answer to your question, but have you tried if DHCP works under other mini distributions, e.g. Knoppix or Movix?

  2. Ari on March 9th, 2004
  3. It’s not an answer to your question, but have you tried if DHCP works under other mini distributions, e.g. Knoppix or Movix?

    If it does, maybe you could get an idea from the modules / config files they use and see if Debian has similar things.

    (personally I know *nothing* about configuring DHCP under Linux; it works instantly under SuSE, Knoppix, and Mandrake)

  4. Ari on March 9th, 2004
  5. I also use Debian, and on my system it works perfectly. (please e-mail me for questions)
    I installed the dhcp3* packages and set some kernel options (run dhclient to see which options you need)
    I hope this helps.

  6. Frank Mulder on June 4th, 2004
  7. Try power off the cable modem, worked for me:
    > I haven’t seen the whole thread on this, so you may have already done
    > this. Turn off the computer and unplug the power for the cable modem
    > for at least three minutes. Repower the cable modem and then power up
    > the system.
    >
    > Normally, the cable modems remember the last device they talked to and
    > don’t want to work with new devices unless they’re powered off and
    > back on again. Shutting down may also force the cable modem to seek a
    > new lease or something.
    >

  8. Zhenlei Cai on June 4th, 2004
  9. I am a Debian newbie.

    I found that in Debian “sarge” (testing) dhcp does not start automatically as it did with “woody” (stable but old). But after installing pump by # apt-get install pump, you can dhcp by # pump as root user.

    Also Google debian dhcp pump
    See also http://www.risc.uni-linz.ac.at/systems/riscguide/laptop-netconfig/index_3.html

  10. Bob Chin on June 10th, 2004
  11. I got pump working on bootstrap this morning.
    The reason that Debian “Sarge” does not bring it up automatically is because PC will hang if eth0′s cable is not connected to the network (LAN). I read this on another web site. So some people prefer to bring it up by manually executing pump from the command line as root user.

    Well this worked for me. To get pump to automatically work, make sure that in file interfaces, has line “auto eth0″ to bring network card up on boot.

    Also /etc/resolv.conf should have dns nameserver ip address entries.

    # cat /etc/network/interfaces
    ### etherconf DEBCONF AREA. DO NOT EDIT THIS AREA OR INSERT TEXT BEFORE IT.

    auto lo

    iface lo inet loopback

    auto eth0

    iface eth0 inet dhcp
    hostname Spock-UX

    #iface eth1 inet static
    # address 192.168.1.30
    # netmask 255.255.255.0
    # broadcast 192.168.1.255
    # gateway 192.168.1.1
    # dns-nameservers 192.168.1.97 151.203.0.84

    ### END OF DEBCONF AREA. PLACE YOUR EDITS BELOW; THEY WILL BE PRESERVED.

  12. bob chin on June 10th, 2004
  13. I am trying to get the bloody DHCP thing working on debian 31r3 right now. No love. I have tried pump and dhcp-client. I know it works fine cuz I’m typing this to you from my windows PC.

    /etc/network/interfaces:

    auto eth0
    iface eth0 inet dhcp

    I also have eth1 config’ed on the private side and it works fine w/ a static ip (i.e., when i move my winblows pc to the private network, i can talk to the debian machine).

    I have tried:
    - dumping dhcp-client and using pump
    NO LUCK
    - power cycling everything, then return the cable modem (surfboard 4100) back on first, wait until all 4 lights go green, then power on the debian machine.
    NO LUCK
    - Making sure iptables isn’t blocking me – i opened ports 67,68 for udp on eth0, which is set for dhcp
    NO LUCK

    The odd thing is – this was all working under WOODY about 2 hours ago. I wiped the system, downloaded the ISO for the sarge netinst, and it hasn’t worked since.

    Any ideas? WIcked frustrating as DHCP seems to be the most basic of protocols and it simply doesn’t work…

    thanks.

  14. jc on October 9th, 2006

Leave a comment

Search

 

Categories

Archives

Creative Commons License
This work is licensed under a
Creative Commons License.