OSDN Git Service

v27
[android-x86/external-wireless-tools.git] / wireless_tools / ifrename.8
1 .\" Jean II - HPL - 2004
2 .\" ifrename.8
3 .\"
4 .TH IFRENAME 8 "01 March 2004" "wireless-tools" "Linux Programmer's Manual"
5 .\"
6 .\" NAME part
7 .\"
8 .SH NAME
9 ifrename \- rename network interfaces based on various static criteria
10 .\"
11 .\" SYNOPSIS part
12 .\"
13 .SH SYNOPSIS
14 .B "ifrename [-c configfile] [-p] [-d] [-v] [-V] [-D]"
15 .br
16 .B "ifrename [-c configfile] [-i interface] [-n newname]"
17 .\"
18 .\" DESCRIPTION part
19 .\"
20 .SH DESCRIPTION
21 .B Ifrename 
22 is a tool allowing you to assign a consistent name to each of your
23 network interface.
24 .PP
25 By default, interface names are dynamic, and each network interface is
26 assigned the first available name
27 .RI ( eth0 ", " eth1 "...)."
28 The order network interfaces are created may vary. For built-in
29 interfaces, the kernel boot time enumeration may vary. For removable
30 interface, the user may plug them in any order.
31 .PP
32 .B Ifrename
33 allow the user to decide what name a network interface will have.
34 .B Ifrename 
35 can use a variety of
36 .I selectors
37 to specify how interface names match the network interfaces on the
38 system, the most common selector is the interface 
39 .IR "MAC address" .
40 .PP
41 .B Ifrename
42 must be run before interfaces are brought up, which is why it's mostly
43 useful in various scripts (init, hotplug) but is seldom used directly
44 by the user. By default,
45 .B ifrename 
46 renames all present system interfaces using mappings defined in
47 .IR /etc/iftab .
48 .\"
49 .\" PARAMETER part
50 .\"
51 .SH PARAMETERS
52 .TP
53 .BI "-c " configfile
54 Set the configuration file to be used (by default 
55 .IR /etc/iftab ).
56 The configuration file define the mapping between selectors and
57 interface names, and is described in
58 .IR iftab (5).
59 .br
60 If
61 .I configfile
62 is "-", the configuration is read from stdin.
63 .TP
64 .B -p
65 Probe (load) kernel modules before renaming interfaces. By default
66 .B ifrename 
67 only check interfaces already loaded, and doesn't auto-load the
68 required kernel modules. This option enables smooth integration with
69 system not loading modules before calling
70 .BR ifrename .
71 .TP
72 .B -d
73 Enable various
74 .B Debian
75 specific hacks. Combined with
76 .BR -p ,
77 only modules for interfaces specified in
78 .I /etc/network/interface
79 are loaded.
80 .TP
81 .BI "-i " interface
82 Only rename the specified
83 .I interface 
84 as opposed to all interfaces on the system. The new interface name is
85 printed.
86 .TP
87 .BI "-n " newname
88 When used with
89 .IR -i ,
90 specify the new name of the interface. The list of mappings from the
91 configuration file is bypassed. The new name may be a wildcard
92 containing a single '*'.
93 .TP
94 .B -t
95 Enable name takeover support. This allow interface name swapping
96 between two or more interfaces.
97 .br
98 Takeover enable an interface to 'steal' the name of another
99 interface. This works only with kernel 2.6.X and if the other
100 interface is down. Consequently, this is not compatible with
101 Hotplug. The other interface is assigned a random name, but may be
102 renamed later with 'ifrename'.
103 .br
104 The number of takeovers is limited to avoid circular loops, and
105 therefore some complex multi-way name swapping situations may not be
106 fully processed.
107 .br
108 In any case, name swapping and the use of this feature is discouraged,
109 and you are invited to choose unique and unambiguous names for your
110 interfaces...
111 .TP
112 .B -D
113 Dry-run mode. Ifrename won't change any interface, it will only print
114 new interface name, if applicable, and return.
115 .br
116 In dry-run mode, interface name wildcards are not resolved. New
117 interface name is printed, even if it is the same as the old name.
118 .TP
119 .B -V
120 Verbose mode. Ifrename will display internal results of parsing its
121 configuration file and querying the interfaces selectors. Combined
122 with the
123 .I dry-run
124 option, this is a good way to debug complex configurations or trivial
125 problems.
126 .\"
127 .\" AUTHOR part
128 .\"
129 .SH AUTHOR
130 Jean Tourrilhes \- jt@hpl.hp.com
131 .\"
132 .\" FILES part
133 .\"
134 .SH FILES
135 .I /etc/iftab
136 .\"
137 .\" SEE ALSO part
138 .\"
139 .SH SEE ALSO
140 .BR ifconfig (8),
141 .BR ip (8),
142 .BR iftab (5).