| 1 |
'\" t |
| 2 |
.TH "NETWORKD\&.CONF" "5" "" "systemd 257.13" "networkd.conf" |
| 3 |
.\" ----------------------------------------------------------------- |
| 4 |
.\" * Define some portability stuff |
| 5 |
.\" ----------------------------------------------------------------- |
| 6 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 7 |
.\" http://bugs.debian.org/507673 |
| 8 |
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html |
| 9 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 10 |
.ie \n(.g .ds Aq \(aq |
| 11 |
.el .ds Aq ' |
| 12 |
.\" ----------------------------------------------------------------- |
| 13 |
.\" * set default formatting |
| 14 |
.\" ----------------------------------------------------------------- |
| 15 |
.\" disable hyphenation |
| 16 |
.nh |
| 17 |
.\" disable justification (adjust text to left margin only) |
| 18 |
.ad l |
| 19 |
.\" ----------------------------------------------------------------- |
| 20 |
.\" * MAIN CONTENT STARTS HERE * |
| 21 |
.\" ----------------------------------------------------------------- |
| 22 |
.SH "NAME" |
| 23 |
networkd.conf, networkd.conf.d \- Global Network configuration files |
| 24 |
.SH "SYNOPSIS" |
| 25 |
.PP |
| 26 |
.RS 4 |
| 27 |
/etc/systemd/networkd\&.conf |
| 28 |
.RE |
| 29 |
.RS 4 |
| 30 |
/run/systemd/networkd\&.conf |
| 31 |
.RE |
| 32 |
.RS 4 |
| 33 |
/usr/local/lib/systemd/networkd\&.conf |
| 34 |
.RE |
| 35 |
.RS 4 |
| 36 |
/usr/lib/systemd/networkd\&.conf |
| 37 |
.RE |
| 38 |
.RS 4 |
| 39 |
/etc/systemd/networkd\&.conf\&.d/*\&.conf |
| 40 |
.RE |
| 41 |
.RS 4 |
| 42 |
/run/systemd/networkd\&.conf\&.d/*\&.conf |
| 43 |
.RE |
| 44 |
.RS 4 |
| 45 |
/usr/local/lib/systemd/networkd\&.conf\&.d/*\&.conf |
| 46 |
.RE |
| 47 |
.RS 4 |
| 48 |
/usr/lib/systemd/networkd\&.conf\&.d/*\&.conf |
| 49 |
.RE |
| 50 |
.SH "DESCRIPTION" |
| 51 |
.PP |
| 52 |
These configuration files control global network parameters\&. |
| 53 |
.SH "CONFIGURATION DIRECTORIES AND PRECEDENCE" |
| 54 |
.PP |
| 55 |
The default configuration is set during compilation, so configuration is only needed when it is necessary to deviate from those defaults\&. The main configuration file is loaded from one of the listed directories in order of priority, only the first file found is used: |
| 56 |
/etc/systemd/, |
| 57 |
/run/systemd/, |
| 58 |
/usr/local/lib/systemd/ |
| 59 |
\&\s-2\u[1]\d\s+2, |
| 60 |
/usr/lib/systemd/\&. The vendor version of the file contains commented out entries showing the defaults as a guide to the administrator\&. Local overrides can also be created by creating drop\-ins, as described below\&. The main configuration file can also be edited for this purpose (or a copy in |
| 61 |
/etc/ |
| 62 |
if it is shipped under |
| 63 |
/usr/), however using drop\-ins for local configuration is recommended over modifications to the main configuration file\&. |
| 64 |
.PP |
| 65 |
In addition to the main configuration file, drop\-in configuration snippets are read from |
| 66 |
/usr/lib/systemd/*\&.conf\&.d/, |
| 67 |
/usr/local/lib/systemd/*\&.conf\&.d/, and |
| 68 |
/etc/systemd/*\&.conf\&.d/\&. Those drop\-ins have higher precedence and override the main configuration file\&. Files in the |
| 69 |
*\&.conf\&.d/ |
| 70 |
configuration subdirectories are sorted by their filename in lexicographic order, regardless of in which of the subdirectories they reside\&. When multiple files specify the same option, for options which accept just a single value, the entry in the file sorted last takes precedence, and for options which accept a list of values, entries are collected as they occur in the sorted files\&. |
| 71 |
.PP |
| 72 |
When packages need to customize the configuration, they can install drop\-ins under |
| 73 |
/usr/\&. Files in |
| 74 |
/etc/ |
| 75 |
are reserved for the local administrator, who may use this logic to override the configuration files installed by vendor packages\&. Drop\-ins have to be used to override package drop\-ins, since the main configuration file has lower precedence\&. It is recommended to prefix all filenames in those subdirectories with a two\-digit number and a dash, to simplify the ordering\&. This also defines a concept of drop\-in priorities to allow OS vendors to ship drop\-ins within a specific range lower than the range used by users\&. This should lower the risk of package drop\-ins overriding accidentally drop\-ins defined by users\&. It is recommended to use the range 10\-40 for drop\-ins in |
| 76 |
/usr/ |
| 77 |
and the range 60\-90 for drop\-ins in |
| 78 |
/etc/ |
| 79 |
and |
| 80 |
/run/, to make sure that local and transient drop\-ins take priority over drop\-ins shipped by the OS vendor\&. |
| 81 |
.PP |
| 82 |
To disable a configuration file supplied by the vendor, the recommended way is to place a symlink to |
| 83 |
/dev/null |
| 84 |
in the configuration directory in |
| 85 |
/etc/, with the same filename as the vendor configuration file\&. |
| 86 |
.SH "[NETWORK] SECTION OPTIONS" |
| 87 |
.PP |
| 88 |
The following options are available in the [Network] section: |
| 89 |
.PP |
| 90 |
\fISpeedMeter=\fR |
| 91 |
.RS 4 |
| 92 |
Takes a boolean\&. If set to yes, then |
| 93 |
\fBsystemd\-networkd\fR |
| 94 |
measures the traffic of each interface, and |
| 95 |
\fBnetworkctl status \fR\fB\fIINTERFACE\fR\fR |
| 96 |
shows the measured speed\&. Defaults to no\&. |
| 97 |
.sp |
| 98 |
Added in version 244\&. |
| 99 |
.RE |
| 100 |
.PP |
| 101 |
\fISpeedMeterIntervalSec=\fR |
| 102 |
.RS 4 |
| 103 |
Specifies the time interval to calculate the traffic speed of each interface\&. If |
| 104 |
\fISpeedMeter=no\fR, the value is ignored\&. Defaults to 10sec\&. |
| 105 |
.sp |
| 106 |
Added in version 244\&. |
| 107 |
.RE |
| 108 |
.PP |
| 109 |
\fIManageForeignRoutingPolicyRules=\fR |
| 110 |
.RS 4 |
| 111 |
A boolean\&. When true, |
| 112 |
\fBsystemd\-networkd\fR |
| 113 |
will remove rules that are not configured in \&.network files (except for rules with protocol |
| 114 |
"kernel")\&. When false, it will not remove any foreign rules, keeping them even if they are not configured in a \&.network file\&. Defaults to yes\&. |
| 115 |
.sp |
| 116 |
Added in version 249\&. |
| 117 |
.RE |
| 118 |
.PP |
| 119 |
\fIManageForeignRoutes=\fR |
| 120 |
.RS 4 |
| 121 |
A boolean\&. When true, |
| 122 |
\fBsystemd\-networkd\fR |
| 123 |
will remove routes that are not configured in \&.network files (except for routes with protocol |
| 124 |
"kernel", |
| 125 |
"dhcp" |
| 126 |
when |
| 127 |
\fIKeepConfiguration=\fR |
| 128 |
is true or |
| 129 |
"dhcp", and |
| 130 |
"static" |
| 131 |
when |
| 132 |
\fIKeepConfiguration=\fR |
| 133 |
is true or |
| 134 |
"static")\&. When false, it will not remove any foreign routes, keeping them even if they are not configured in a \&.network file\&. Defaults to yes\&. |
| 135 |
.sp |
| 136 |
Added in version 246\&. |
| 137 |
.RE |
| 138 |
.PP |
| 139 |
\fIManageForeignNextHops=\fR |
| 140 |
.RS 4 |
| 141 |
A boolean\&. When true, |
| 142 |
\fBsystemd\-networkd\fR |
| 143 |
will remove nexthops that are not configured in \&.network files (except for routes with protocol |
| 144 |
"kernel")\&. When false, it will not remove any foreign nexthops, keeping them even if they are not configured in a \&.network file\&. Defaults to yes\&. |
| 145 |
.sp |
| 146 |
Added in version 256\&. |
| 147 |
.RE |
| 148 |
.PP |
| 149 |
\fIRouteTable=\fR |
| 150 |
.RS 4 |
| 151 |
Defines the route table name\&. Takes a whitespace\-separated list of the pairs of route table name and number\&. The route table name and number in each pair are separated with a colon, i\&.e\&., |
| 152 |
"\fIname\fR:\fInumber\fR"\&. The route table name must not be |
| 153 |
"default", |
| 154 |
"main", or |
| 155 |
"local", as these route table names are predefined with route table number 253, 254, and 255, respectively\&. The route table number must be an integer in the range 1\&...4294967295, except for predefined numbers 253, 254, and 255\&. This setting can be specified multiple times\&. If an empty string is specified, then the list specified earlier are cleared\&. Defaults to unset\&. |
| 156 |
.sp |
| 157 |
Added in version 248\&. |
| 158 |
.RE |
| 159 |
.PP |
| 160 |
\fIIPv4Forwarding=\fR |
| 161 |
.RS 4 |
| 162 |
Configures IPv4 packet forwarding for the system\&. Takes a boolean value\&. This controls the |
| 163 |
net\&.ipv4\&.conf\&.default\&.forwarding |
| 164 |
and |
| 165 |
net\&.ipv4\&.conf\&.all\&.forwarding |
| 166 |
sysctl options\&. See |
| 167 |
\m[blue]\fBIP Sysctl\fR\m[]\&\s-2\u[2]\d\s+2 |
| 168 |
for more details about the sysctl options\&. Defaults to unset and the sysctl options will not be changed\&. |
| 169 |
.sp |
| 170 |
If an interface is configured with a \&.network file that enables |
| 171 |
\fIIPMasquerade=\fR |
| 172 |
for IPv4 (that is, |
| 173 |
"ipv4" |
| 174 |
or |
| 175 |
"both"), this setting is implied unless explicitly specified\&. See |
| 176 |
\fIIPMasquerade=\fR |
| 177 |
in |
| 178 |
\fBsystemd.network\fR(5) |
| 179 |
for more details\&. |
| 180 |
.sp |
| 181 |
Added in version 256\&. |
| 182 |
.RE |
| 183 |
.PP |
| 184 |
\fIIPv6Forwarding=\fR |
| 185 |
.RS 4 |
| 186 |
Configures IPv6 packet forwarding for the system\&. Takes a boolean value\&. This controls the |
| 187 |
net\&.ipv6\&.conf\&.default\&.forwarding |
| 188 |
and |
| 189 |
net\&.ipv6\&.conf\&.all\&.forwarding |
| 190 |
sysctl options\&. See |
| 191 |
\m[blue]\fBIP Sysctl\fR\m[]\&\s-2\u[2]\d\s+2 |
| 192 |
for more details about the sysctl options\&. Defaults to unset and the sysctl options will not be changed\&. |
| 193 |
.sp |
| 194 |
If an interface is configured with a \&.network file that enables |
| 195 |
\fIIPMasquerade=\fR |
| 196 |
for IPv6 (that is, |
| 197 |
"ipv6" |
| 198 |
or |
| 199 |
"both"), this setting is implied unless explicitly specified\&. See |
| 200 |
\fIIPMasquerade=\fR |
| 201 |
in |
| 202 |
\fBsystemd.network\fR(5) |
| 203 |
for more details\&. |
| 204 |
.sp |
| 205 |
Added in version 256\&. |
| 206 |
.RE |
| 207 |
.PP |
| 208 |
\fIIPv6PrivacyExtensions=\fR |
| 209 |
.RS 4 |
| 210 |
Specifies the default value for per\-network |
| 211 |
\fIIPv6PrivacyExtensions=\fR\&. Takes a boolean or the special values |
| 212 |
"prefer\-public" |
| 213 |
and |
| 214 |
"kernel"\&. See for details in |
| 215 |
\fBsystemd.network\fR(5)\&. Defaults to |
| 216 |
"no"\&. |
| 217 |
.sp |
| 218 |
Added in version 254\&. |
| 219 |
.RE |
| 220 |
.PP |
| 221 |
\fIUseDomains=\fR |
| 222 |
.RS 4 |
| 223 |
Specifies the network\- and protocol\-independent default value for the same settings in [IPv6AcceptRA], [DHCPv4], and [DHCPv6] sections below\&. Takes a boolean, or the special value |
| 224 |
\fBroute\fR\&. See the same setting in |
| 225 |
\fBsystemd.network\fR(5)\&. Defaults to |
| 226 |
"no"\&. |
| 227 |
.sp |
| 228 |
Added in version 256\&. |
| 229 |
.RE |
| 230 |
.SH "[IPV6ACCEPTRA] SECTION OPTIONS" |
| 231 |
.PP |
| 232 |
This section configures the default setting of the Neighbor Discovery\&. The following options are available in the [IPv6AcceptRA] section: |
| 233 |
.PP |
| 234 |
\fIUseDomains=\fR |
| 235 |
.RS 4 |
| 236 |
Specifies the network\-independent default value for the same setting in the [IPv6AcceptRA] section in |
| 237 |
\fBsystemd.network\fR(5)\&. Takes a boolean, or the special value |
| 238 |
\fBroute\fR\&. When unspecified, the value specified in the [Network] section in |
| 239 |
\fBnetworkd.conf\fR(5), which defaults to |
| 240 |
"no", will be used\&. |
| 241 |
.sp |
| 242 |
Added in version 256\&. |
| 243 |
.RE |
| 244 |
.SH "[IPV6ADDRESSLABEL] SECTION OPTIONS" |
| 245 |
.PP |
| 246 |
An [IPv6AddressLabel] section accepts the following keys\&. Specify multiple [IPv6AddressLabel] sections to configure multiple address labels\&. IPv6 address labels are used for address selection\&. See |
| 247 |
\m[blue]\fBRFC 3484\fR\m[]\&\s-2\u[3]\d\s+2\&. Precedence is managed by userspace, and only the label itself is stored in the kernel\&. |
| 248 |
.PP |
| 249 |
\fILabel=\fR |
| 250 |
.RS 4 |
| 251 |
The label for the prefix, an unsigned integer in the range 0\&...4294967294\&. 0xffffffff is reserved\&. This setting is mandatory\&. |
| 252 |
.sp |
| 253 |
Added in version 257\&. |
| 254 |
.RE |
| 255 |
.PP |
| 256 |
\fIPrefix=\fR |
| 257 |
.RS 4 |
| 258 |
IPv6 prefix is an address with a prefix length, separated by a slash |
| 259 |
"/" |
| 260 |
character\&. This setting is mandatory\&. |
| 261 |
.sp |
| 262 |
Added in version 257\&. |
| 263 |
.RE |
| 264 |
.SH "[DHCPV4] SECTION OPTIONS" |
| 265 |
.PP |
| 266 |
This section configures the DHCP Unique Identifier (DUID) value used by DHCP protocol\&. DHCPv4 client protocol sends IAID and DUID to the DHCP server when acquiring a dynamic IPv4 address if |
| 267 |
\fBClientIdentifier=duid\fR\&. IAID and DUID allows a DHCP server to uniquely identify the machine and the interface requesting a DHCP IP address\&. To configure IAID and ClientIdentifier, see |
| 268 |
\fBsystemd.network\fR(5)\&. |
| 269 |
.PP |
| 270 |
The following options are understood: |
| 271 |
.PP |
| 272 |
\fIDUIDType=\fR |
| 273 |
.RS 4 |
| 274 |
Specifies how the DUID should be generated\&. See |
| 275 |
\m[blue]\fBRFC 3315\fR\m[]\&\s-2\u[4]\d\s+2 |
| 276 |
for a description of all the options\&. |
| 277 |
.sp |
| 278 |
This takes an integer in the range 0\&...65535, or one of the following string values: |
| 279 |
.PP |
| 280 |
\fBvendor\fR |
| 281 |
.RS 4 |
| 282 |
If |
| 283 |
"DUIDType=vendor", then the DUID value will be generated using |
| 284 |
"43793" |
| 285 |
as the vendor identifier (systemd) and hashed contents of |
| 286 |
\fBmachine-id\fR(5)\&. This is the default if |
| 287 |
\fIDUIDType=\fR |
| 288 |
is not specified\&. |
| 289 |
.sp |
| 290 |
Added in version 230\&. |
| 291 |
.RE |
| 292 |
.PP |
| 293 |
\fBuuid\fR |
| 294 |
.RS 4 |
| 295 |
If |
| 296 |
"DUIDType=uuid", and |
| 297 |
\fIDUIDRawData=\fR |
| 298 |
is not set, then the product UUID is used as a DUID value\&. If a system does not have valid product UUID, then an application\-specific |
| 299 |
\fBmachine-id\fR(5) |
| 300 |
is used as a DUID value\&. About the application\-specific machine ID, see |
| 301 |
\fBsd_id128_get_machine_app_specific\fR(3)\&. |
| 302 |
.sp |
| 303 |
Added in version 230\&. |
| 304 |
.RE |
| 305 |
.PP |
| 306 |
\fBlink\-layer\-time[:\fR\fB\fITIME\fR\fR\fB]\fR, \fBlink\-layer\fR |
| 307 |
.RS 4 |
| 308 |
If |
| 309 |
"link\-layer\-time" |
| 310 |
or |
| 311 |
"link\-layer" |
| 312 |
is specified, then the MAC address of the interface is used as a DUID value\&. The value |
| 313 |
"link\-layer\-time" |
| 314 |
can take additional time value after a colon, e\&.g\&. |
| 315 |
"link\-layer\-time:2018\-01\-23 12:34:56 UTC"\&. The default time value is |
| 316 |
"2000\-01\-01 00:00:00 UTC"\&. |
| 317 |
.sp |
| 318 |
Added in version 240\&. |
| 319 |
.RE |
| 320 |
.sp |
| 321 |
In all cases, |
| 322 |
\fIDUIDRawData=\fR |
| 323 |
can be used to override the actual DUID value that is used\&. |
| 324 |
.sp |
| 325 |
Added in version 230\&. |
| 326 |
.RE |
| 327 |
.PP |
| 328 |
\fIDUIDRawData=\fR |
| 329 |
.RS 4 |
| 330 |
Specifies the DHCP DUID value as a single newline\-terminated, hexadecimal string, with each byte separated by |
| 331 |
":"\&. The DUID that is sent is composed of the DUID type specified by |
| 332 |
\fIDUIDType=\fR |
| 333 |
and the value configured here\&. |
| 334 |
.sp |
| 335 |
The DUID value specified here overrides the DUID that |
| 336 |
\fBsystemd-networkd.service\fR(8) |
| 337 |
generates from the machine ID\&. To configure DUID per\-network, see |
| 338 |
\fBsystemd.network\fR(5)\&. The configured DHCP DUID should conform to the specification in |
| 339 |
\m[blue]\fBRFC 3315\fR\m[]\&\s-2\u[5]\d\s+2, |
| 340 |
\m[blue]\fBRFC 6355\fR\m[]\&\s-2\u[6]\d\s+2\&. To configure IAID, see |
| 341 |
\fBsystemd.network\fR(5)\&. |
| 342 |
.PP |
| 343 |
\fBExample\ \&1.\ \&A DUIDType=vendor with a custom value\fR |
| 344 |
.sp |
| 345 |
.if n \{\ |
| 346 |
.RS 4 |
| 347 |
.\} |
| 348 |
.nf |
| 349 |
DUIDType=vendor |
| 350 |
DUIDRawData=00:00:ab:11:f9:2a:c2:77:29:f9:5c:00 |
| 351 |
.fi |
| 352 |
.if n \{\ |
| 353 |
.RE |
| 354 |
.\} |
| 355 |
.sp |
| 356 |
This specifies a 14 byte DUID, with the type DUID\-EN ("00:02"), enterprise number 43793 ("00:00:ab:11"), and identifier value |
| 357 |
"f9:2a:c2:77:29:f9:5c:00"\&. |
| 358 |
|
| 359 |
Added in version 230\&. |
| 360 |
.RE |
| 361 |
.PP |
| 362 |
\fIUseDomains=\fR |
| 363 |
.RS 4 |
| 364 |
Same as the one in the [IPv6AcceptRA] section, but applied for DHCPv4 protocol\&. |
| 365 |
.sp |
| 366 |
Added in version 256\&. |
| 367 |
.RE |
| 368 |
.SH "[DHCPV6] SECTION OPTIONS" |
| 369 |
.PP |
| 370 |
This section configures the DHCP Unique Identifier (DUID) value used by DHCPv6 protocol\&. DHCPv6 client protocol sends the DHCP Unique Identifier and the interface Identity Association Identifier (IAID) to a DHCPv6 server when acquiring a dynamic IPv6 address\&. IAID and DUID allows a DHCPv6 server to uniquely identify the machine and the interface requesting a DHCP IP address\&. To configure IAID, see |
| 371 |
\fBsystemd.network\fR(5)\&. |
| 372 |
.PP |
| 373 |
The following options are understood: |
| 374 |
.PP |
| 375 |
\fIDUIDType=\fR, \fIDUIDRawData=\fR |
| 376 |
.RS 4 |
| 377 |
As in the [DHCPv4] section\&. |
| 378 |
.sp |
| 379 |
Added in version 249\&. |
| 380 |
.RE |
| 381 |
.PP |
| 382 |
\fIUseDomains=\fR |
| 383 |
.RS 4 |
| 384 |
As in the [DHCPv4] section\&. |
| 385 |
.sp |
| 386 |
Added in version 256\&. |
| 387 |
.RE |
| 388 |
.SH "[DHCPSERVER] SECTION OPTIONS" |
| 389 |
.PP |
| 390 |
This section configures the default setting of the DHCP server\&. The following options are available in the [DHCPServer] section: |
| 391 |
.PP |
| 392 |
\fIPersistLeases=\fR |
| 393 |
.RS 4 |
| 394 |
Specifies the default value for per\-network |
| 395 |
\fIPersistLeases=\fR\&. Takes a boolean\&. See for details in |
| 396 |
\fBsystemd.network\fR(5)\&. Defaults to |
| 397 |
"yes"\&. |
| 398 |
.sp |
| 399 |
Added in version 256\&. |
| 400 |
.RE |
| 401 |
.SH "SEE ALSO" |
| 402 |
.PP |
| 403 |
\fBsystemd\fR(1), \fBsystemd.network\fR(5), \fBsystemd-networkd.service\fR(8), \fBmachine-id\fR(5), \fBsd_id128_get_machine_app_specific\fR(3) |
| 404 |
.SH "NOTES" |
| 405 |
.IP " 1." 4 |
| 406 |
💣💥🧨💥💥💣 Please note that those configuration files must be available at all times. If |
| 407 |
/usr/local/ |
| 408 |
is a separate partition, it may not be available during early boot, and must not be used for configuration. |
| 409 |
.IP " 2." 4 |
| 410 |
IP Sysctl |
| 411 |
.RS 4 |
| 412 |
\%https://docs.kernel.org/networking/ip-sysctl.html |
| 413 |
.RE |
| 414 |
.IP " 3." 4 |
| 415 |
RFC 3484 |
| 416 |
.RS 4 |
| 417 |
\%https://tools.ietf.org/html/rfc3484 |
| 418 |
.RE |
| 419 |
.IP " 4." 4 |
| 420 |
RFC 3315 |
| 421 |
.RS 4 |
| 422 |
\%https://tools.ietf.org/html/rfc3315#section-9 |
| 423 |
.RE |
| 424 |
.IP " 5." 4 |
| 425 |
RFC 3315 |
| 426 |
.RS 4 |
| 427 |
\%http://tools.ietf.org/html/rfc3315#section-9 |
| 428 |
.RE |
| 429 |
.IP " 6." 4 |
| 430 |
RFC 6355 |
| 431 |
.RS 4 |
| 432 |
\%http://tools.ietf.org/html/rfc6355 |
| 433 |
.RE |