Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Dhcpcd doesn't work with service net.eth0 [solved]
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
tpereira
n00b
n00b


Joined: 21 Feb 2013
Posts: 23

PostPosted: Fri May 16, 2014 2:51 pm    Post subject: Reply with quote

Also discover that after configuring the net if card, it takes around 30 seconds to be able to reach any other machine:

Code:
gentooTEST tpereira # ifconfig enp1s0 down
gentooTEST tpereira # ifconfig enp1s0 up; ifconfig enp1s0 10.136.224.244; route add -net 0.0.0.0 gw 10.136.254.254; ping 10.136.254.254
PING 10.136.254.254 (10.136.254.254) 56(84) bytes of data.
From 10.136.224.244: icmp_seq=1 Destination Host Unreachable
From 10.136.224.244: icmp_seq=2 Destination Host Unreachable
From 10.136.224.244: icmp_seq=3 Destination Host Unreachable
From 10.136.224.244: icmp_seq=4 Destination Host Unreachable
From 10.136.224.244: icmp_seq=5 Destination Host Unreachable
From 10.136.224.244: icmp_seq=6 Destination Host Unreachable
From 10.136.224.244: icmp_seq=7 Destination Host Unreachable
From 10.136.224.244: icmp_seq=8 Destination Host Unreachable
From 10.136.224.244: icmp_seq=9 Destination Host Unreachable
From 10.136.224.244: icmp_seq=10 Destination Host Unreachable
From 10.136.224.244: icmp_seq=11 Destination Host Unreachable
From 10.136.224.244: icmp_seq=12 Destination Host Unreachable
From 10.136.224.244: icmp_seq=13 Destination Host Unreachable
From 10.136.224.244: icmp_seq=14 Destination Host Unreachable
From 10.136.224.244: icmp_seq=15 Destination Host Unreachable
From 10.136.224.244: icmp_seq=16 Destination Host Unreachable
From 10.136.224.244: icmp_seq=17 Destination Host Unreachable
From 10.136.224.244: icmp_seq=18 Destination Host Unreachable
From 10.136.224.244: icmp_seq=19 Destination Host Unreachable
From 10.136.224.244: icmp_seq=20 Destination Host Unreachable
From 10.136.224.244: icmp_seq=21 Destination Host Unreachable
From 10.136.224.244: icmp_seq=22 Destination Host Unreachable
From 10.136.224.244: icmp_seq=23 Destination Host Unreachable
From 10.136.224.244: icmp_seq=24 Destination Host Unreachable
From 10.136.224.244: icmp_seq=25 Destination Host Unreachable
From 10.136.224.244: icmp_seq=26 Destination Host Unreachable
From 10.136.224.244: icmp_seq=27 Destination Host Unreachable
From 10.136.224.244: icmp_seq=28 Destination Host Unreachable
From 10.136.224.244: icmp_seq=29 Destination Host Unreachable
From 10.136.224.244: icmp_seq=30 Destination Host Unreachable
From 10.136.224.244: icmp_seq=31 Destination Host Unreachable
From 10.136.224.244: icmp_seq=32 Destination Host Unreachable
64 bytes from 10.136.254.254: icmp_seq=33 ttl=64 time=1001 ms
64 bytes from 10.136.254.254: icmp_seq=34 ttl=64 time=1.21 ms
64 bytes from 10.136.254.254: icmp_seq=35 ttl=64 time=0.113 ms
64 bytes from 10.136.254.254: icmp_seq=36 ttl=64 time=0.121 ms
64 bytes from 10.136.254.254: icmp_seq=37 ttl=64 time=0.122 ms
64 bytes from 10.136.254.254: icmp_seq=38 ttl=64 time=0.136 ms
64 bytes from 10.136.254.254: icmp_seq=39 ttl=64 time=0.133 ms


(10.136.254.254 is the first machine after mine in a tracepath xxx.xxx.xxx.xxx)
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Fri May 16, 2014 6:34 pm    Post subject: Reply with quote

tpereira wrote:
khayyam wrote:
[...] but when re-newing the lease it trys to contact that same dhcp server, which of course isn't seen

What about the 4 discover packets that seem to go into oblivion. Souldn't these packages reach the dhcp server anyway? Shouldn't it answer anyway?

tpereira ... yes, of course you're right, the discovery should reach the dhcp-relay, I was (wrongly) thinking the problem was with the network.

tpereira wrote:
Also discover that after configuring the net if card, it takes around 30 seconds to be able to reach any other machine

oh my ... this hints at a problem with the driver (or card) ... what card is it, and what driver is in use. Also, is it builtin or module, and does 'modinfo <driver> | egrep "^parm"' provide anything of interest? Like pme/power settings ... you might pastebin your .config.

best ... khay
Back to top
View user's profile Send private message
tpereira
n00b
n00b


Joined: 21 Feb 2013
Posts: 23

PostPosted: Fri May 16, 2014 7:25 pm    Post subject: Reply with quote

Code:
gentooTEST linux-3.12.13-gentoo # uname -a
Linux gentooTEST 3.12.13-gentoo #3 SMP Mon May 12 13:38:47 WEST 2014 i686 Genuine Intel(R) CPU 230 @ 1.60GHz GenuineIntel GNU/Linux


Code:
gentooTEST linux-3.12.13-gentoo # modinfo r8169
filename:       /lib/modules/3.12.13-gentoo/kernel/drivers/net/ethernet/realtek/r8169.ko
firmware:       rtl_nic/rtl8168g-3.fw
firmware:       rtl_nic/rtl8168g-2.fw
firmware:       rtl_nic/rtl8106e-2.fw
firmware:       rtl_nic/rtl8106e-1.fw
firmware:       rtl_nic/rtl8411-2.fw
firmware:       rtl_nic/rtl8411-1.fw
firmware:       rtl_nic/rtl8402-1.fw
firmware:       rtl_nic/rtl8168f-2.fw
firmware:       rtl_nic/rtl8168f-1.fw
firmware:       rtl_nic/rtl8105e-1.fw
firmware:       rtl_nic/rtl8168e-3.fw
firmware:       rtl_nic/rtl8168e-2.fw
firmware:       rtl_nic/rtl8168e-1.fw
firmware:       rtl_nic/rtl8168d-2.fw
firmware:       rtl_nic/rtl8168d-1.fw
version:        2.3LK-NAPI
license:        GPL
description:    RealTek RTL-8169 Gigabit Ethernet driver
author:         Realtek and the Linux r8169 crew <netdev@vger.kernel.org>
srcversion:     18A7E77CB174A8A3B359D55
alias:          pci:v00000001d00008168sv*sd00002410bc*sc*i*
alias:          pci:v00001737d00001032sv*sd00000024bc*sc*i*
alias:          pci:v000016ECd00000116sv*sd*bc*sc*i*
alias:          pci:v00001259d0000C107sv*sd*bc*sc*i*
alias:          pci:v00001186d00004302sv*sd*bc*sc*i*
alias:          pci:v00001186d00004300sv*sd*bc*sc*i*
alias:          pci:v00001186d00004300sv00001186sd00004B10bc*sc*i*
alias:          pci:v000010ECd00008169sv*sd*bc*sc*i*
alias:          pci:v000010ECd00008168sv*sd*bc*sc*i*
alias:          pci:v000010ECd00008167sv*sd*bc*sc*i*
alias:          pci:v000010ECd00008136sv*sd*bc*sc*i*
alias:          pci:v000010ECd00008129sv*sd*bc*sc*i*
depends:        mii
intree:         Y
vermagic:       3.12.13-gentoo SMP mod_unload 486
parm:           use_dac:Enable PCI DAC. Unsafe on 32 bit PCI slot. (int)
parm:           debug:Debug verbosity level (0=none, ..., 16=all) (int)


My .config is in http://pastebin.com/SxRG0nEh

lspci -v gives me:
Code:
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 02)
        Subsystem: Micro-Star International Co., Ltd. [MSI] Wind PC MS-7418
        Flags: bus master, fast devsel, latency 0, IRQ 16
        I/O ports at e800 [size=256]
        Memory at febff000 (64-bit, non-prefetchable) [size=4K]
        Memory at fdff0000 (64-bit, prefetchable) [size=64K]
        Expansion ROM at febc0000 [disabled] [size=128K]
        Capabilities: [40] Power Management version 3
        Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [70] Express Endpoint, MSI 01
        Capabilities: [b0] MSI-X: Enable- Count=2 Masked-
        Capabilities: [d0] Vital Product Data
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [140] Virtual Channel
        Capabilities: [160] Device Serial Number 01-00-00-00-68-4c-e0-00
        Kernel driver in use: r8169
        Kernel modules: r8169
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Fri May 16, 2014 11:42 pm    Post subject: Reply with quote

tpereira wrote:
Code:
        Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [70] Express Endpoint, MSI 01
        Capabilities: [b0] MSI-X: Enable- Count=2 Masked-

tpereira ... the first thing I see is that you have CONFIG_PCI_MSI disabled, you should enable it ... its under Bus options (PCI etc) => Message Signaled Interrupts (MSI and MSI-X). Also I see a lot of network stuff enabled that you probably don't want or need, specifically CONFIG_IP_PNP stands out as it has some baring on the "automatic configuration of IP addresses", its only used for diskless clients and as it may have some relation to the delay you're seeing I'd disable it. There are various other stuff I don't know why you enabled (or if these were enabled by genkernel) but its probably too much a task to go through each item one by one, so I'll leave it at that ... though I'd probably go through and ask yourself why each was enabled, if its needed, etc.

best ... khay
Back to top
View user's profile Send private message
tpereira
n00b
n00b


Joined: 21 Feb 2013
Posts: 23

PostPosted: Mon May 19, 2014 3:09 pm    Post subject: Reply with quote

khayyam:

I enabled
Code:
CONFIG_PCI_MSI=y


and disabled
Code:
# CONFIG_IP_PNP is not set


but result is the same. Still around 30 seconds until if card works.
I also disabled some other stuff in Network options...

best
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Mon May 19, 2014 7:25 pm    Post subject: Reply with quote

tpereira wrote:
but result is the same. Still around 30 seconds until if card works. I also disabled some other stuff in Network options...

tpereira ... yeah, I expected as much, those two were just the most obvious I could see. I can suggest two things, 1). boot a livecd (like the minimal install CD) and see if the behavior is the same, and 2). rebuild the kernel using a kernel-seed, or after having distclean'd the sources. I'm not sure how you currently build the kernel but its possible you have some issue by using 'make oldconfig' with a .config from a previous major kernel revision, or you used/use genkernel which tends to be a kitchen-sink solution (and so way too much is enabled). Having a somewhat paired down .config (with just those things needed enabled) will help to eliminate possible issues, and make debugging the issue easier.

best ... khay
Back to top
View user's profile Send private message
tpereira
n00b
n00b


Joined: 21 Feb 2013
Posts: 23

PostPosted: Tue May 20, 2014 10:51 am    Post subject: Reply with quote

Hi
I booted from a recent gentoo install cd (2014 something). The same problem still. Around 30 seconds, after ifconfig up, until I can ping any machine.

Code:
> modinfo r8169
filename:       /lib/modules/3.10.25-gentoo/kernel/drivers/net/ethernet/realtek/r8169.ko
firmware:       rtl_nic/rtl8168g-3.fw
firmware:       rtl_nic/rtl8168g-2.fw
firmware:       rtl_nic/rtl8106e-2.fw
firmware:       rtl_nic/rtl8106e-1.fw
firmware:       rtl_nic/rtl8411-1.fw
firmware:       rtl_nic/rtl8402-1.fw
firmware:       rtl_nic/rtl8168f-2.fw
firmware:       rtl_nic/rtl8168f-1.fw
firmware:       rtl_nic/rtl8105e-1.fw
firmware:       rtl_nic/rtl8168e-3.fw
firmware:       rtl_nic/rtl8168e-2.fw
firmware:       rtl_nic/rtl8168e-1.fw
firmware:       rtl_nic/rtl8168d-2.fw
firmware:       rtl_nic/rtl8168d-1.fw
version:        2.3LK-NAPI
license:        GPL
description:    RealTek RTL-8169 Gigabit Ethernet driver
author:         Realtek and the Linux r8169 crew <netdev@vger.kernel.org>
srcversion:     BE315FA128766ABBDE9857B
alias:          pci:v00000001d00008168sv*sd00002410bc*sc*i*
alias:          pci:v00001737d00001032sv*sd00000024bc*sc*i*
alias:          pci:v000016ECd00000116sv*sd*bc*sc*i*
alias:          pci:v00001259d0000C107sv*sd*bc*sc*i*
alias:          pci:v00001186d00004302sv*sd*bc*sc*i*
alias:          pci:v00001186d00004300sv*sd*bc*sc*i*
alias:          pci:v00001186d00004300sv00001186sd00004B10bc*sc*i*
alias:          pci:v000010ECd00008169sv*sd*bc*sc*i*
alias:          pci:v000010ECd00008168sv*sd*bc*sc*i*
alias:          pci:v000010ECd00008167sv*sd*bc*sc*i*
alias:          pci:v000010ECd00008136sv*sd*bc*sc*i*
alias:          pci:v000010ECd00008129sv*sd*bc*sc*i*
depends:       
intree:         Y
vermagic:       3.10.25-gentoo SMP mod_unload modversions 486
parm:           use_dac:Enable PCI DAC. Unsafe on 32 bit PCI slot. (int)
parm:           debug:Debug verbosity level (0=none, ..., 16=all) (int)


Code:
> lsmod | grep 8169
r8169                  39714  0


The kernel is 3.10.25-gentoo

Kernel-seed.. I'll look into that.
I don't remember how I configured my kernel, but probably with make oldconfig.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Tue May 20, 2014 11:12 am    Post subject: Reply with quote

tpereira wrote:
I booted from a recent gentoo install cd (2014 something). The same problem still. Around 30 seconds, after ifconfig up, until I can ping any machine.

tpereira ... if you have any other (older) boot CD's (doesn't matter the disribution) try testing with these also. If these also exhibit the same behavior then this points to a hardware issue. At this stage I would swap out the ethernet cable to rule that out, and (if its pci) check the pci slot (though as I remember its pcie, so it may be soldierd on the board).

tpereira wrote:
Kernel-seed.. I'll look into that. I don't remember how I configured my kernel, but probably with make oldconfig.

Given that the issue can be reproduced with an older kernel using a different .config I'm leaning toward thinking its hardware rather than the kernel.

best ... khay
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Tue May 20, 2014 1:47 pm    Post subject: Reply with quote

tpereira wrote:
Also discover that after configuring the net if card, it takes around 30 seconds to be able to reach any other machine:

Code:
gentooTEST tpereira # ifconfig enp1s0 down
gentooTEST tpereira # ifconfig enp1s0 up; ifconfig enp1s0 10.136.224.244; route add -net 0.0.0.0 gw 10.136.254.254; ping 10.136.254.254
PING 10.136.254.254 (10.136.254.254) 56(84) bytes of data.
From 10.136.224.244: icmp_seq=1 Destination Host Unreachable



At a guess, you missed a subnet declaration. I don't know yours, so guessed at 255.255.0.0
Code:
# ifconfig enp1s0 up; ifconfig enp1s0 10.136.224.244 netmask 255.255.0.0; route add -net 0.0.0.0 gw 10.136.254.254; ping 10.136.254.254

_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
tpereira
n00b
n00b


Joined: 21 Feb 2013
Posts: 23

PostPosted: Wed May 21, 2014 3:45 pm    Post subject: Reply with quote

khayyam: I tried the booting another pc, with another net if card, in another room of my workplace, with another gentoo kernel.
The situation is the same. I'm starting to believe very seriously that this is a time window imposed by the router or switch.

UberLord: also declared a subnet. Doesn't seem to make any difference at all.

Below is the info.

lspci -vv
Code:
00:04.0 Ethernet controller: Silicon Integrated Systems [SiS] SiS900 PCI Fast Ethernet (rev 91)
        Subsystem: ASUSTeK Computer Inc. Motherboard P4S800D-X
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 32 (13000ns min, 2750ns max)
        Interrupt: pin A routed to IRQ 19
        Region 0: I/O ports at 8800 [size=256]
        Region 1: Memory at e5800000 (32-bit, non-prefetchable) [size=4K]
        Expansion ROM at effe0000 [disabled] [size=128K]
        Capabilities: [40] Power Management version 2
                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-
        Kernel driver in use: sis900
        Kernel modules: sis900


uname -a
Code:
Linux livecd 2.6.30-gentoo-r5 #1 SMP Tue Sep 1 10:41:11 UTC 2009 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz GenuineIntel GNU/Linux


modinfo sis900
Code:
filename:       /lib/modules/2.6.30-gentoo-r5/kernel/drivers/net/sis900.ko
license:        GPL
description:    SiS 900 PCI Fast Ethernet driver
author:         Jim Huang <cmhuang@sis.com.tw>, Ollie Lho <ollie@sis.com.tw>
alias:          pci:v00001039d00007016sv*sd*bc*sc*i*
alias:          pci:v00001039d00000900sv*sd*bc*sc*i*
depends:
vermagic:       2.6.30-gentoo-r5 SMP mod_unload modversions 486
parm:           multicast_filter_limit:SiS 900/7016 maximum number of filtered multicast addresses (int)
parm:           max_interrupt_work:SiS 900/7016 maximum events handled per interrupt (int)
parm:           sis900_debug:SiS 900/7016 bitmapped debugging message level (int)


Net if card setup and ping
Code:
> ifconfig eth0 up; ifconfig eth0 10.136.224.244 netmask 255.255.0.0; route add -net 0.0.0.0 gw 10.136.254.254
PING 10.136.254.254 (10.136.254.254) 56(84) bytes of data.
From 10.136.224.244 icmp_seq=1 Destination Host Unreachable
From 10.136.224.244 icmp_seq=2 Destination Host Unreachable
From 10.136.224.244 icmp_seq=3 Destination Host Unreachable
From 10.136.224.244 icmp_seq=5 Destination Host Unreachable
From 10.136.224.244 icmp_seq=6 Destination Host Unreachable
From 10.136.224.244 icmp_seq=9 Destination Host Unreachable
From 10.136.224.244 icmp_seq=10 Destination Host Unreachable
From 10.136.224.244 icmp_seq=11 Destination Host Unreachable
From 10.136.224.244 icmp_seq=12 Destination Host Unreachable
From 10.136.224.244 icmp_seq=13 Destination Host Unreachable
From 10.136.224.244 icmp_seq=14 Destination Host Unreachable
From 10.136.224.244 icmp_seq=15 Destination Host Unreachable
From 10.136.224.244 icmp_seq=16 Destination Host Unreachable
From 10.136.224.244 icmp_seq=17 Destination Host Unreachable
From 10.136.224.244 icmp_seq=18 Destination Host Unreachable
From 10.136.224.244 icmp_seq=19 Destination Host Unreachable
From 10.136.224.244 icmp_seq=20 Destination Host Unreachable
From 10.136.224.244 icmp_seq=21 Destination Host Unreachable
From 10.136.224.244 icmp_seq=22 Destination Host Unreachable
From 10.136.224.244 icmp_seq=23 Destination Host Unreachable
From 10.136.224.244 icmp_seq=24 Destination Host Unreachable
From 10.136.224.244 icmp_seq=25 Destination Host Unreachable
From 10.136.224.244 icmp_seq=26 Destination Host Unreachable
From 10.136.224.244 icmp_seq=27 Destination Host Unreachable
From 10.136.224.244 icmp_seq=28 Destination Host Unreachable
From 10.136.224.244 icmp_seq=29 Destination Host Unreachable
From 10.136.224.244 icmp_seq=30 Destination Host Unreachable
64 bytes from 10.136.254.254: icmp_seq=31 ttl=64 time=2001 ms
64 bytes from 10.136.254.254: icmp_seq=32 ttl=64 time=990 ms
64 bytes from 10.136.254.254: icmp_seq=33 ttl=64 time=0.088 ms
64 bytes from 10.136.254.254: icmp_seq=34 ttl=64 time=0.099 ms
64 bytes from 10.136.254.254: icmp_seq=35 ttl=64 time=0.108 ms
64 bytes from 10.136.254.254: icmp_seq=36 ttl=64 time=0.119 ms
64 bytes from 10.136.254.254: icmp_seq=37 ttl=64 time=0.126 ms
64 bytes from 10.136.254.254: icmp_seq=38 ttl=64 time=0.135 ms
64 bytes from 10.136.254.254: icmp_seq=39 ttl=64 time=0.096 ms

--- 10.136.254.254 ping statistics ---
39 packets transmitted, 9 received, +27 errors, 76% packet loss, time 38111ms
rtt min/avg/max/mdev = 0.088/332.557/2001.811/666.071 ms, pipe 3


At the risk of sounding a prick: maybe, if this situation is frequent, roy marples should increase the default timeout on dhcpcd.conf It's in if-options.h and pretty simple to avoid this problem.

Sheers
tpereira
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Wed May 21, 2014 7:22 pm    Post subject: Reply with quote

tpereira wrote:
khayyam: I tried the booting another pc, with another net if card, in another room of my workplace, with another gentoo kernel. The situation is the same. I'm starting to believe very seriously that this is a time window imposed by the router or switch.

tpereira ... the topology of your network seems odd/broken, you have a dhcp server outside the subnet with the gateway within the network probably acting as a dhcp-repeater, some communication between the client, the repeater, and the dhcp server seems to break down as the lease you're provided for 20 hours is seen as invalid shortly thereafter. That could be the result of no traffic being routed for this "30 seconds" window, but if this is imposed by some mechanism on the router then its broken, because such a delay does nothing but interfere with the normal operation of dhcp. I've seen network setups that disable a port if the card goes into promiscuous mode, or if a switch is connected to the port, but I haven't seen anything like the above, and I can't think why there is a need for it (or what exactly its intended to prevent). Also, its extremely odd that the issue hits you on a restart, but not on start, when the 30 second delay is obviously encountered for both.

tpereira wrote:
At the risk of sounding a prick: maybe, if this situation is frequent, roy marples should increase the default timeout on dhcpcd.conf It's in if-options.h and pretty simple to avoid this problem.

The current 30 second timeout seems a perfectly reasonable default, I don't think it takes any more than a second or two for a negotiation to happen here, in fact I lower the timeout to '-t 10' and have yet to have any issues on any of the networks I access (including networks I *know* have some crappy wireless setups). I think yours is an exception, not the rule.

best ... khay
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Thu May 22, 2014 2:57 pm    Post subject: Reply with quote

tpereira wrote:
UberLord: also declared a subnet. Doesn't seem to make any difference at all.

...

At the risk of sounding a prick: maybe, if this situation is frequent, roy marples should increase the default timeout on dhcpcd.conf It's in if-options.h and pretty simple to avoid this problem.


I am the same person :)

You can set the default timeout in dhcpcd.conf yourself
Code:
timeout 60


It's not a frequent situation at all.

Out of curiosity, can you try just adding dhcpcd to the default runlevel and removing net.* (aside from net.lo)?
You could also try other DHCP clients. If you find that another one works then it's probably one of the DHCP options causing the issue.
Let me know!
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
tpereira
n00b
n00b


Joined: 21 Feb 2013
Posts: 23

PostPosted: Mon Feb 16, 2015 3:57 pm    Post subject: Reply with quote

Uberlord, sorry for delay in reply. It has only been 9 months

For the time being, I have added background to my dhcpcd.conf and it seems to "solve the problem"

As you requested, I have removed all net.* except net.lo from all runlevels and added dhcpcd to default runlevel.

My dhcpcd.conf is:
Code:

hostname
duid
option rapid_commit
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
option ntp_servers
require dhcp_server_identifier
slaac private
nohook lookup-hostname
timeout 30


This is /var/log/messages while I stop and start dhcpcd service:

Code:

>/etc/runlevels/default/dhcpcd stop

Feb 16 15:47:25 gentooTEST dhcpcd[2359]: received signal TERM from PID 2707, stopping
Feb 16 15:47:25 gentooTEST dhcpcd[2359]: enp1s0: removing interface
Feb 16 15:47:25 gentooTEST dhcpcd[2359]: enp1s0: deleting route to 10.136.0.0/16
Feb 16 15:47:25 gentooTEST dhcpcd[2359]: enp1s0: deleting default route via 10.136.254.254
Feb 16 15:47:25 gentooTEST dhcpcd[2359]: enp1s0: deleting IP address 10.136.250.248/16
Feb 16 15:47:25 gentooTEST dhcpcd[2359]: enp1s0: executing `/lib/dhcpcd/dhcpcd-run-hooks' STOP
Feb 16 15:47:25 gentooTEST dhcpcd[2359]: enp1s0: executing `/lib/dhcpcd/dhcpcd-run-hooks' STOPPED
Feb 16 15:47:25 gentooTEST dhcpcd[2359]: dev: unloaded udev
Feb 16 15:47:25 gentooTEST dhcpcd[2359]: exited

>/etc/runlevels/default/dhcpcd start

Feb 16 15:48:36 gentooTEST dhcpcd[2739]: version 6.4.7 starting
Feb 16 15:48:36 gentooTEST dhcpcd[2739]: udev: starting
Feb 16 15:48:36 gentooTEST dhcpcd[2739]: dev: loaded udev
Feb 16 15:48:36 gentooTEST dhcpcd[2739]: enp1s0: if_disable_autolinklocal: Invalid argument
Feb 16 15:48:36 gentooTEST dhcpcd[2739]: enp1s0: adding address fe80::6c8:e318:6519:7368
Feb 16 15:48:36 gentooTEST dhcpcd[2739]: if_addaddress6: Permission denied
Feb 16 15:48:36 gentooTEST dhcpcd[2739]: enp1s0: executing `/lib/dhcpcd/dhcpcd-run-hooks' PREINIT
Feb 16 15:48:36 gentooTEST dhcpcd[2739]: enp1s0: executing `/lib/dhcpcd/dhcpcd-run-hooks' CARRIER
Feb 16 15:48:36 gentooTEST dhcpcd[2739]: DUID 00:01:00:01:1b:03:65:eb:00:21:85:98:70:65
Feb 16 15:48:36 gentooTEST dhcpcd[2739]: enp1s0: IAID 85:98:70:65
Feb 16 15:48:36 gentooTEST dhcpcd[2739]: enp1s0: delaying IPv6 router solictation for 0.2 seconds
Feb 16 15:48:36 gentooTEST dhcpcd[2739]: enp1s0: delaying IPv4 for 0.5 seconds
Feb 16 15:48:36 gentooTEST dhcpcd[2739]: enp1s0: soliciting an IPv6 router
Feb 16 15:48:36 gentooTEST dhcpcd[2739]: enp1s0: delaying Router Solicitation for LL address
Feb 16 15:48:37 gentooTEST dhcpcd[2739]: enp1s0: reading lease `/var/lib/dhcpcd/dhcpcd-enp1s0.lease'
Feb 16 15:48:37 gentooTEST dhcpcd[2739]: enp1s0: rebinding lease of 10.136.250.248
Feb 16 15:48:37 gentooTEST dhcpcd[2739]: enp1s0: sending REQUEST (xid 0x2a6d88c1), next in 3.3 seconds
Feb 16 15:48:37 gentooTEST dhcpcd[2739]: enp1s0: acknowledged 10.136.250.248 from xxx.xxx.xxx.xxx
Feb 16 15:48:37 gentooTEST dhcpcd[2739]: enp1s0: checking for 10.136.250.248
Feb 16 15:48:37 gentooTEST dhcpcd[2739]: enp1s0: sending ARP probe (1 of 3), next in 1.9 seconds
Feb 16 15:48:39 gentooTEST dhcpcd[2739]: enp1s0: sending ARP probe (2 of 3), next in 1.2 seconds
Feb 16 15:48:40 gentooTEST dhcpcd[2739]: enp1s0: sending ARP probe (3 of 3), next in 2.0 seconds
Feb 16 15:48:42 gentooTEST dhcpcd[2739]: enp1s0: leased 10.136.250.248 for 72000 seconds
Feb 16 15:48:42 gentooTEST dhcpcd[2739]: enp1s0: renew in 36000 seconds, rebind in 63000 seconds
Feb 16 15:48:42 gentooTEST dhcpcd[2739]: enp1s0: adding IP address 10.136.250.248/16
Feb 16 15:48:42 gentooTEST dhcpcd[2739]: enp1s0: adding route to 10.136.0.0/16
Feb 16 15:48:42 gentooTEST dhcpcd[2739]: enp1s0: adding default route via 10.136.254.254
Feb 16 15:48:42 gentooTEST dhcpcd[2739]: enp1s0: writing lease `/var/lib/dhcpcd/dhcpcd-enp1s0.lease'
Feb 16 15:48:42 gentooTEST dhcpcd[2739]: enp1s0: executing `/lib/dhcpcd/dhcpcd-run-hooks' REBOOT
Feb 16 15:48:42 gentooTEST dhcpcd[2739]: forking to background
Feb 16 15:48:42 gentooTEST dhcpcd[2739]: forked to background, child pid 2781
Feb 16 15:48:42 gentooTEST dhcpcd[2781]: enp1s0: sending ARP announce (1 of 2), next in 2.0 seconds
Feb 16 15:48:44 gentooTEST dhcpcd[2781]: enp1s0: sending ARP announce (2 of 2)



I have restarted dhcpcd service several times and results are the same as the log above.
Net is reachable within 4 or 5 seconds.

I do not wish to use another dhcp client. I get the idea this one is the simplest one.

Cheers
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Mon Feb 16, 2015 5:17 pm    Post subject: Reply with quote

Well, that looks good.
If you want it to go faster, disable ARP checking if you're sure there will never be an IP conflict.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
Fog_Watch
Apprentice
Apprentice


Joined: 24 Jul 2006
Posts: 267
Location: Utility Muffin Research Kitchen

PostPosted: Thu Jun 04, 2015 1:02 am    Post subject: Reply with quote

UberLord wrote:
try just adding dhcpcd to the default runlevel and removing net.* (aside from net.lo)?

My experience is that this is correct. Does that mean that the handbook wrong?
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Thu Jun 04, 2015 6:26 am    Post subject: Reply with quote

Fog_Watch wrote:
My experience is that this is correct. Does that mean that the handbook wrong?

Not wrong, but recommending for default a high sophisticated tool which is needed only for very advanced requirements. See bug 534752
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum