1IFRENAME(8) Linux Programmer's Manual IFRENAME(8)
2
3
4
6 ifrename - rename network interfaces based on various static criteria
7
9 ifrename [-c configfile] [-p] [-d] [-v] [-V] [-D]
10 ifrename [-c configfile] [-i interface] [-n newname]
11
13 Ifrename is a tool allowing you to assign a consistent name to each of
14 your network interface.
15
16 By default, interface names are dynamic, and each network interface is
17 assigned the first available name (eth0, eth1...). The order network
18 interfaces are created may vary. For built-in interfaces, the kernel
19 boot time enumeration may vary. For removable interface, the user may
20 plug them in any order.
21
22 Ifrename allow the user to decide what name a network interface will
23 have. Ifrename can use a variety of selectors to specify how interface
24 names match the network interfaces on the system, the most common
25 selector is the interface MAC address.
26
27 Ifrename must be run before interfaces are brought up, which is why
28 it's mostly useful in various scripts (init, hotplug) but is seldom
29 used directly by the user. By default, ifrename renames all present
30 system interfaces using mappings defined in /etc/iftab.
31
33 -c configfile
34 Set the configuration file to be used (by default /etc/iftab).
35 The configuration file define the mapping between selectors and
36 interface names, and is described in iftab(5).
37 If configfile is "-", the configuration is read from stdin.
38
39 -p Probe (load) kernel modules before renaming interfaces. By
40 default ifrename only check interfaces already loaded, and
41 doesn't auto-load the required kernel modules. This option
42 enables smooth integration with system not loading modules
43 before calling ifrename.
44
45 -d Enable various Debian specific hacks. Combined with -p, only
46 modules for interfaces specified in /etc/network/interface are
47 loaded.
48
49 -i interface
50 Only rename the specified interface as opposed to all interfaces
51 on the system. The new interface name is printed.
52
53 -n newname
54 When used with -i, specify the new name of the interface. The
55 list of mappings from the configuration file is bypassed, the
56 interface specified with -i is renamed directly to newname. The
57 new name may be a wildcard containing a single '*'.
58 When used without -i, rename interfaces by using only mappings
59 that would rename them to newname. The new name may not be a
60 wildcard. This use of ifrename is discouraged, because ineffi‐
61 cient (-n without -i). All the interfaces of the system need to
62 be processed at each invocation, therefore in most case it is
63 not faster than just letting ifrename renaming all of them
64 (without both -n and -i).
65
66 -t Enable name takeover support. This allow interface name swapping
67 between two or more interfaces.
68 Takeover enable an interface to 'steal' the name of another
69 interface. This works only with kernel 2.6.X and if the other
70 interface is down. Consequently, this is not compatible with
71 Hotplug. The other interface is assigned a random name, but may
72 be renamed later with 'ifrename'.
73 The number of takeovers is limited to avoid circular loops, and
74 therefore some complex multi-way name swapping situations may
75 not be fully processed.
76 In any case, name swapping and the use of this feature is dis‐
77 couraged, and you are invited to choose unique and unambiguous
78 names for your interfaces...
79
80 -D Dry-run mode. Ifrename won't change any interface, it will only
81 print new interface name, if applicable, and return.
82 In dry-run mode, interface name wildcards are not resolved. New
83 interface name is printed, even if it is the same as the old
84 name.
85
86 -V Verbose mode. Ifrename will display internal results of parsing
87 its configuration file and querying the interfaces selectors.
88 Combined with the dry-run option, this is a good way to debug
89 complex configurations or trivial problems.
90
92 Jean Tourrilhes - jt@hpl.hp.com
93
95 /etc/iftab
96
98 ifconfig(8), ip(8), iftab(5).
99
100
101
102wireless-tools 01 March 2004 IFRENAME(8)