Re: dhcpcd changed behavior after upgrading to kernel 3.18
Roy Marples
Thu Jan 22 20:15:14 2015
Hi Giorgio
On Thursday 22 Jan 2015 09:55:39 iw3gtf@xxxxxxxxxx wrote:
> Hi all,
>
> I use dhcpcd 6.6.x in some network configuration scripts also to
> configure static addresses, with the cmdline option '-S
> ip_address=.../...'.
>
> I also found it very handy to use different labels for the network
> device
> to be able to configure/unconfigure different addresses on the same
> device
> as in the following example:
>
> # dhcpcd -S ip_address=192.168.0.10/24 eth0:static
> # dhcpcd -S ip_address=10.1.2.3/8 eth0:factory
> ...
Well, that *is* an interesting use of dhcpcd :)
In would recommend using the -4 flag will all of them bar one, otherwise you
will get IPv6 autoconf running on each of them which would be .....
interesting. I really don't know how that would work out - it might work, it
might go tits up.
>
> these commands run in the background until I decide to unconfigure
> one of them with:
>
> # dhcpcd -k eth0:factory
>
> This only remove the factory ip without affecting the other.
>
> Now, after upgrading the linux kernel to v3.18.x these commands
> don't work anymore:
>
> # dhcpcd -d -S ip_address=192.168.0.10/24 eth0:static
> dhcpcd[26781]: version 6.6.7 starting
> dhcpcd[26781]: /proc/sys/net/ipv6/conf/eth0:factory/accept_ra: No such
> file or directory
> dhcpcd[26781]: eth0:factory: adding address fe80::5ece:4894:34ea:7bcb
> dhcpcd[26781]: eth0:factory: pltime infinity, vltime infinity
> dhcpcd[26781]: eth0:factory: executing `/lib/dhcpcd/dhcpcd-run-hooks'
> PREINIT
> dhcpcd[26781]: eth0:factory: executing `/lib/dhcpcd/dhcpcd-run-hooks'
> CARRIER
> dhcpcd[26781]: DUID 00:01:00:01:1b:8d:cc:38:00:22:3f:e1:1a:31
> dhcpcd[26781]: eth0:factory: IAID c5:07:00:a5
> dhcpcd[26781]: eth0:factory: delaying IPv4 for 0.1 seconds
> dhcpcd[26781]: eth0:factory: interface departed
> dhcpcd[26781]: eth0:factory: removing interface
> dhcpcd[26781]: eth0:factory: deleting address fe80::5ece:4894:34ea:7bcb
> dhcpcd[26781]: eth0:factory: executing `/lib/dhcpcd/dhcpcd-run-hooks'
> DEPARTED
> dhcpcd[26781]: exited
>
> After some try and fails I found that this is due to the ipv6 part of
> the command,
> if I just request an ipv4 address it works as expected:
>
> # dhcpcd -d -4 -S ip_address=192.168.0.10/24 eth0:factory
> dhcpcd[27095]: version 6.6.7 starting
> dhcpcd[27095]: eth0:factory: executing `/lib/dhcpcd/dhcpcd-run-hooks'
> PREINIT
> dhcpcd[27095]: eth0:factory: executing `/lib/dhcpcd/dhcpcd-run-hooks'
> CARRIER
> dhcpcd[27095]: DUID 00:01:00:01:1b:8d:cc:38:00:22:3f:e1:1a:31
> dhcpcd[27095]: eth0:factory: IAID c5:07:00:a5
> dhcpcd[27095]: eth0:factory: delaying IPv4 for 0.3 seconds
> dhcpcd[27095]: eth0:factory: using static address 192.168.0.10/24
> dhcpcd[27095]: eth0:factory: adding IP address 192.168.0.10/24
> dhcpcd[27095]: eth0:factory: adding route to 192.168.0.0/24
> dhcpcd[27095]: eth0:factory: executing `/lib/dhcpcd/dhcpcd-run-hooks'
> STATIC
> dhcpcd[27095]: forking to background
> dhcpcd[27095]: forked to background, child pid 27123
> # ip a
> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
> group default
> link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
> inet 127.0.0.1/8 scope host lo
> valid_lft forever preferred_lft forever
> inet6 ::1/128 scope host
> valid_lft forever preferred_lft forever
> 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
> state UP group default qlen 1000
> link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
> inet 10.0.0.54/8 brd 10.255.255.255 scope global eth0
> valid_lft forever preferred_lft forever
> inet 192.168.0.10/24 brd 192.168.0.255 scope global eth0:factory
> valid_lft forever preferred_lft forever
> inet6 fe80::203:c5ff:fe07:a5/64 scope link
> valid_lft forever preferred_lft forever
>
>
> Moreover, if I just use 'eth0' as the net device, without the label
> ':factory'
> it works again as expected:
>
> # dhcpcd -d -S ip_address=192.168.0.10/24 eth0
> dhcpcd[28154]: version 6.6.7 starting
> dhcpcd[28154]: eth0: disabling kernel IPv6 RA support
> dhcpcd[28154]: eth0: executing `/lib/dhcpcd/dhcpcd-run-hooks' PREINIT
> dhcpcd[28154]: eth0: executing `/lib/dhcpcd/dhcpcd-run-hooks' CARRIER
> dhcpcd[28154]: DUID 00:01:00:01:1b:8d:cc:38:00:22:3f:e1:1a:31
> dhcpcd[28154]: eth0: IAID c5:07:00:a5
> dhcpcd[28154]: eth0: delaying IPv6 router solicitation for 0.7 seconds
> dhcpcd[28154]: eth0: delaying IPv4 for 0.5 seconds
> dhcpcd[28154]: eth0: using static address 192.168.0.10/24
> dhcpcd[28154]: eth0: adding IP address 192.168.0.10/24
> dhcpcd[28154]: eth0: adding route to 192.168.0.0/24
> dhcpcd[28154]: eth0: executing `/lib/dhcpcd/dhcpcd-run-hooks' STATIC
> dhcpcd[28154]: forking to background
> dhcpcd[28154]: forked to background, child pid 28176
> # ip a
> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
> group default
> link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
> inet 127.0.0.1/8 scope host lo
> valid_lft forever preferred_lft forever
> inet6 ::1/128 scope host
> valid_lft forever preferred_lft forever
> 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
> state UP group default qlen 1000
> link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
> inet 10.0.0.54/8 brd 10.255.255.255 scope global eth0
> valid_lft forever preferred_lft forever
> inet 192.168.0.10/24 brd 192.168.0.255 scope global eth0
> valid_lft forever preferred_lft forever
> inet6 fe80::203:c5ff:fe07:a5/64 scope link
> valid_lft forever preferred_lft forever
>
> Does someone also experience the same problems ?
Fixed here:
http://roy.marples.name/projects/dhcpcd/info/6f030781cf1d89f5962f84392adf48f4a1093bc2
Thanks
Roy
Archive administrator: postmaster@marples.name