1IFTAB(5)                   Linux Programmer's Manual                  IFTAB(5)
2
3
4

NAME

6       iftab - static information about the network interfaces
7

DESCRIPTION

9       The  file /etc/iftab contains descriptive information about the various
10       network interfaces.  iftab is only used by the program  ifrename(8)  to
11       assign a consistent network interface name to each network interface.
12
13       /etc/iftab  defines a set of mappings.  Each mapping contains an inter‐
14       face name and a set of selectors. The selectors allow ifrename to iden‐
15       tify  each  network  interface  on  the  system. If a network interface
16       matches all descriptors of a mapping, ifrename attempt  to  change  the
17       name of the interface to the interface name given by the mapping.
18

MAPPINGS

20       Each  mapping is described on a separate line, it starts with an inter‐
21       face name, and contains a set of descriptors,  separated  by  space  or
22       tabs.
23
24       The  relationship between descriptors of a mapping is a logical and.  A
25       mapping matches a network interface only is all the descriptors  match.
26       If  a network interface doesn't support a specific descriptor, it won't
27       match any mappings using this descriptor.
28
29       If you want to use alternate descriptors for an interface name (logical
30       or),  specify  two different mappings with the same interface name (one
31       on each line).  Ifrename always use the first matching mapping starting
32       from  the  end  of  iftab, therefore more restrictive mapping should be
33       specified last.
34

INTERFACE NAME

36       The first part of each mapping is  an  interface  name.  If  a  network
37       interface  matches  all  descriptors  of a mapping, ifrename attempt to
38       change the name of the interface to the interface  name  given  by  the
39       mapping.
40
41       The  interface name of a mapping is either a plain interface name (such
42       as eth2 or wlan1) or a interface name pattern containing a single wild‐
43       card  (such as eth* or wlan*).  In case of wildcard, the kernel replace
44       the '*' with the lowest available integer making  this  interface  name
45       unique.  Note  that  wildcard  is  only  supported for kernel 2.6.1 and
46       2.4.30 and later.
47
48       It is discouraged to try to map interfaces to default interfaces  names
49       such  as eth0, wlan0 or ppp0.  The kernel use those as the default name
50       for any new interface, therefore most likely an interface will  already
51       use this name and prevent ifrename to use it. Even if you use takeover,
52       the interface may already be up in some cases.  Not  using  those  name
53       will allow you to immediately spot unconfigured or new interfaces.
54       Good  names are either totally unique and meaningfull, such as mydsl or
55       privatehub, or use larger integer, such as eth5 or wlan5.   The  second
56       type is usually easier to integrate in various network utilities.
57

DESCRIPTORS

59       Each  descriptor is composed of a descriptor name and descriptor value.
60       Descriptors specify a static attribute of a network interface, the goal
61       is to uniquely identify each piece of hardware.
62
63       Most  users  will only use the mac selector despite its potential prob‐
64       lems, other selectors are for more specialised  setup.  Most  selectors
65       accept  a  '*'  in  the  selector  value for wilcard matching, and most
66       selectors are case insensitive.
67
68       mac mac address
69              Matches the MAC Address of the interface with the specified  MAC
70              address.  The  MAC  address  of the interface can be shown using
71              ifconfig(8) or ip(8).
72              This is the most common selector,  as  most  interfaces  have  a
73              unique MAC address allowing to identify network interfaces with‐
74              out ambiguity.  However, some interfaces don't have a valid  MAC
75              address  until  they  are  brought  up,  in such case using this
76              selector is tricky or impossible.
77
78       arp arp type
79              Matches the ARP Type (also called Link Type)  of  the  interface
80              with  the  specified  ARP  type as a number. The ARP Type of the
81              interface  can  be  shown  using  ifconfig(8)  or   ip(8),   the
82              link/ether  type  correspond  to  1 and the link/ieee802.11 type
83              correspond to 801.
84              This selector is useful when a driver  create  multiple  network
85              interfaces for a single network card.
86
87       driver driver name
88              Matches  the  Driver  Name  of  the interface with the specified
89              driver name. The Driver Name of the interface can be shown using
90              ethtool -i(8).
91
92       businfo bus information
93              Matches  the Bus Information of the interface with the specified
94              bus information. The Bus Information of  the  interface  can  be
95              shown using ethtool -i(8).
96
97       firmware firmware revision
98              Matches the Firmware Revision of the interface with the firmware
99              revision information. The Firmware Revision of the interface can
100              be shown using ethtool -i(8).
101
102       baseaddress base address
103              Matches  the  Base  Address  of the interface with the specified
104              base address. The Base Address of the  interface  can  be  shown
105              using ifconfig(8).
106              Because  most  cards use dynamic allocation of the Base Address,
107              this selector is only useful for ISA and EISA cards.
108
109       irq irq line
110              Matches the IRQ Line (interrupt) of the interface with the spec‐
111              ified IRQ line. The IRQ Line of the interface can be shown using
112              ifconfig(8).
113              Because there are IRQ Lines may be shared, this selector is usu‐
114              ally not sufficient to uniquely identify an interface.
115
116       iwproto wireless protocol
117              Matches  the  Wireless Protocol of the interface with the speci‐
118              fied wireless protocol. The Wireless Protocol of  the  interface
119              can be shown using iwconfig(8) or iwgetid(8).
120              This  selector  is  only supported on wireless interfaces and is
121              not sufficient to uniquely identify an interface.
122
123       pcmciaslot pcmcia slot
124              Matches the Pcmcia Socket number of the interface with the spec‐
125              ified  slot number. Pcmcia Socket number of the interface can be
126              shown using cardctl ident(8).
127              This selector is usually only supported on 16 bits cards, for 32
128              bits cards it is advised to use the selector businfo.
129
130       prevname previous interface name
131              Matches  the  name  of  the interface prior to renaming with the
132              specified oldname.
133              This selector should be avoided as the previous  interface  name
134              may  vary depending on various condition. A system/kernel/driver
135              update may change the original name. Then, ifrename  or  another
136              tool may rename it prior to the execution of this selector.
137
138       SYSFS{filename} value
139              Matches the content the sysfs attribute given by filename to the
140              specified value. For symlinks and parents directories, match the
141              actual  directory  name of the sysfs attribute given by filename
142              to the specified value.
143              A list of the most useful sysfs attributes is given in the  next
144              section.
145

SYSFS DESCRIPTORS

147       Sysfs  attributes  for a specific interface are located on most systems
148       in the directory named after that interface at  /sys/class/net/.   Most
149       sysfs attribute are files, and their values can be read using cat(1) or
150       more(1).  It is also possible to match attributes in subdirectories.
151
152       Some sysfs attributes are symlinks, pointing to  another  directory  in
153       sysfs.  If  the  attribute  filename  is  a symlink the sysfs attribute
154       resolves to the name of the directory  pointed  by  the  symlink  using
155       readlink(1).   The  location  is  a directory in the sysfs tree is also
156       important. If the attribute filename ends with /.., the sysfs attribute
157       resolves to the real name of the parent directory using pwd(1).
158
159       The sysfs filesystem is only supported with 2.6.X kernel and need to be
160       mounted (usually in /sys).  sysfs selectors are  not  as  efficient  as
161       other  selectors,  therefore they should be avoided for maximum perfor‐
162       mance.
163
164       These are common sysfs  attributes  and  their  corresponding  ifrename
165       descriptors.
166
167       SYSFS{address} value
168              Same as the mac descriptor.
169
170       SYSFS{type} value
171              Same as the arp descriptor.
172
173       SYSFS{device} value
174              Valid only up to kernel 2.6.20. Same as the businfo descriptor.
175
176       SYSFS{..} value
177              Valid only from kernel 2.6.21. Same as the businfo descriptor.
178
179       SYSFS{device/driver} value
180              Valid only up to kernel 2.6.20. Same as the driver descriptor.
181
182       SYSFS{../driver} value
183              Valid only from kernel 2.6.21. Same as the driver descriptor.
184
185       SYSFS{device/irq} value
186              Valid only up to kernel 2.6.20. Same as the irq descriptor.
187
188       SYSFS{../irq} value
189              Valid only from kernel 2.6.21. Same as the irq descriptor.
190

EXAMPLES

192       # This is a comment
193       eth2      mac 08:00:09:DE:82:0E
194       eth3      driver wavelan interrupt 15 baseaddress 0x390
195       eth4      driver pcnet32 businfo 0000:02:05.0
196       air*      mac 00:07:0E:* arp 1
197       myvpn     SYSFS{address} 00:10:83:* SYSFS{type} 1
198       bcm*      SYSFS{device} 0000:03:00.0 SYSFS{device/driver} bcm43xx
199       bcm*      SYSFS{..} 0000:03:00.0 SYSFS{../driver} bcm43xx
200

AUTHOR

202       Jean Tourrilhes - jt@hpl.hp.com
203

FILES

205       /etc/iftab
206

SEE ALSO

208       ifrename(8), ifconfig(8), ip(8), ethtool(8), iwconfig(8).
209
210
211
212wireless-tools                 26 February 2007                       IFTAB(5)
Impressum