man iftab (Formats) - assign consistent names to network interfaces

NAME

iftab - assign consistent names to network interfaces

DESCRIPTION

The file /etc/iftab contains descriptive information about the various network interfaces and is used by udev(8) and its iftab_helper(8) to assign consistent names to network interfaces.

/etc/iftab defines a set of mappings. Each mapping contains an interface name and a set of selectors which identify the physical network device that should be assigned that name.

If a network device matches all selectors of a mapping, udev will rename the interface to the name given by the mapping.

If a network device does not match all of the selectors, but has the same name as the mapping, udev instead will rename the interface so that it does not have the name given by the kernel.

COMPATIBILITY

Please note that this file format is a subset of that supported by the ifrename(8) tool you may find in other distributions, and does not (yet) support the full range of selectors and features.

MAPPINGS

Each mapping is described on a separate line, which may be broken across multiple lines by terminating the first line with a backslash. A mapping starts with an interface name and contains a set of selector name and value pairs; all separated by space or tabs.

The interface name may contain a single wildcard (such as eth* or wlan*), which indicates that the first free number in that class should be used. As an extension to ifrename(8) this can also be followed by a number to indicate the lowest integer you wish to use, e.g. eth*2 will use eth2 if available, and if not try eth3, eth4, etc.

The relationship between selectors of a mapping is a logical and. A mapping only matches a network deivce if all of the selectors for it match.

When multiple matching selectors are present, the last in the file is used.

SELECTORS

Each selector is composed of a selector name and selector value separated by spaces or tabs. Selectors specify a static attribute of a network device, the goal being to uniquely identify each piece of hardware.

Currently only the following selectors are supported, other selectors supported by the ifrename(8) tool will be implemented as and when required.

mac mac-address
Matches the MAC address of the device which can be obtained by using ifconfig(8) or ip(8).
arp arp-type
Matches the ARP type (also known as the Link type) of the interface, which can be obtained by using ifconfig(8) or ip(8).

This selector is most useful when a driver creates multiple interfaces for a single device.

driver driver-name
Matches the name of the kernel driver that owns the device which can be obtained by using ethtool
bus bus-name
Matches the name of the bus that the device is on, e.g. "pci".
businfo bus-information
Matches the bus information of the device which can be obtained by using ethtool
SYSFS{attribute}
Uses the value of the given sysfs attribute for the device, these can be found by looking in the sub-directory under /sys/class/net named after the interface.

SYSFS{address} is equivalent to the mac selector, etc.

EXAMPLE

# This is a comment

eth0 mac 00:12:79:59:8D:38

eth1 mac 00:0B:CD:5C:9E:2A arp 1

nveth* SYSFS{device/vendor} 0x10de

SEE ALSO

AUTHORS

Scott James Remnant <scott@ubuntu.com>