Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   systemd.network    ( 5 )

конфигурация сети (Network configuration)

  Name  |  Synopsis  |  Description  |    Match section options    |  [link] section options  |  [sr-iov] section options  |  Network section options  |  [address] section options  |  [neighbor] section options  |  [ipv6addresslabel] section options  |  [routingpolicyrule] section options  |  [nexthop] section options  |  [route] section options  |  Dhcpv4 section options  |  Dhcpv6 section options  |  [dhcpv6prefixdelegation] section options  |  [ipv6acceptra] section options  |  [dhcpserver] section options  |  [dhcpserverstaticlease] section options  |  [ipv6sendra] section options  |  [ipv6prefix] section options  |  [ipv6routeprefix] section options  |  [bridge] section options  |  [bridgefdb] section options  |  [bridgemdb] section options  |  [lldp] section options  |  [can] section options  |  [qdisc] section options  |  [networkemulator] section options  |  [tokenbucketfilter] section options  |  [pie] section options  |  [flowqueuepie] section options  |  [stochasticfairblue] section options  |  [stochasticfairnessqueueing] section options  |  [bfifo] section options  |  [pfifo] section options  |  [pfifoheaddrop] section options  |  [pfifofast] section options  |  [cake] section options  |  [controlleddelay] section options  |  [deficitroundrobinscheduler] section options  |  [deficitroundrobinschedulerclass] section options  |  [enhancedtransmissionselection] section options  |  [genericrandomearlydetection] section options  |  [fairqueueingcontrolleddelay] section options  |  [fairqueueing] section options  |  [triviallinkequalizer] section options  |  [hierarchytokenbucket] section options  |  [hierarchytokenbucketclass] section options  |  [heavyhitterfilter] section options  |  [quickfairqueueing] section options  |  [quickfairqueueingclass] section options  |  [bridgevlan] section options  |  Examples  |  See also  |  Note  |

Параметры раздела Match (Match section options)

The network file contains a [Match] section, which determines if
       a given network file may be applied to a given device; and a
       [Network] section specifying how the device should be configured.
       The first (in lexical order) of the network files that matches a
       given device is applied, all later files are ignored, even if
       they match as well.

A network file is said to match a network interface if all matches specified by the [Match] section are satisfied. When a network file does not contain valid settings in [Match] section, then the file will match all interfaces and systemd-networkd warns about that. Hint: to avoid the warning and to make it clear that all interfaces shall be matched, add the following:

Name=*

The following keys are accepted:

MACAddress= A whitespace-separated list of hardware addresses. Use full colon-, hyphen- or dot-delimited hexadecimal. See the example below. This option may appear more than once, in which case the lists are merged. If the empty string is assigned to this option, the list of hardware addresses defined prior to this is reset.

Example:

MACAddress=01:23:45:67:89:ab 00-11-22-33-44-55 AABB.CCDD.EEFF

PermanentMACAddress= A whitespace-separated list of hardware's permanent addresses. While MACAddress= matches the device's current MAC address, this matches the device's permanent MAC address, which may be different from the current one. Use full colon-, hyphen- or dot-delimited hexadecimal. This option may appear more than once, in which case the lists are merged. If the empty string is assigned to this option, the list of hardware addresses defined prior to this is reset.

Path= A whitespace-separated list of shell-style globs matching the persistent path, as exposed by the udev property ID_PATH.

Driver= A whitespace-separated list of shell-style globs matching the driver currently bound to the device, as exposed by the udev property ID_NET_DRIVER of its parent device, or if that is not set, the driver as exposed by ethtool -i of the device itself. If the list is prefixed with a "!", the test is inverted.

Type= A whitespace-separated list of shell-style globs matching the device type, as exposed by networkctl list. If the list is prefixed with a "!", the test is inverted. Some valid values are "ether", "loopback", "wlan", "wwan". Valid types are named either from the udev "DEVTYPE" attribute, or "ARPHRD_" macros in linux/if_arp.h, so this is not comprehensive.

Property= A whitespace-separated list of udev property names with their values after equals sign ("="). If multiple properties are specified, the test results are ANDed. If the list is prefixed with a "!", the test is inverted. If a value contains white spaces, then please quote whole key and value pair. If a value contains quotation, then please escape the quotation with "\".

Example: if a .link file has the following:

Property=ID_MODEL_ID=9999 "ID_VENDOR_FROM_DATABASE=vendor name" "KEY=with \"quotation\""

then, the .link file matches only when an interface has all the above three properties.

Name= A whitespace-separated list of shell-style globs matching the device name, as exposed by the udev property "INTERFACE", or device's alternative names. If the list is prefixed with a "!", the test is inverted.

WLANInterfaceType= A whitespace-separated list of wireless network type. Supported values are "ad-hoc", "station", "ap", "ap-vlan", "wds", "monitor", "mesh-point", "p2p-client", "p2p-go", "p2p-device", "ocb", and "nan". If the list is prefixed with a "!", the test is inverted.

SSID= A whitespace-separated list of shell-style globs matching the SSID of the currently connected wireless LAN. If the list is prefixed with a "!", the test is inverted.

BSSID= A whitespace-separated list of hardware address of the currently connected wireless LAN. Use full colon-, hyphen- or dot-delimited hexadecimal. See the example in MACAddress=. This option may appear more than once, in which case the lists are merged. If the empty string is assigned to this option, the list is reset.

Host= Matches against the hostname or machine ID of the host. See ConditionHost= in systemd.unit(5) for details. When prefixed with an exclamation mark ("!"), the result is negated. If an empty string is assigned, then previously assigned value is cleared.

Virtualization= Checks whether the system is executed in a virtualized environment and optionally test whether it is a specific implementation. See ConditionVirtualization= in systemd.unit(5) for details. When prefixed with an exclamation mark ("!"), the result is negated. If an empty string is assigned, then previously assigned value is cleared.

KernelCommandLine= Checks whether a specific kernel command line option is set. See ConditionKernelCommandLine= in systemd.unit(5) for details. When prefixed with an exclamation mark ("!"), the result is negated. If an empty string is assigned, then previously assigned value is cleared.

KernelVersion= Checks whether the kernel version (as reported by uname -r) matches a certain expression. See ConditionKernelVersion= in systemd.unit(5) for details. When prefixed with an exclamation mark ("!"), the result is negated. If an empty string is assigned, then previously assigned value is cleared.

Architecture= Checks whether the system is running on a specific architecture. See ConditionArchitecture= in systemd.unit(5) for details. When prefixed with an exclamation mark ("!"), the result is negated. If an empty string is assigned, then previously assigned value is cleared.