1 .\" Jean II - HPL - 2004-2007
4 .TH IFRENAME 8 "26 February 2007" "wireless-tools" "Linux Programmer's Manual"
9 ifrename \- rename network interfaces based on various static criteria
14 .B "ifrename [-c configfile] [-p] [-d] [-u] [-v] [-V] [-D]"
16 .B "ifrename [-c configfile] [-i interface] [-n newname]"
22 is a tool allowing you to assign a consistent name to each of your
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.
33 allow the user to decide what name a network interface will have.
37 to specify how interface names match the network interfaces on the
38 system, the most common selector is the interface
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,
46 renames all present system interfaces using mappings defined in
54 Set the configuration file to be used (by default
56 The configuration file define the mapping between selectors and
57 interface names, and is described in
62 is "-", the configuration is read from stdin.
65 Probe (load) kernel modules before renaming interfaces. By default
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
75 specific hacks. Combined with
77 only modules for interfaces specified in
78 .I /etc/network/interface
82 Only rename the specified
84 as opposed to all interfaces on the system. The new interface name is
90 specify the new name of the interface. The list of mappings from the
91 configuration file is bypassed, the interface specified with
93 is renamed directly to
95 The new name may be a wildcard containing a single '*'.
99 rename interfaces by using only mappings that would rename them to
101 The new name may not be a wildcard. This use of ifrename is
102 discouraged, because inefficient
103 .RI ( -n " without " -i ).
104 All the interfaces of the system need to be processed at each
105 invocation, therefore in most case it is not faster than just letting
106 ifrename renaming all of them (without both
110 Enable name takeover support. This allow interface name swapping
111 between two or more interfaces.
113 Takeover enable an interface to 'steal' the name of another
114 interface. This works only with kernel 2.6.X and if the other
115 interface is down. Consequently, this is not compatible with
116 Hotplug. The other interface is assigned a random name, but may be
117 renamed later with 'ifrename'.
119 The number of takeovers is limited to avoid circular loops, and
120 therefore some complex multi-way name swapping situations may not be
123 In any case, name swapping and the use of this feature is discouraged,
124 and you are invited to choose unique and unambiguous names for your
130 output mode. This enables proper integration of
138 to assign interface names present in
140 In this mode the output of ifrename can be parsed
143 as an IMPORT action. This requires
145 version 107 or later.
148 Dry-run mode. Ifrename won't change any interface, it will only print
149 new interface name, if applicable, and return.
151 In dry-run mode, interface name wildcards are not resolved. New
152 interface name is printed, even if it is the same as the old name.
154 Be also aware that some selectors can only be read by root, for
155 example those based on
157 and will fail silently if run by a normal user. In other words,
158 dry-run mode under a standard user may not give the expected result.
161 Verbose mode. Ifrename will display internal results of parsing its
162 configuration file and querying the interfaces selectors. Combined
165 option, this is a good way to debug complex configurations or trivial
171 Jean Tourrilhes \- jt@hpl.hp.com