1 .\" Jean II - HPL - 2004-2007
4 .TH IFTAB 5 "26 February 2007" "wireless-tools" "Linux Programmer's Manual"
9 iftab \- static information about the network interfaces
16 contains descriptive information about the various network interfaces.
18 is only used by the program
20 to assign a consistent network interface name to each network interface.
25 Each mapping contains an interface name and a set of selectors. The
28 to identify each network interface on the system. If a network
29 interface matches all descriptors of a mapping,
31 attempt to change the name of the interface to the interface name
37 Each mapping is described on a separate line, it starts with an
38 .IR "interface name" ,
41 separated by space or tabs.
43 The relationship between descriptors of a mapping is a
45 A mapping matches a network interface only is all the descriptors
46 match. If a network interface doesn't support a specific descriptor,
47 it won't match any mappings using this descriptor.
49 If you want to use alternate descriptors for an interface name
50 (logical or), specify two different mappings with the same interface
51 name (one on each line).
53 always use the first matching mapping starting from the
57 therefore more restrictive mapping should be specified last.
59 .\" INTERFACE NAME part
62 The first part of each mapping is an interface name. If a network
63 interface matches all descriptors of a mapping,
65 attempt to change the name of the interface to the interface name
68 The interface name of a mapping is either a plain interface name (such as
69 .IR eth2 " or " wlan1 )
70 or a interface name pattern containing a single wildcard (such as
71 .IR eth* " or " wlan* ).
72 In case of wildcard, the kernel replace the '*' with the lowest
73 available integer making this interface name unique. Note that
74 wildcard is only supported for kernel 2.6.1 and 2.4.30 and later.
76 It is discouraged to try to map interfaces to default interfaces names
78 .IR eth0 ", " wlan0 " or " ppp0 .
79 The kernel use those as the default name for any new interface,
80 therefore most likely an interface will already use this name and
81 prevent ifrename to use it. Even if you use takeover, the interface
82 may already be up in some cases. Not using those name will allow you
83 to immediately spot unconfigured or new interfaces.
85 Good names are either totally unique and meaningfull,
87 .IR mydsl " or " privatehub ,
88 or use larger integer, such as
89 .IR eth5 " or " wlan5 .
90 The second type is usually easier to integrate in various network utilities.
95 Each descriptor is composed of a descriptor name and descriptor
96 value. Descriptors specify a static attribute of a network interface,
97 the goal is to uniquely identify each piece of hardware.
99 Most users will only use the
101 selector despite its potential problems, other selectors are for more
102 specialised setup. Most selectors accept a '*' in the selector value
103 for wilcard matching, and most selectors are case insensitive.
105 .BI mac " mac address"
106 Matches the MAC Address of the interface with the specified MAC
107 address. The MAC address of the interface can be shown using
112 This is the most common selector, as most interfaces have a unique MAC
113 address allowing to identify network interfaces without ambiguity.
114 However, some interfaces don't have a valid MAC address until they are
115 brought up, in such case using this selector is tricky or impossible.
118 Matches the ARP Type (also called Link Type) of the interface with the
119 specified ARP type as a number. The ARP Type of the interface can be
133 This selector is useful when a driver create multiple network
134 interfaces for a single network card.
136 .BI driver " driver name"
137 Matches the Driver Name of the interface with the specified driver
138 name. The Driver Name of the interface can be shown using
139 .IR "ethtool -i" (8).
141 .BI businfo " bus information"
142 Matches the Bus Information of the interface with the specified bus
143 information. The Bus Information of the interface can be shown using
144 .IR "ethtool -i" (8).
146 .BI firmware " firmware revision"
147 Matches the Firmware Revision of the interface with the firmware
148 revision information. The Firmware Revision of the interface can be
150 .IR "ethtool -i" (8).
152 .BI baseaddress " base address"
153 Matches the Base Address of the interface with the specified base
154 address. The Base Address of the interface can be shown using
157 Because most cards use dynamic allocation of the Base Address, this
158 selector is only useful for ISA and EISA cards.
161 Matches the IRQ Line (interrupt) of the interface with the specified
162 IRQ line. The IRQ Line of the interface can be shown using
165 Because there are IRQ Lines may be shared, this selector is usually
166 not sufficient to uniquely identify an interface.
168 .BI iwproto " wireless protocol"
169 Matches the Wireless Protocol of the interface with the specified
170 wireless protocol. The Wireless Protocol of the interface can be shown
176 This selector is only supported on wireless interfaces and is not
177 sufficient to uniquely identify an interface.
179 .BI pcmciaslot " pcmcia slot"
180 Matches the Pcmcia Socket number of the interface with the specified
181 slot number. Pcmcia Socket number of the interface can be shown
183 .IR "cardctl ident" (8).
185 This selector is usually only supported on 16 bits cards, for 32 bits
186 cards it is advised to use the selector
189 .BI prevname " previous interface name"
190 Matches the name of the interface prior to renaming with the specified
193 This selector should be avoided as the previous interface name may
194 vary depending on various condition. A system/kernel/driver update may
195 change the original name. Then, ifrename or another tool may rename it
196 prior to the execution of this selector.
198 .BI SYSFS{ filename } " value"
199 Matches the content the sysfs attribute given by filename to the
200 specified value. For symlinks and parents directories, match the
201 actual directory name of the sysfs attribute given by filename to the
204 A list of the most useful sysfs attributes is given in the next
207 .\" SYSFS DESCRIPTORS part
209 .SH SYSFS DESCRIPTORS
210 Sysfs attributes for a specific interface are located on most systems
211 in the directory named after that interface at
212 .IR /sys/class/net/ .
213 Most sysfs attribute are files, and their values can be read using
214 .IR cat "(1) or " more (1).
215 It is also possible to match attributes in subdirectories.
217 Some sysfs attributes are symlinks, pointing to another directory in
218 sysfs. If the attribute filename is a symlink the sysfs attribute
219 resolves to the name of the directory pointed by the symlink using
221 The location is a directory in the sysfs tree is also important. If
222 the attribute filename ends with
224 the sysfs attribute resolves to the real name of the parent directory
228 The sysfs filesystem is only supported with 2.6.X kernel and need to
229 be mounted (usually in
231 sysfs selectors are not as efficient as other selectors, therefore
232 they should be avoided for maximum performance.
234 These are common sysfs attributes and their corresponding ifrename
237 .BI SYSFS{address} " value"
242 .BI SYSFS{type} " value"
247 .BI SYSFS{device} " value"
248 Valid only up to kernel 2.6.20. Same as the
252 .BI SYSFS{..} " value"
253 Valid only from kernel 2.6.21. Same as the
257 .BI SYSFS{device/driver} " value"
258 Valid only up to kernel 2.6.20. Same as the
262 .BI SYSFS{../driver} " value"
263 Valid only from kernel 2.6.21. Same as the
267 .BI SYSFS{device/irq} " value"
268 Valid only up to kernel 2.6.20. Same as the
272 .BI SYSFS{../irq} " value"
273 Valid only from kernel 2.6.21. Same as the
282 eth2 mac 08:00:09:DE:82:0E
284 eth3 driver wavelan interrupt 15 baseaddress 0x390
286 eth4 driver pcnet32 businfo 0000:02:05.0
288 air* mac 00:07:0E:* arp 1
290 myvpn SYSFS{address} 00:10:83:* SYSFS{type} 1
292 bcm* SYSFS{device} 0000:03:00.0 SYSFS{device/driver} bcm43xx
294 bcm* SYSFS{..} 0000:03:00.0 SYSFS{../driver} bcm43xx
299 Jean Tourrilhes \- jt@hpl.hp.com