Gentoo Archives: gentoo-user

From: n952162 <n952162@×××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] static addr in /etc/conf.d/net ignored, dhcp used. dhcpcd crashes when forced
Date: Mon, 19 Aug 2019 19:47:24
Message-Id: 30129e88-37b8-170b-26e5-f385329c71c0@web.de
In Reply to: [gentoo-user] static addr in /etc/conf.d/net ignored, dhcp used. dhcpcd crashes when forced by n952162
1 I just ran into this, from  https://wiki.gentoo.org/wiki/Dhcpcd
2
3
4 /Static IP addresses/
5
6 //
7
8 /In case the network interface card should be configured with a
9 //static IP address <https://wiki.gentoo.org/wiki/Static_Routing>//,
10 add their data to ///etc/dhcpcd.conf//.//^[1]
11 <https://wiki.gentoo.org/wiki/Dhcpcd#cite_note-manpage-1> //The
12 following is an example of manually adding a static address, routes,
13 and DNS by editing DHCPCD's configuration file using a text editor
14 of choice: /
15
16 //
17 /FILE////*|/etc/dhcpcd.conf|*//**/
18
19 /static ip_address=192.168.0.10/24/
20
21
22 (haven't tried it yet, my system is busy right now).
23
24 So, what is /etc/conf.d/net for?  What programs read it?
25
26
27
28
29 On 08/19/19 20:11, n952162 wrote:
30 >
31 > My eth0/enp2s0 network adapter is configured so:
32 >
33 > $ cat /etc/conf.d/net
34 >
35 > config_enp2s0="192.168.179.20/24"
36 >
37 > but on boot, I get a bonjour address:
38 >
39 > enp2s0    Link encap:Ethernet  HWaddr 48:BA:4E:29:99:9E
40 >           inet addr:*169.254.71.117 * Bcast:169.254.255.255 
41 > Mask:255.255.0.0
42 >
43 > if I restart the service immediately after boot, nothing much happens,
44 > I still get the bonjour address.
45 >
46 > sudo rc-service net.enp2s0 restart
47 >
48 > Incidently, dhcpcd is still running at this point.
49 >
50 > But after a couple of tries:
51 >
52 > sudo rc-service net.enp2s0 restart
53 >
54 > and then I get my connection:
55 >
56 > $ ifconfig
57 > enp2s0    Link encap:Ethernet  HWaddr 48:BA:4E:29:99:9E
58 >           inet addr:*192.168.179.20* Bcast:192.168.179.255 
59 > Mask:255.255.255.0
60 >
61 > And:
62 >
63 > $ sudo rc-service dhcpcd status
64 >  * status: *crashed*
65 >
66 > From /var/log/syslog:
67 >
68 > [  260.895907] dhcpcd[6664]: segfault at 400a00000000 ip
69 > 0000560edbf464bd sp 00007ffe06bf4f10 error 4 in
70 > dhcpcd[560edbf23000+46000]*
71 >
72 > *
73 >
74 > Why does dhcpcd think it can configure my interface and what's the
75 > connection between /etc/conf.d/net and dhcpcd?
76 >
77 >
78 >