1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277
|
'\" t
.TH "SYSTEMD\&.LINK" "5" "" "systemd 215" "systemd.link"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
systemd.link \- Network device configuration
.SH "SYNOPSIS"
.PP
\fIlink\fR\&.link
.SH "DESCRIPTION"
.PP
Network link configuration is performed by the
\fBnet_setup_link\fR
udev builtin\&.
.PP
The link files are read from the files located in the system network directory
/usr/lib/systemd/network, the volatile runtime network directory
/run/systemd/network, and the local administration network directory
/etc/systemd/network\&. Link files must have the extension
\&.link; other extensions are ignored\&. All link files are collectively sorted and processed in lexical order, regardless of the directories in which they live\&. However, files with identical filenames replace each other\&. Files in
/etc
have the highest priority, files in
/run
take precedence over files with the same name in
/usr/lib\&. This can be used to override a system\-supplied link file with a local file if needed; a symlink in
/etc
with the same name as a link file in
/usr/lib, pointing to
/dev/null, disables the link file entirely\&.
.PP
The link file contains a
"[Match]"
section, which determines if a given link file may be applied to a given device; and a
"[Link]"
section specifying how the device should be configured\&. The first (in lexical order) of the link files that matches a given device is applied\&.
.SH "[MATCH] SECTION OPTIONS"
.PP
A link file is said to match a device if each of the entries in the
"[Match]"
section matches, or if the section is empty\&. The following keys are accepted:
.PP
\fIMACAddress=\fR
.RS 4
The hardware address\&.
.RE
.PP
\fIPath=\fR
.RS 4
The persistent path, as exposed by the udev property
"ID_PATH"\&. May contain shell style globs\&.
.RE
.PP
\fIDriver=\fR
.RS 4
The driver currently bound to the device, as exposed by the udev property
"DRIVER"
of its parent device, or if that is not set, the driver as exposed by
"ethtool \-i"
of the device itself\&.
.RE
.PP
\fIType=\fR
.RS 4
The device type, as exposed by the udev property
"DEVTYPE"\&.
.RE
.PP
\fIHost=\fR
.RS 4
Matches against the hostname or machine ID of the host\&. See
"ConditionHost="
in
\fBsystemd.unit\fR(5)
for details\&.
.RE
.PP
\fIVirtualization=\fR
.RS 4
Checks whether the system is executed in a virtualized environment and optionally test whether it is a specific implementation\&. See
"ConditionVirtualization="
in
\fBsystemd.unit\fR(5)
for details\&.
.RE
.PP
\fIKernelCommandLine=\fR
.RS 4
Checks whether a specific kernel command line option is set (or if prefixed with the exclamation mark unset)\&. See
"ConditionKernelCommandLine="
in
\fBsystemd.unit\fR(5)
for details\&.
.RE
.PP
\fIArchitecture=\fR
.RS 4
Checks whether the system is running on a specific architecture\&. See
"ConditionArchitecture="
in
\fBsystemd.unit\fR(5)
for details\&.
.RE
.SH "[LINK] SECTION OPTIONS"
.PP
The
"[Link]"
section accepts the following keys:
.PP
\fIDescription=\fR
.RS 4
A description of the device\&.
.RE
.PP
\fIAlias=\fR
.RS 4
The
"ifalias"
is set to this value\&.
.RE
.PP
\fIMACAddressPolicy=\fR
.RS 4
The policy by which the MAC address should be set\&. The available policies are:
.PP
"persistent"
.RS 4
If the hardware has a persistent MAC address, as most hardware should, and if it is used by the kernel, nothing is done\&. Otherwise, a new MAC address is generated which is guaranteed to be the same on every boot for the given machine and the given device, but which is otherwise random\&.
.RE
.PP
"random"
.RS 4
If the kernel is using a random MAC address, nothing is done\&. Otherwise, a new address is randomly generated each time the device appears, typically at boot\&.
.RE
.RE
.PP
\fIMACAddress=\fR
.RS 4
The MAC address to use, if no
"MACAddressPolicy="
is specified\&.
.RE
.PP
\fINamePolicy=\fR
.RS 4
An ordered, space\-separated list of policies by which the interface name should be set\&.
"NamePolicy"
may be disabled by specifying
"net\&.ifnames=0"
on the kernel commandline\&. Each of the policies may fail, and the first successful one is used\&. The name is not set directly, but is exported to udev as the property
"ID_NET_NAME", which is, by default, used by a udev rule to set
"NAME"\&. The available policies are:
.PP
"database"
.RS 4
The name is set based on entries in the udev\*(Aqs Hardware Database with the key
"ID_NET_NAME_FROM_DATABASE"\&.
.RE
.PP
"onboard"
.RS 4
The name is set based on information given by the firmware for on\-board devices, as exported by the udev property
"ID_NET_NAME_ONBOARD"\&.
.RE
.PP
"slot"
.RS 4
The name is set based on information given by the firmware for hot\-plug devices, as exported by the udev property
"ID_NET_NAME_SLOT"\&.
.RE
.PP
"path"
.RS 4
The name is set based on the device\*(Aqs physical location, as exported by the udev property
"ID_NET_NAME_PATH"\&.
.RE
.PP
"mac"
.RS 4
The name is set based on the device\*(Aqs persistent MAC address, as exported by the udev property
"ID_NET_NAME_MAC"\&.
.RE
.RE
.PP
\fIName=\fR
.RS 4
The interface name to use in case all the policies specified in
\fINamePolicy=\fR
fail, or in case
\fINamePolicy=\fR
is missing or disabled\&.
.RE
.PP
\fIMTUBytes=\fR
.RS 4
The maximum transmission unit in bytes to set for the device\&. The usual suffixes K, M, G, are supported and are understood to the base of 1024\&.
.RE
.PP
\fIBitsPerSecond=\fR
.RS 4
The speed to set for the device, the value is rounded down to the nearest Mbps\&. The usual suffixes K, M, G, are supported and are understood to the base of 1000\&.
.RE
.PP
\fIDuplex=\fR
.RS 4
The duplex mode to set for the device\&. The accepted values are
"half"
and
"full"\&.
.RE
.PP
\fIWakeOnLan=\fR
.RS 4
The Wake\-on\-LAN policy to set for the device\&. The supported values are:
.PP
"phy"
.RS 4
Wake on PHY activity\&.
.RE
.PP
"magic"
.RS 4
Wake on receipt of a magic packet\&.
.RE
.PP
"off"
.RS 4
Never wake\&.
.RE
.RE
.SH "EXAMPLE"
.PP
\fBExample\ \&1.\ \&/etc/systemd/network/wireless.link\fR
.sp
.if n \{\
.RS 4
.\}
.nf
[Match]
MACAddress=12:34:56:78:9a:bc
Driver=brcmsmac
Path=pci\-0000:02:00\&.0\-*
Type=wlan
Virtualization=no
Host=my\-laptop
Architecture=x86\-64
[Link]
Name=wireless0
MTUBytes=1450
BitsPerSecond=10M
WakeOnLan=magic
MACAddress=cb:a9:87:65:43:21
.fi
.if n \{\
.RE
.\}
.SH "SEE ALSO"
.PP
\fBsystemd-udevd.service\fR(8),
\fBudevadm\fR(8)
|