Gentoo Archives: gentoo-user

From: Tamer Higazi <th982a@××××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] network do not come up after booting, only manual reloading (systemd-networkd)
Date: Mon, 06 Sep 2021 19:46:03
Message-Id: ce16abcd-5be7-4f00-a3a5-2661f12d05f5@googlemail.com
In Reply to: Re: [gentoo-user] network do not come up after booting, only manual reloading (systemd-networkd) by "Canek Peláez Valdés"
1 Dear Dr. Valdés,
2
3 /etc/systemd/network/20-wirded.network:
4
5 [Match]
6 Name=enp6s0
7
8 [Network]
9 Address=192.168.0.50/24
10 Gateway=192.168.0.1
11
12 DNS=192.168.0.1
13
14 for enp7s0 there is no other network file.
15
16 /etc/systemd/networkd.conf:
17
18 [Network]
19 #SpeedMeter=no
20 #SpeedMeterIntervalSec=10sec
21 #ManageForeignRoutingPolicyRules=yes
22 #ManageForeignRoutes=yes
23 #RouteTable=
24
25 [DHCPv4]
26 #DUIDType=vendor
27 #DUIDRawData=
28
29 [DHCPv6]
30 #DUIDType=vendor
31 #DUIDRawData=
32
33 remained untouched.
34
35
36 I think with THIS systemd version, the whole problem is, that the
37 configuration will be done before the devices are made and renamed to
38 enp6s0 and enp7s0.
39
40 The problem is, how to solve it ....
41
42 Because when I don't do anything by hand, nothing occurs.
43 I believe that the configuration is done before everything is full
44 available.
45 (devices created and renamed ....)
46
47 I think I found the solution to my problem, but don't know how to
48 implement it.
49 systemd-udev-settle.service
50
51 systemctl list-dependencies --after systemd-networkd:
52
53 systemd-networkd.service
54 ● ├─-.mount
55 ● ├─system.slice
56 ● ├─systemd-journald.socket
57 ● ├─systemd-networkd.socket
58 ● ├─systemd-sysctl.service
59 ○ ├─systemd-sysusers.service
60 ○ ├─systemd-udev-settle.service
61 ● ├─systemd-udevd.service
62 ○ └─network-pre.target
63
64 Any further ideas I am thankful.
65
66
67 best, Tamer Higazi
68
69 references: https://github.com/systemd/systemd/issues/7293
70
71 Am 9/5/21 um 9:51 PM schrieb Canek Peláez Valdés:
72 > On Sun, Sep 5, 2021 at 1:36 PM Tamer Higazi <th982a@××××××××××.com
73 > <mailto:th982a@××××××××××.com>> wrote:
74 > [...]
75 >
76 > × systemd-networkd-wait-online.service - Wait for Network to be
77 > Configured
78 >       Loaded: loaded
79 > (/lib/systemd/system/systemd-networkd-wait-online.service; enabled;
80 > vendor preset: disabled)
81 >       Active: failed (Result: exit-code) since Sun 2021-09-05
82 > 20:22:19
83 > CEST; 11min ago
84 >         Docs: man:systemd-networkd-wait-online.service(8)
85 >     Main PID: 984 (code=exited, status=1/FAILURE)
86 >
87 >
88 > Sep 05 20:20:18 tux systemd[1]: Starting Wait for Network to be
89 > Configured...
90 > Sep 05 20:22:19 tux systemd-networkd-wait-online[984]: Timeout
91 > occurred
92 > while waiting for network connectivity.
93 > Sep 05 20:22:19 tux systemd[1]: systemd-networkd-wait-online.service:
94 > Main process exited, code=exited, status=1/FAILURE
95 > Sep 05 20:22:19 tux systemd[1]: systemd-networkd-wait-online.service:
96 > Failed with result 'exit-code'.
97 > Sep 05 20:22:19 tux systemd[1]: Failed to start Wait for Network
98 > to be
99 > Configured.
100 >
101 >
102 > There's your problem: systemd-networkd-wait-online.service is timing out:
103 >
104 > Sep 05 20:22:19 tux systemd-networkd-wait-online[984]: Timeout
105 > occurred while waiting for network connectivity.
106 >
107 > The systemd-networkd-wait-online service runs relatively early and
108 > waits for *ALL* interfaces it is aware of to be fully configured or
109 > failed[1], so it probably one of your interfaces is taking too long to
110 > be ready. Between timing out and you restarting
111 > systemd-networkd.service, the interface reaches the ready state (or
112 > fails), and systemd-networkd-wait-online.service doesn't time out anymore.
113 >
114 > By your logs, you have two ethernet interfaces: enp6s0 and enp7s0, the
115 > latter not in use. Do you .network files in /etc/systemd/network/ or
116 > /run/systemd/network/? Any changes (uncommented lines) in
117 > /etc/systemd/networkd.conf?
118 >
119 > Regards.
120 >
121 > [1]
122 > https://man7.org/linux/man-pages/man8/systemd-networkd-wait-online.8.html
123 > <https://man7.org/linux/man-pages/man8/systemd-networkd-wait-online.8.html>
124 > --
125 > Dr. Canek Peláez Valdés
126 > Profesor de Carrera Asociado C
127 > Departamento de Matemáticas
128 > Facultad de Ciencias
129 > Universidad Nacional Autónoma de México

Replies