1 # SPDX-License-Identifier: LGPL-2.1-or-later
3 # This file is part of systemd.
5 # systemd is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU Lesser General Public License as published by
7 # the Free Software Foundation; either version 2.1 of the License, or
8 # (at your option) any later version.
11 Description=Network Configuration
12 Documentation=man:systemd-networkd.service(8)
13 Documentation=man:org.freedesktop.network1(5)
14 ConditionCapability=CAP_NET_ADMIN
15 DefaultDependencies=no
16 # systemd-udevd.service can be dropped once tuntap is moved to netlink
17 After=systemd-networkd.socket systemd-udevd.service network-pre.target systemd-sysusers.service systemd-sysctl.service
18 Before=network.target multi-user.target shutdown.target initrd-switch-root.target
19 Conflicts=shutdown.target initrd-switch-root.target
20 Wants=systemd-networkd.socket network.target
23 AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW
24 BusName=org.freedesktop.network1
25 CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW
27 ExecStart=!!{{ROOTLIBEXECDIR}}/systemd-networkd
28 FileDescriptorStoreMax=512
30 MemoryDenyWriteExecute=yes
34 ProtectControlGroups=yes
37 ProtectKernelModules=yes
40 RestartKillSignal=SIGUSR2
42 RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6 AF_PACKET
43 RestrictNamespaces=yes
46 RuntimeDirectory=systemd/netif
47 RuntimeDirectoryPreserve=yes
48 SystemCallArchitectures=native
49 SystemCallErrorNumber=EPERM
50 SystemCallFilter=@system-service
56 WantedBy=multi-user.target
57 Also=systemd-networkd.socket
58 Alias=dbus-org.freedesktop.network1.service
60 # The output from this generator is used by udevd and networkd. Enable it by
61 # default when enabling systemd-networkd.service.
62 Also=systemd-network-generator.service
64 # We want to enable systemd-networkd-wait-online.service whenever this service
65 # is enabled. systemd-networkd-wait-online.service has
66 # WantedBy=network-online.target, so enabling it only has an effect if
67 # network-online.target itself is enabled or pulled in by some other unit.
68 Also=systemd-networkd-wait-online.service