OSDN Git Service

v28
[android-x86/external-wireless-tools.git] / wireless_tools / iftab.5
1 .\" Jean II - HPL - 2004
2 .\" iftab.5
3 .\"
4 .TH IFTAB 5 "01 March 2004" "wireless-tools" "Linux Programmer's Manual"
5 .\"
6 .\" NAME part
7 .\"
8 .SH NAME
9 iftab \- static information about the network interfaces
10 .\"
11 .\" DESCRIPTION part
12 .\"
13 .SH DESCRIPTION
14 The file
15 .B /etc/iftab
16 contains descriptive information about the various network interfaces.
17 .B iftab
18 is only used by the program
19 .IR ifrename (8)
20 to assign a consistent network interface name to each network interface.
21 .PP
22 .B /etc/iftab
23 defines a set of
24 .IR mappings .
25 Each mapping contains an interface name and a set of selectors. The
26 selectors allow
27 .B ifrename
28 to identify each network interface on the system. If a network
29 interface matches all descriptors of a mapping,
30 .B ifrename
31 attempt to change the name of the interface to the interface name
32 given by the mapping.
33 .\"
34 .\" MAPPINGS part
35 .\"
36 .SH MAPPINGS
37 Each mapping is described on a separate line, it starts with an
38 .IR "interface name" ,
39 and contains a set of
40 .IR descriptors ,
41 separated by space or tabs.
42 .PP
43 The relationship between descriptors of a mapping is a
44 .IR "logical and" .
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.
48 .PP
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).
52 .B Ifrename
53 always use the first matching mapping starting from the
54 .I end
55 of
56 .BR iftab ,
57 therefore more restrictive mapping should be specified last.
58 .\"
59 .\" INTERFACE NAME part
60 .\"
61 .SH INTERFACE NAME
62 The first part of each mapping is an interface name. If a network
63 interface matches all descriptors of a mapping,
64 .B ifrename
65 attempt to change the name of the interface to the interface name
66 given by the mapping.
67 .PP
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.
75 .PP
76 It is discouraged to try to map interfaces to default interfaces names
77 such as
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.
84 .br
85 Good names are either totally unique and meaningfull,
86 such as
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.
91 .\"
92 .\" DESCRIPTORS part
93 .\"
94 .SH DESCRIPTORS
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.
98 .PP
99 Most users will only use the
100 .B mac
101 selector, other selectors are for more specialised setup.
102 .TP
103 .BI mac " mac address"
104 Matches the MAC Address of the interface with the specified MAC
105 address. The MAC address of the interface can be shown using
106 .IR ifconfig (8)
107 or
108 .IR ip (8).
109 The specified MAC address may contain a '*' for wilcard matching.
110 .br
111 This is the most common selector, as most interfaces have a unique MAC
112 address allowing to identify network interfaces without ambiguity.
113 However, some interfaces don't have a valid MAC address until they are
114 brought up, in such case using this selector is tricky.
115 .TP
116 .BI arp " arp type"
117 Matches the ARP Type (also called Link Type) of the interface with the
118 specified ARP type. The ARP Type of the interface can be shown using
119 .IR ifconfig (8)
120 or
121 .IR ip (8).
122 .br
123 This selector is useful when a driver create multiple network
124 interfaces for a single network card.
125 .TP
126 .BI driver " driver name"
127 Matches the Driver Name of the interface with the specified driver
128 name. The Driver Name of the interface can be shown using
129 .IR "ethtool -i" (8).
130 .TP
131 .BI businfo " bus information"
132 Matches the Bus Information of the interface with the specified bus
133 information. The Bus Information of the interface can be shown using
134 .IR "ethtool -i" (8).
135 .TP
136 .BI firmware " firmware revision"
137 Matches the Firmware Revision of the interface with the firmware
138 revision information. The Firmware Revision of the interface can be
139 shown using
140 .IR "ethtool -i" (8).
141 .TP
142 .BI baseaddress " base address"
143 Matches the Base Address of the interface with the specified base
144 address. The Base Address of the interface can be shown using
145 .IR ifconfig (8).
146 .br
147 Because most cards use dynamic allocation of the Base Address, this
148 selector is only useful for ISA and EISA cards.
149 .TP
150 .BI irq " irq line"
151 Matches the IRQ Line (interrupt) of the interface with the specified
152 IRQ line. The IRQ Line of the interface can be shown using
153 .IR ifconfig (8).
154 .br
155 Because there are IRQ Lines may be shared, this selector is usually
156 not sufficient to uniquely identify an interface.
157 .TP
158 .BI iwproto " wireless protocol"
159 Matches the Wireless Protocol of the interface with the specified
160 wireless protocol. The Wireless Protocol of the interface can be shown
161 using
162 .IR iwconfig (8).
163 .br
164 This selector is only supported on wireless interfaces and is not
165 sufficient to uniquely identify an interface.
166 .TP
167 .BI pcmciaslot " pcmcia slot"
168 Matches the Pcmcia Socket number of the interface with the specified
169 slot number. Pcmcia Socket number of the interface can be shown
170 using
171 .IR "cardctl ident" (8).
172 .br
173 This selector is usually only supported on 16 bits cards, for 32 bits
174 cards it is advised to use the selector
175 .BR businfo .
176 .TP
177 .BI SYSFS{ filename } " value"
178 Matches the sysfs attribute given by filename to the specified value. sysfs attributes of the interface can be read in one of the directory in the directory 
179 .IR /sys/class/net/ .
180 For example, the filename
181 .I address
182 is the MAC address of the device and should be identical to the selector
183 .BR mac .
184 .br
185 The sysfs filesystem is only supported with 2.6.X kernel and need to
186 be mounted. sysfs selectors are not as efficient as other selectors,
187 therefore they should be avoided for maximum performance.
188 .\"
189 .\" EXAMPLE part
190 .\"
191 .SH EXAMPLE
192 # This is a comment
193 .br
194 eth2            mac 08:00:09:DE:82:0E
195 .br
196 eth3            driver wavelan interrupt 15 baseaddress 0x390
197 .br
198 eth4            driver pcnet32 businfo 0000:02:05.0
199 .br
200 air*            mac 00:07:0E:* arp 1
201 .br
202 myvpn   SYSFS{address} 00:10:83:*
203 .\"
204 .\" AUTHOR part
205 .\"
206 .SH AUTHOR
207 Jean Tourrilhes \- jt@hpl.hp.com
208 .\"
209 .\" FILES part
210 .\"
211 .SH FILES
212 .I /etc/iftab
213 .\"
214 .\" SEE ALSO part
215 .\"
216 .SH SEE ALSO
217 .BR ifrename (8),
218 .BR ifconfig (8),
219 .BR ip (8),
220 .BR ethtool (8),
221 .BR iwconfig (8).