{"id":3182,"date":"2022-12-20T16:43:44","date_gmt":"2022-12-20T19:43:44","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/ifrename-man8\/"},"modified":"2022-12-20T16:43:44","modified_gmt":"2022-12-20T19:43:44","slug":"ifrename-man8","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/ifrename-man8\/","title":{"rendered":"IFRENAME (man8)"},"content":{"rendered":"<h1 align=\"center\">IFRENAME<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#PARAMETERS\">PARAMETERS<\/a><br \/> <a href=\"#AUTHOR\">AUTHOR<\/a><br \/> <a href=\"#FILES\">FILES<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">ifrename \u2212 rename network interfaces based on various static criteria<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>ifrename [-c configfile] [-p] [-d] [-u] [-v] [-V] [-D] [-C] <br \/> ifrename [-c configfile] [-i interface] [-n newname]<\/b><\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Ifrename<\/b> is a tool allowing you to assign a consistent name to each of your network interface.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">By default, interface names are dynamic, and each network interface is assigned the first available name (<i>eth0<\/i>, <i>eth1<\/i>&#8230;). The order network interfaces are created may vary. For built-in interfaces, the kernel boot time enumeration may vary. For removable interface, the user may plug them in any order.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Ifrename<\/b> allow the user to decide what name a network interface will have. <b>Ifrename<\/b> can use a variety of <i>selectors<\/i> to specify how interface names match the network interfaces on the system, the most common selector is the interface <i>MAC address<\/i>.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Ifrename<\/b> must be run before interfaces are brought up, which is why it\u2019s mostly useful in various scripts (init, hotplug) but is seldom used directly by the user. By default, <b>ifrename<\/b> renames all present system interfaces using mappings defined in <i>\/etc\/iftab<\/i>.<\/p>\n<h2>PARAMETERS <a name=\"PARAMETERS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>-c<\/b> <i>configfile<\/i><\/p>\n<p style=\"margin-left:22%;\">Set the configuration file to be used (by default <i>\/etc\/iftab<\/i>). The configuration file define the mapping between selectors and interface names, and is described in <i>iftab<\/i>(5). <br \/> If <i>configfile<\/i> is &#8220;-&#8220;, the configuration is read from stdin.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"3%\">\n<p><b>-p<\/b><\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"78%\">\n<p>Probe (load) kernel modules before renaming interfaces. By default <b>ifrename<\/b> only check interfaces already loaded, and doesn\u2019t auto-load the required kernel modules. This option enables smooth integration with system not loading modules before calling <b>ifrename<\/b>.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"3%\">\n<p><b>-d<\/b><\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"78%\">\n<p>Enable various <b>Debian<\/b> specific hacks. Combined with <b>-p<\/b>, only modules for interfaces specified in <i>\/etc\/network\/interface<\/i> are loaded.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\"><b>-i<\/b> <i>interface<\/i><\/p>\n<p style=\"margin-left:22%;\">Only rename the specified <i>interface<\/i> as opposed to all interfaces on the system. The new interface name is printed.<\/p>\n<p style=\"margin-left:11%;\"><b>-n<\/b> <i>newname<\/i><\/p>\n<p style=\"margin-left:22%;\">When used with <i>-i<\/i>, specify the new name of the interface. The list of mappings from the configuration file is bypassed, the interface specified with <i>-i<\/i> is renamed directly to <i>newname<\/i>. The new name may be a wildcard containing a single \u2019*\u2019. <br \/> When used without <i>-i<\/i>, rename interfaces by using only mappings that would rename them to <i>newname<\/i>. The new name may not be a wildcard. This use of ifrename is discouraged, because inefficient (<i>-n<\/i> without <i>-i<\/i>). All the interfaces of the system need to be processed at each invocation, therefore in most case it is not faster than just letting ifrename renaming all of them (without both <i>-n<\/i> and <i>-i<\/i>).<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"3%\">\n<p><b>-t<\/b><\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"78%\">\n<p>Enable name takeover support. This allow interface name swapping between two or more interfaces.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\">Takeover enable an interface to \u2019steal\u2019 the name of another interface. This works only with kernel 2.6.X and if the other interface is down. Consequently, this is not compatible with Hotplug. The other interface is assigned a random name, but may be renamed later with \u2019ifrename\u2019. <br \/> The number of takeovers is limited to avoid circular loops, and therefore some complex multi-way name swapping situations may not be fully processed. <br \/> In any case, name swapping and the use of this feature is discouraged, and you are invited to choose unique and unambiguous names for your interfaces&#8230;<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><b>-u<\/b><\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"78%\">\n<p style=\"margin-top: 1em\">Enable <i>udev<\/i> output mode. This enables proper integration of <b>ifrename<\/b> in the <i>udev<\/i> framework, <b>udevd<\/b>(8) will use <b>ifrename<\/b> to assign interface names present in <i>\/etc\/iftab<\/i>. In this mode the output of ifrename can be parsed directly by <b>udevd<\/b>(8) as an IMPORT action. This requires <i>udev<\/i> version 107 or later.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"3%\">\n<p><b>-D<\/b><\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"78%\">\n<p>Dry-run mode. Ifrename won\u2019t change any interface, it will only print new interface name, if applicable, and return.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\">In dry-run mode, interface name wildcards are not resolved. New interface name is printed, even if it is the same as the old name. <br \/> Be also aware that some selectors can only be read by root, for example those based on <b>ethtool<\/b>), and will fail silently if run by a normal user. In other words, dry-run mode under a standard user may not give the expected result.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><b>-V<\/b><\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"78%\">\n<p style=\"margin-top: 1em\">Verbose mode. Ifrename will display internal results of parsing its configuration file and querying the interfaces selectors. Combined with the <i>dry-run<\/i> option, this is a good way to debug complex configurations or trivial problems.<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"3%\">\n<p><b>-C<\/b><\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"78%\">\n<p>Count matching interfaces. Display the number of interface matched, and return it as the exit status of ifrename.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\">The number of interfaces matched is the number of interface on the system for which a mapping was found in the config file (which is different from the number of interface renamed).<\/p>\n<h2>AUTHOR <a name=\"AUTHOR\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Jean Tourrilhes \u2212 jt@hpl.hp.com<\/p>\n<h2>FILES <a name=\"FILES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>\/etc\/iftab<\/i><\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><b>ifconfig<\/b><\/i>(8), <b>ip<\/b>(8), <b>iftab<\/b>(5).<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  ifrename \u2212 rename network interfaces based on various static criteria <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[5,52,324,4],"class_list":["post-3182","post","type-post","status-publish","format-standard","hentry","category-8-administracion-del-sistema","tag-5","tag-administracion","tag-ifrename","tag-man8"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3182","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=3182"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3182\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=3182"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=3182"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=3182"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}