Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 249687 - sys-apps/baselayout-1.12.11.1: net.eth0 + DHCP needs longer than needed
Summary: sys-apps/baselayout-1.12.11.1: net.eth0 + DHCP needs longer than needed
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Peter Weller (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-03 08:53 UTC by Toralf Förster
Modified: 2010-11-30 10:17 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
dhcp stream (dhcp_after_hibernation.pcap,3.34 KB, application/octet-stream)
2009-01-02 10:12 UTC, Toralf Förster
Details
/etc/conf.d/net (net,904 bytes, text/plain)
2009-02-27 11:42 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2008-12-03 08:53:15 UTC
When I hibernate my ThinkPad T41 at home (DSL) and went to my company (LAN) and restart eth0 (after I stopped ppp0 by the predown routine) I don't get a DHCP address within 40 sec or sth. longer (160 seconds works) even if I'm getting a DHCP address during boot of that system within less than 15 seconds.

Not sure whether this is related to dhcpcd or to the kernel but it is nagging issue for me w/o any obvious root cause... :-(


 * Starting eth0
 *   Bringing up eth0
 *     dhcp
 *       Running dhcpcd ...
eth0: dhcpcd 4.0.2 starting
eth0: waiting for carrier
eth0: carrier acquired
eth0: broadcasting for a lease
eth0: offered 9.155.133.166 from 9.64.163.10
eth0: checking 9.155.133.166 is available on attached networks
eth0: ignoring offer of 9.155.133.166 from 9.64.163.10
eth0: timed out                                                                                                      [ !! ]
 *     192.168.0.254/24                                                                                              [ ok ]
 *   Running postup function
...


Reproducible: Always




tfoerste@n22 ~ $ emerge --info
Portage 2.1.4.5 (default/linux/x86/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.26-gentoo-r3 i686)
=================================================================
System uname: 2.6.26-gentoo-r3 i686 Intel(R) Pentium(R) M processor 1700MHz
Timestamp of tree: Wed, 03 Dec 2008 08:13:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
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.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium-m -fomit-frame-pointer -pipe"
CHOST="i686-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/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=pentium-m -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.muntinternet.net/pub/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo http://gentoo.mneisen.org/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/"
LDFLAGS="-Wl,-O1"
LINGUAS="de en"
MAKEOPTS="-j 2"
PKGDIR="/usr/portage/packages"
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"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="X acl acpi alsa apache2 berkdb bluetooth branding bzip2 cairo cddb cdr cli cracklib crypt cups curl dbus dri dvd dvdr dvdread eds emboss encode evo exif fam fastbuild firefox fortran gdbm gif gpm gstreamer gtk hyphenation iconv ipv6 isdnlog jai java jimi jpeg kde libnotify mad mbox midi mikmod mmap mmx mmxext mp3 mpeg mudflap mysql ncurses nls nptl nptlonly nsplugin ogg opengl openmp pam pcre pdf perl png ppds pppd python qt3 qt3support quicktime readline reflection session spl sse sse2 ssl startup-notification svg sysfs tcpd tiff tk truetype unicode usb vorbis win32codecs wmf x86 xml xorg xpm xv zlib" ALSA_CARDS="intel8x0" 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 auth_digest authn_anon authn_dbd 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 dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse joystick evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" USERLAND="GNU" VIDEO_CARDS="radeon vga"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Markos Chandras (RETIRED) gentoo-dev 2008-12-03 12:25:44 UTC
Which ethernet card ( chipset ) are you using?

Try to do

1) ifconfig eth0 down
2) ifconfig eth0 up
3) dhclient eth0

and see if that works for you
Comment 2 Toralf Förster gentoo-dev 2008-12-04 08:39:43 UTC
If I manually bring down and up the interface and starting "dhcpcd eth0" finished successful within less than 1 seconds.
However if I do "net.eth0 restart" it takes often more than 40 seconds to get an address and sometimes (not really reproduceable) it failed.

BTW I have :

n22 ~ # lspci | grep Ethernet
02:01.0 Ethernet controller: Intel Corporation 82540EP Gigabit Ethernet Controller (Mobile) (rev 03)
02:02.0 Ethernet controller: Atheros Communications Inc. AR5212 802.11abg NIC (rev 01)
Comment 3 Peter Weller (RETIRED) gentoo-dev 2008-12-12 14:06:24 UTC
@Markos dhcpcd != dhclient. Please do not confuse the two.

CC'ing Roy to get his opinion
Comment 4 Roy Marples 2008-12-12 19:31:39 UTC
Can you reproduce it with dhcpcd-4.0.7?

If so, can you try installing dhcpcd-4.99.x as that has slightly different logic for this.

Also, can you attach syslog entries for dhcpcd when you resume from hibernation? There should be an entry to say something like "carrier lost; carrier found;"
Comment 5 Toralf Förster gentoo-dev 2009-01-02 10:12:54 UTC
Created attachment 177079 [details]
dhcp stream

The sniffed network stream shows, that it took 28 seconds before the response from the DHCP servers was shown (with wireshark).
OTOH during bootup the whole dhcp hand-shaking never takes longer than 16 seconds - therefore I'm wondering how to interprete this result.
Comment 6 Roy Marples 2009-01-02 11:47:29 UTC
I'm guessing that something in the chain needs a few seconds to settle.
You're using a DHCP relay, so that may have something todo with it also.

For reference, I use a SMC wireless bridge on one box and that only starts working 20 seconds after the initial "ifconfig re0 up" on both NetBSD and Linux. So you may have something like that between you and the DHCP server.
Comment 7 Toralf Förster gentoo-dev 2009-01-02 12:47:04 UTC
Yep, if that means, that the 16 sec are fine for bootup b/c some network card related things are already initialised before net.eth0 is called then I'll close this bug as "invalid".
Comment 8 Martin Mokrejš 2009-02-06 10:36:11 UTC
(In reply to comment #5)
> The sniffed network stream shows, that it took 28 seconds before the response
> from the DHCP servers was shown (with wireshark).
> OTOH during bootup the whole dhcp hand-shaking never takes longer than 16
> seconds - therefore I'm wondering how to interprete this result.

The DHCP server tries usually to ping on the IP addresses before it assigns it to a client. Maybe you can adjust the timout in dhcp server?
Comment 9 Toralf Förster gentoo-dev 2009-02-10 08:36:06 UTC
(In reply to comment #8)
> The DHCP server tries usually to ping on the IP addresses before it assigns it
> to a client. Maybe you can adjust the timout in dhcp server?
> 
Oh - no chance to access that server. BTW I didn't found such a ping (using wireshark).
Comment 10 Martin Mokrejš 2009-02-12 15:25:39 UTC
(In reply to comment #9)
> Oh - no chance to access that server. BTW I didn't found such a ping (using
> wireshark).

Maybe that only happens with BOOTP protocol? I am not certain, I just thought that it always happens like that. Actually, are you sure the switch copied the ICMP packet destined to the port where you sniffed? Just a thought. An ethernet hub would be "better" to judge this.
Comment 11 Vitaly Tskhovrebov 2009-02-18 10:34:46 UTC
I have the same issue with dhcpcd 4.0.2 and 4.0.7

Portage 2.1.4.5 (default/linux/x86/2008.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.25-gentoo-r8 i686)
=================================================================
                        System Settings
=================================================================
System uname: 2.6.25-gentoo-r8 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz
Timestamp of tree: Wed, 18 Feb 2009 01:45:01 +0000
app-shells/bash:     3.2_p33
dev-lang/python:     2.4.4-r13, 2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.5, 1.7.9-r1, 1.9.6-r2, 1.10.1-r1
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.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i486-pc-linux-gnu"
CFLAGS="-O2 -mtune=i686 -pipe"
CHOST="i486-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -mtune=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.yandex.ru/gentoo-distfiles/ "
LDFLAGS="-Wl,-O1"
PKGDIR="/usr/portage/packages"
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="acl berkdb bzip2 cli cracklib crypt cups dri fortran gdbm gpm iconv ipv6 isdnlog midi mudflap ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection session spl ssl sysfs tcpd unicode x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY


Comment 12 Vitaly Tskhovrebov 2009-02-18 11:13:51 UTC
reproducible for every /etc/init.d/net.eth3 restart.
if starting manually "dhcpcd eth3" - ok.
Comment 13 Toralf Förster gentoo-dev 2009-02-27 11:40:07 UTC
It is not related to the dhcpcd package itself.

If I do a

n22 ~ # /etc/init.d/net.eth0 stop
n22 ~ # time /etc/init.d/net.eth0 start

it tooks about 39 seconds whereas a

n22 ~ # time dhcpcd eth0

needs 21 seconds.

  
Comment 14 Toralf Förster gentoo-dev 2009-02-27 11:42:48 UTC
Created attachment 183352 [details]
/etc/conf.d/net
Comment 15 Martin Mokrejš 2009-06-11 16:40:51 UTC
I do not know why this was resolved as INVALID but I suspect similarly to my case the background retry loop does not work in Gentoo. See bug #257877.
Comment 16 Toralf Förster gentoo-dev 2009-06-11 16:55:30 UTC
(In reply to comment #15)
> I do not know why this was resolved as INVALID but I suspect similarly to my
> case the background retry loop does not work in Gentoo. See bug #257877.
> 

Oh - I set it to INVALID b/c w/ wireshark I saw no incoming network packets which were rejected or ignored ... it seems to be the dhcp server itself - at least in my office LAN.
Comment 17 Martin Mokrejš 2009-06-11 16:59:11 UTC
You should connect to a *hub* both your monitoring computer and either the problematic host or the dhcp server to see the traffic. If you have a switch between you all you will detect only broadcasts, not unicasts.
Comment 18 Toralf Förster gentoo-dev 2009-06-18 11:47:25 UTC
FWIW the problem (at least for me) is related to the specific LAN - no issue w/ dhcp et al.