Find the answer to your Linux question:
Results 1 to 9 of 9
I used a Stage 3 install of Gentoo; been having issues with dhcp over a period of 3 re-installs. DHCP worked fine on my first install on the base Gentoo ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2005
    Posts
    4

    DHCP errors


    I used a Stage 3 install of Gentoo; been having issues with dhcp over a period of 3 re-installs.

    DHCP worked fine on my first install on the base Gentoo system, but somehow it stopped working and I re-installed in an attempt to correct it. I have read over the manual several times just to make sure that I wasn't leaving anything out.

    I emerged dhcpcd, and I have /etc/conf.d/net set to config_eth0=("dhcp"). I have checked to make sure that this is the correct NIC using "lspci -v" (I have two) and it is. This is not a wireless connection. I am sure that my network is configured correctly; there have been no network changes since the original working install of Gentoo.

    Upon boot, Gentoo runs net.eth0 and dhcpcd, but fails to receive an IP address. I also get the error that "netmount" has failed to start.

    Everything else is working correctly except my dhcp; it's driving me crazy especially since it has worked before, but refuses to now. This leads me to believe that it is a network problem, but there have been no changes to the network.

    The network is MAC restricted, but my MAC address is ok because I can boot to Windows and connect.


    I really need some help.


    EDIT: I forgot to mention the kernel. I used genkernel as well as coldplug, and coldplug has been added to the boot runlevel. My NIC is a standard Broadcom NIC that has worked with other linux distros in the past.

  2. #2
    Linux Guru sdousley's Avatar
    Join Date
    Feb 2004
    Posts
    1,790

    Re: DHCP errors

    Quote Originally Posted by phrack
    I emerged dhcpcd, and I have /etc/conf.d/net set to config_eth0=("dhcp").
    Do you have the () in there aswell?

    The one copy of /etc/conf.d/net that i have that works is:

    Code:
    iface_eth0="dhcp"
    dhcpcd_eth0="-HD"
    "I am not an alcoholic, alcoholics go to meetings"
    Registered Linux user = #372327

  3. #3
    Just Joined!
    Join Date
    Sep 2005
    Posts
    4
    I tried your version of /etc/conf.d/net and it still did not work.

    I have, however, found out a situation in which the dhcp DOES work, but it is very strange.

    If I put the LiveCD back in, and remount all the partitions and chroot into the environment, using these commands, I will get dhcp working on the immediate reboot following the chroot, but only once. If I reboot again, I can't get dhcp to work.

    (hda1 is Windows)

    Code:
    mount /dev/hda4 /mnt/gentoo
    mount /dev/hda2 /mnt/gentoo/boot
    cd /mnt/gentoo
    mount -t proc none /mnt/gentoo/proc
    chroot /mnt/gentoo /bin/bash
    env-update
    source /etc/profile
    This is very strange to me, but perhaps this sheds some light on my problem for you more advanced linux users.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru sdousley's Avatar
    Join Date
    Feb 2004
    Posts
    1,790
    ok, next time u boot and it dont work, try:

    Code:
    env-update 
    source /etc/profile
    dhcpcd eth0
    See if that works
    "I am not an alcoholic, alcoholics go to meetings"
    Registered Linux user = #372327

  6. #5
    Just Joined!
    Join Date
    Sep 2005
    Posts
    4
    I tried it, it does not work.

  7. #6
    Linux Engineer spencerf's Avatar
    Join Date
    Jan 2005
    Location
    Syracuse, NY
    Posts
    1,144
    Do you have your NIC selected in the kernel? You said you used genkernel and that can be kinda buggy sometimes imho. Just do this and check.

    cd /usr/src/linux
    su
    make menuconfig

    look under: device drivers: networking support: Ethernet 10-100: then your card.

    Then you have mount boot if you don't have it booted.
    mount /boot
    cp arch/i386/boot/bzimage /boot/kernel(whatever your kernel is saved as)
    cp System.map /boot/System.map (or whatever it is named)

    oh yeah then reboot.
    hope this helps.
    All right, brain. You don't like me and I don't like you, but let's just do this and I can get back to killing you with beer. All New Users Read This!!! If you have a grub problem please look at GRUB MANUAL

  8. #7
    Just Joined!
    Join Date
    Jun 2005
    Location
    Blackburn, North West England (UK)
    Posts
    50
    Hi.
    Just a thought did you do:
    Code:
    rc-update add dhcpcd default
    (or whatever client your using)

    after you emerged it?

  9. #8
    Linux Engineer
    Join Date
    Mar 2005
    Posts
    1,431
    Quote Originally Posted by skrye
    Hi.
    Just a thought did you do:
    Code:
    rc-update add dhcpcd default
    (or whatever client your using)

    after you emerged it?
    In addition to this, I beleve the new syntax was with spaces between the parantheses and the '"', like this example:

    iface_eth0=( "dhcp" )
    dhcpcd_eth0="-HDN"

  10. #9
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    Location
    /dev/urandom
    Posts
    3,682
    Quote Originally Posted by skrye
    Hi.
    Just a thought did you do:
    Code:
    rc-update add dhcpcd default
    (or whatever client your using)

    after you emerged it?
    No. You rc-update add net.ethX default, where X is the ethernet interface. Then you have to configure your /etc/conf.d/net correctly. Make sure to add the modules=( "dhcpcd" ) to the top. Then what jaboua has is correct for the rest of the config.
    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

Posting Permissions

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