# DHCP addresses slowly obtained.

## DrekAlots

I have my desktop setup and using dhcpcd. My router is a Cisco 871w and I'm connecting via Cat5. When the system turn on it takes about 5 minutes to obtain an IP. Any other system connected via Cat5 obtains an IP in seconds. I haven't been able to figure this out. Any ideas?

----------

## mamac

Hi,

Do you mean other clients with the same dhcp server are faster to get an ip?

----------

## DrekAlots

Yes. Any other host connected to my Cisco 871w obtains an IP address significantly faster than the Gentoo box. This also includes Wireless clients.

----------

## mamac

Would you post output of emerge --info, lspci, ifconfig and lsmod please?

----------

## DrekAlots

 *mamac wrote:*   

> Would you post output of emerge --info, lspci, ifconfig and lsmod please?

 

emerge --info

```
drek@NeoTux ~ $ sudo emerge --info

Portage 2.1.6.7 (default/linux/amd64/2008.0/desktop, gcc-4.3.2, glibc-2.8_p20080602-r1, 2.6.27-gentoo-r8 x86_64)

=================================================================

System uname: Linux-2.6.27-gentoo-r8-x86_64-Intel-R-_Core-TM-2_CPU_6600_@_2.40GHz-with-glibc2.2.5

Timestamp of tree: Sun, 29 Mar 2009 02:30:01 +0000

app-shells/bash:     3.2_p39

dev-java/java-config: 2.1.7

dev-lang/python:     2.4.4-r13, 2.5.2-r7

dev-python/pycrypto: 2.0.1-r8

dev-util/cmake:      2.6.2-r1

sys-apps/baselayout: 1.12.11.1

sys-apps/sandbox:    1.2.18.1-r2

sys-devel/autoconf:  2.13, 2.63

sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2

sys-devel/binutils:  2.18-r3

sys-devel/gcc-config: 1.4.0-r4

sys-devel/libtool:   1.5.26

virtual/os-headers:  2.6.27-r2

ACCEPT_KEYWORDS="amd64"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-march=nocona -O2 -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/terminfo /etc/udev/rules.d"

CXXFLAGS="-march=nocona -O2 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"

GENTOO_MIRRORS="http://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ "

LANG="C"

LDFLAGS="-Wl,-O1"

LINGUAS="en"

MAKEOPTS="-j3"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="X acl acpi alsa amd64 avahi berkdb bluetooth branding bzip2 cairo cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread eds emboss encode esd evo fam ffmpeg firefox flac fortran gdbm gif gnome gpm gstreamer gtk hal iconv isdnlog jpeg ldap libnotify mad midi mikmod mmx mp3 mpeg mudflap multilib ncurses nls nptl nptlonly nvidia ogg opengl openmp pam pcre pdf perl png ppds pppd python qt3support quicktime readline reflection sdl session smp spell spl sse sse2 ssl startup-notification svg sysfs tcpd tiff truetype unicode usb vcd vorbis xml xorg xulrunner xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="nvidia"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

```

lspci

```
drek@NeoTux ~ $ sudo lspci

00:00.0 Host bridge: Intel Corporation 82P965/G965 Memory Controller Hub (rev 02)

00:01.0 PCI bridge: Intel Corporation 82P965/G965 PCI Express Root Port (rev 02)

00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #4 (rev 02)

00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 02)

00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 02)

00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 02)

00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 02)

00:1c.4 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 5 (rev 02)

00:1c.5 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 6 (rev 02)

00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 02)

00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 02)

00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 02)

00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 02)

00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev f2)

00:1f.0 ISA bridge: Intel Corporation 82801HB/HR (ICH8/R) LPC Interface Controller (rev 02)

00:1f.2 IDE interface: Intel Corporation 82801H (ICH8 Family) 4 port SATA IDE Controller (rev 02)

00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 02)

00:1f.5 IDE interface: Intel Corporation 82801H (ICH8 Family) 2 port SATA IDE Controller (rev 02)

01:00.0 VGA compatible controller: nVidia Corporation G80 [GeForce 8800 GTX] (rev a2)

02:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8056 PCI-E Gigabit Ethernet Controller (rev 12)

03:00.0 SATA controller: JMicron Technologies, Inc. JMicron 20360/20363 AHCI Controller (rev 02)

03:00.1 IDE interface: JMicron Technologies, Inc. JMicron 20360/20363 AHCI Controller (rev 02)

05:03.0 FireWire (IEEE 1394): Texas Instruments TSB43AB22/A IEEE-1394a-2000 Controller (PHY/Link)

05:04.0 Ethernet controller: Marvell Technology Group Ltd. 88E8001 Gigabit Ethernet Controller (rev 13)

05:05.0 Multimedia audio controller: Creative Labs SB X-Fi

```

ifconfig

```
drek@NeoTux ~ $ sudo ifconfig

eth0      Link encap:Ethernet  HWaddr 00:1a:92:19:98:2d  

          inet addr:192.168.1.14  Bcast:192.168.1.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:439 errors:0 dropped:0 overruns:0 frame:0

          TX packets:556 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:238403 (232.8 KiB)  TX bytes:117310 (114.5 KiB)

          Interrupt:17 

lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

```

lsmod

```
drek@NeoTux ~ $ sudo lsmod

Module                  Size  Used by

nvidia               8109784  26 

ctxfi                  53160  1 

```

----------

## mamac

mm, looks good, anything in /var/mog/messages regarding dhcp?

----------

## UberLord

What dhcp client are you using?

----------

## DrekAlots

 *mamac wrote:*   

> mm, looks good, anything in /var/mog/messages regarding dhcp?

 

That directory doesn't exist.

 *UberLord wrote:*   

> What dhcp client are you using?

 

dhcpcd.

----------

## UberLord

What version of dhcpcd?

What does this do?

```

dhcpcd -x

time dhcpcd -d eth0
```

----------

## mno

 *DrekAlots wrote:*   

>  *mamac wrote:*   mm, looks good, anything in /var/mog/messages regarding dhcp? 
> 
> That directory doesn't exist.

 

He meant /var/log/messages

----------

## Ghost Raccoon

I had the same problem yesterday after an upgrade to kernel 2.6.29. I solved the problem for me by unmasking version 4.0.12 of dhcpcd (the previously installed version was 4.0.7).

After doing so everything worked like a charm, my network has been up for about 30 hours now and no ther haven't been any further problems.

Maybe this will also do the trick for you   :Smile: 

In case there is a solution other than unmasking dhcpcd (maybe there is a problem with kernel 2.6.29?) I'd be glad to know.

EDIT: I just found another thread here. There seems to be a problem with kernel 2.6.29.

----------

## DrekAlots

 *mamac wrote:*   

> mm, looks good, anything in /var/mog/messages regarding dhcp?

 

```
Apr  3 06:08:54 NeoTux dhcpcd[3989]: eth0: dhcpcd 4.0.7 starting

Apr  3 06:08:54 NeoTux dhcpcd[3989]: eth0: waiting for carrier

Apr  3 06:08:56 NeoTux dhcpcd[3989]: eth0: carrier acquired

Apr  3 06:08:56 NeoTux dhcpcd[3989]: eth0: broadcasting for a lease

Apr  3 06:09:34 NeoTux dhcpcd[3989]: eth0: timed out

Apr  3 06:09:34 NeoTux dhcpcd[3989]: eth0: trying to use old lease in `/var/lib/dhcpcd/dhcpcd-eth0.lease'

Apr  3 06:09:34 NeoTux dhcpcd[3989]: eth0: probing for an IPV4LL address

Apr  3 06:09:34 NeoTux dhcpcd[3989]: eth0: checking 169.254.154.35 is available on attached networks

Apr  3 06:09:39 NeoTux dhcpcd[3989]: eth0: using IPv4LL address 0.0.0.0

Apr  3 06:10:47 NeoTux dhcpcd[4006]: eth0: broadcasting for a lease

Apr  3 06:10:49 NeoTux dhcpcd[4006]: eth0: offered 192.168.1.18 from 192.168.1.1

Apr  3 06:10:49 NeoTux dhcpcd[4006]: eth0: checking 192.168.1.18 is available on attached networks

Apr  3 06:10:54 NeoTux dhcpcd[4006]: eth0: leased 192.168.1.18 for 86400 seconds

Apr  3 06:24:31 NeoTux dhcpcd[4006]: eth0: received SIGTERM, stopping

Apr  3 17:32:15 NeoTux dhcpcd[4007]: eth0: dhcpcd 4.0.7 starting

Apr  3 17:32:15 NeoTux dhcpcd[4007]: eth0: waiting for carrier

Apr  3 17:32:17 NeoTux dhcpcd[4007]: eth0: carrier acquired

Apr  3 17:32:17 NeoTux dhcpcd[4007]: eth0: broadcasting for a lease

Apr  3 17:32:55 NeoTux dhcpcd[4007]: eth0: timed out

Apr  3 17:32:55 NeoTux dhcpcd[4007]: eth0: trying to use old lease in `/var/lib/dhcpcd/dhcpcd-eth0.lease'

Apr  3 17:32:55 NeoTux dhcpcd[4007]: eth0: probing for an IPV4LL address

Apr  3 17:32:55 NeoTux dhcpcd[4007]: eth0: checking 169.254.57.220 is available on attached networks

Apr  3 17:33:00 NeoTux dhcpcd[4007]: eth0: using IPv4LL address 0.0.0.0

Apr  3 17:33:10 NeoTux dhcpcd[4024]: eth0: carrier lost

Apr  3 17:33:32 NeoTux dhcpcd[4024]: eth0: carrier acquired

Apr  3 17:33:32 NeoTux dhcpcd[4024]: eth0: broadcasting for a lease

Apr  3 17:34:32 NeoTux dhcpcd[4024]: eth0: offered 192.168.1.19 from 192.168.1.1

Apr  3 17:34:32 NeoTux dhcpcd[4024]: eth0: checking 192.168.1.19 is available on attached networks

Apr  3 17:34:37 NeoTux dhcpcd[4024]: eth0: leased 192.168.1.19 for 86400 seconds

```

----------

## UberLord

Well, it looks ok. Try a newer dhcpcd client - they're all quite stable after dhcpcd-4.0.2

----------

## DrekAlots

 *UberLord wrote:*   

> Well, it looks ok. Try a newer dhcpcd client - they're all quite stable after dhcpcd-4.0.2

 

I updated dhcpcd to 4.0.12 and still have the same issue.

----------

## UberLord

You could try a different DHCP client - dhclient and pump are available in portage.

But if dhcpcd doesn't work how you like, I doubt the others will either which means either kernel (inc driver) issue or a hardware issue.

----------

## DrekAlots

To be honest it's kind of weird. My laptop; I just installed Gentoo amd64 on it. With the wireless controller it picks up an IP very fast. When I use the LAN port it takes forever just like the desktop.

----------

## jquinte

Hi, everyone!

I'm having the same problem here. It takes a looooooooooooottttttt to get an IP. After waiting aproximately 1 minute, accepts a valid IP and everything works OK, but 1 minute is too much.    :Sad: 

Any help would be appreciated!

Looking forward to reading answers!     :Smile: 

Kernel version is 2.6.29-r5.

/etc/conf.d/net is empty.

eix dhcpcd:

```

[I] net-misc/dhcpcd

     Available versions:  4.0.7 4.0.13 [M]~5.0.4 {compat zeroconf}

     Installed versions:  4.0.13(11:08:14 02.06.2009)(compat zeroconf)

     Homepage:            http://roy.marples.name/projects/dhcpcd/

     Description:         A fully featured, yet light weight RFC2131 compliant DHCP client

```

My emerge --info is:

```

Portage 2.2_rc23 (default/linux/amd64/2008.0, gcc-4.1.2, glibc-2.8_p20080602-r1, 2.6.29-gentoo-r5 x86_64)

=================================================================

System uname: Linux-2.6.29-gentoo-r5-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-glibc2.2.5

Timestamp of tree: Fri, 12 Jun 2009 16:20:02 +0000

app-shells/bash:     3.2_p39

dev-java/java-config: 1.3.7, 2.1.6

dev-lang/python:     2.4.4-r13, 2.5.4-r2

dev-python/pycrypto: 2.0.1-r6

dev-util/cmake:      2.6.4

sys-apps/baselayout: 1.12.11.1

sys-apps/sandbox:    2.0

sys-devel/autoconf:  2.13, 2.63

sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2

sys-devel/binutils:  2.18-r3

sys-devel/gcc-config: 1.4.1

sys-devel/libtool:   1.5.26

virtual/os-headers:  2.6.27-r2

ACCEPT_KEYWORDS="amd64"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-O2 -march=nocona -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/4.2/env /usr/kde/4.2/share/config /usr/kde/4.2/shutdown /usr/share/config"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"

CXXFLAGS="-O2 -march=nocona -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"

GENTOO_MIRRORS="http://de-mirror.org/distro/gentoo/ "

LANG="de_DE.utf8@euro"

LC_ALL=""

LDFLAGS="-Wl,-O1"

LINGUAS="de en es"

MAKEOPTS="-j5"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"

USE="X aac acl alsa amd64 berkdb bzip2 cdr cli cracklib crypt cups dri dvd dvdr dvdread flac fortran gdbm gpm hal iconv ipod isdnlog jpeg kde kdeprefix latex midi mmx mp3 mudflap multilib ncurses nls nptl nptlonly nvidia ogg openmp pam pcre pdf perl png pppd python qt3 qt4 readline reflection session slang spl sse sse2 ssl ssse3 sysfs tcpd unicode usb xorg xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en es" USERLAND="GNU" VIDEO_CARDS="nvidia"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

```

Log shows:

```

Jun 12 15:24:52 [dhcpcd] eth0: dhcpcd 4.0.13 starting

Jun 12 15:24:52 [dhcpcd] eth0: broadcasting for a lease

Jun 12 15:25:20 [dhcpcd] eth0: offered XXX.XXX.XXX.XXX from YYY.YYY.YYY.YYY

Jun 12 15:25:20 [dhcpcd] eth0: ignoring offer of XXX.XXX.XXX.XXX from YYY.YYY.YYY.YYY

Jun 12 15:25:20 [dhcpcd] eth0: acknowledged XXX.XXX.XXX.XXX from YYY.YYY.YYY.YYY

Jun 12 15:25:20 [dhcpcd] eth0: checking XXX.XXX.XXX.XXX is available on attached networks

Jun 12 15:25:20 [dhcpcd] eth0: wrong state 9

Jun 12 15:25:20 [dhcpcd] eth0: checking XXX.XXX.XXX.XXX is available on attached networks

Jun 12 15:25:25 [dhcpcd] eth0: leased XXX.XXX.XXX.XXX for 432000 seconds

```

----------

