1NETWORKD.CONF(5) networkd.conf NETWORKD.CONF(5)
2
3
4
6 networkd.conf, networkd.conf.d - Global Network configuration files
7
9 /etc/systemd/networkd.conf
10
11 /etc/systemd/networkd.conf.d/*.conf
12
13 /usr/lib/systemd/networkd.conf.d/*.conf
14
16 These configuration files control global network parameters. Currently
17 the DHCP Unique Identifier (DUID).
18
20 The default configuration is set during compilation, so configuration
21 is only needed when it is necessary to deviate from those defaults.
22 Initially, the main configuration file in /etc/systemd/ contains
23 commented out entries showing the defaults as a guide to the
24 administrator. Local overrides can be created by editing this file or
25 by creating drop-ins, as described below. Using drop-ins for local
26 configuration is recommended over modifications to the main
27 configuration file.
28
29 In addition to the "main" configuration file, drop-in configuration
30 snippets are read from /usr/lib/systemd/*.conf.d/,
31 /usr/local/lib/systemd/*.conf.d/, and /etc/systemd/*.conf.d/. Those
32 drop-ins have higher precedence and override the main configuration
33 file. Files in the *.conf.d/ configuration subdirectories are sorted by
34 their filename in lexicographic order, regardless of in which of the
35 subdirectories they reside. When multiple files specify the same
36 option, for options which accept just a single value, the entry in the
37 file sorted last takes precedence, and for options which accept a list
38 of values, entries are collected as they occur in the sorted files.
39
40 When packages need to customize the configuration, they can install
41 drop-ins under /usr/. Files in /etc/ are reserved for the local
42 administrator, who may use this logic to override the configuration
43 files installed by vendor packages. Drop-ins have to be used to
44 override package drop-ins, since the main configuration file has lower
45 precedence. It is recommended to prefix all filenames in those
46 subdirectories with a two-digit number and a dash, to simplify the
47 ordering of the files.
48
49 To disable a configuration file supplied by the vendor, the recommended
50 way is to place a symlink to /dev/null in the configuration directory
51 in /etc/, with the same filename as the vendor configuration file.
52
54 The following options are available in the [Network] section:
55
56 SpeedMeter=
57 Takes a boolean. If set to yes, then systemd-networkd measures the
58 traffic of each interface, and networkctl status INTERFACE shows
59 the measured speed. Defaults to no.
60
61 SpeedMeterIntervalSec=
62 Specifies the time interval to calculate the traffic speed of each
63 interface. If SpeedMeter=no, the value is ignored. Defaults to
64 10sec.
65
66 ManageForeignRoutingPolicyRules=
67 A boolean. When true, systemd-networkd will remove rules that are
68 not configured in .network files (except for rules with protocol
69 "kernel"). When false, it will not remove any foreign rules,
70 keeping them even if they are not configured in a .network file.
71 Defaults to yes.
72
73 ManageForeignRoutes=
74 A boolean. When true, systemd-networkd will remove routes that are
75 not configured in .network files (except for routes with protocol
76 "kernel", "dhcp" when KeepConfiguration= is true or "dhcp", and
77 "static" when KeepConfiguration= is true or "static"). When false,
78 it will not remove any foreign routes, keeping them even if they
79 are not configured in a .network file. Defaults to yes.
80
81 RouteTable=
82 Defines the route table name. Takes a whitespace-separated list of
83 the pairs of route table name and number. The route table name and
84 number in each pair are separated with a colon, i.e.,
85 "name:number". The route table name must not be "default", "main",
86 or "local", as these route table names are predefined with route
87 table number 253, 254, and 255, respectively. The route table
88 number must be an integer in the range 1...4294967295. This setting
89 can be specified multiple times. If an empty string is specified,
90 then the list specified earlier are cleared. Defaults to unset.
91
93 This section configures the DHCP Unique Identifier (DUID) value used by
94 DHCP protocol. DHCPv4 client protocol sends IAID and DUID to the DHCP
95 server when acquiring a dynamic IPv4 address if ClientIdentifier=duid.
96 IAID and DUID allows a DHCP server to uniquely identify the machine and
97 the interface requesting a DHCP IP address. To configure IAID and
98 ClientIdentifier, see systemd.network(5).
99
100 The following options are understood:
101
102 DUIDType=
103 Specifies how the DUID should be generated. See RFC 3315[1] for a
104 description of all the options.
105
106 The following values are understood:
107
108 vendor
109 If "DUIDType=vendor", then the DUID value will be generated
110 using "43793" as the vendor identifier (systemd) and hashed
111 contents of machine-id(5). This is the default if DUIDType= is
112 not specified.
113
114 uuid
115 If "DUIDType=uuid", and DUIDRawData= is not set, then the
116 product UUID is used as a DUID value. If a system does not have
117 valid product UUID, then an application-specific machine-id(5)
118 is used as a DUID value. About the application-specific machine
119 ID, see sd_id128_get_machine_app_specific(3).
120
121 link-layer-time[:TIME], link-layer
122 If "link-layer-time" or "link-layer" is specified, then the MAC
123 address of the interface is used as a DUID value. The value
124 "link-layer-time" can take additional time value after a colon,
125 e.g. "link-layer-time:2018-01-23 12:34:56 UTC". The default
126 time value is "2000-01-01 00:00:00 UTC".
127
128 In all cases, DUIDRawData= can be used to override the actual DUID
129 value that is used.
130
131 DUIDRawData=
132 Specifies the DHCP DUID value as a single newline-terminated,
133 hexadecimal string, with each byte separated by ":". The DUID that
134 is sent is composed of the DUID type specified by DUIDType= and the
135 value configured here.
136
137 The DUID value specified here overrides the DUID that systemd-
138 networkd.service(8) generates from the machine ID. To configure
139 DUID per-network, see systemd.network(5). The configured DHCP DUID
140 should conform to the specification in RFC 3315[2], RFC 6355[3]. To
141 configure IAID, see systemd.network(5).
142
143 Example 1. A DUIDType=vendor with a custom value
144
145 DUIDType=vendor
146 DUIDRawData=00:00:ab:11:f9:2a:c2:77:29:f9:5c:00
147
148 This specifies a 14 byte DUID, with the type DUID-EN ("00:02"),
149 enterprise number 43793 ("00:00:ab:11"), and identifier value
150 "f9:2a:c2:77:29:f9:5c:00".
151
153 This section configures the DHCP Unique Identifier (DUID) value used by
154 DHCPv6 protocol. DHCPv6 client protocol sends the DHCP Unique
155 Identifier and the interface Identity Association Identifier (IAID) to
156 a DHCPv6 server when acquiring a dynamic IPv6 address. IAID and DUID
157 allows a DHCPv6 server to uniquely identify the machine and the
158 interface requesting a DHCP IP address. To configure IAID, see
159 systemd.network(5).
160
161 The following options are understood:
162
163 DUIDType=, DUIDRawData=
164 As in the [DHCPv4] section.
165
167 systemd(1), systemd.network(5), systemd-networkd.service(8), machine-
168 id(5), sd_id128_get_machine_app_specific(3)
169
171 1. RFC 3315
172 https://tools.ietf.org/html/rfc3315#section-9
173
174 2. RFC 3315
175 http://tools.ietf.org/html/rfc3315#section-9
176
177 3. RFC 6355
178 http://tools.ietf.org/html/rfc6355
179
180
181
182systemd 253 NETWORKD.CONF(5)