📄 ifrename.8
字号:
.\" Jean II - HPL - 2004.\" ifrename.8.\".TH IFRENAME 8 "01 March 2004" "wireless-tools" "Linux Programmer's Manual".\".\" NAME part.\".SH NAMEifrename \- rename network interfaces based on various static criteria.\".\" SYNOPSIS part.\".SH SYNOPSIS.B "ifrename [-c configfile] [-p] [-d] [-v] [-V] [-D]".br.B "ifrename [-c configfile] [-i interface] [-n newname]".\".\" DESCRIPTION part.\".SH DESCRIPTION.B Ifrename is a tool allowing you to assign a consistent name to each of yournetwork interface..PPBy default, interface names are dynamic, and each network interface isassigned the first available name.RI ( eth0 ", " eth1 "...)."The order network interfaces are created may vary. For built-ininterfaces, the kernel boot time enumeration may vary. For removableinterface, the user may plug them in any order..PP.B Ifrenameallow the user to decide what name a network interface will have..B Ifrename can use a variety of.I selectorsto specify how interface names match the network interfaces on thesystem, the most common selector is the interface .IR "MAC address" ..PP.B Ifrenamemust be run before interfaces are brought up, which is why it's mostlyuseful in various scripts (init, hotplug) but is seldom used directlyby the user. By default,.B ifrename renames all present system interfaces using mappings defined in.IR /etc/iftab ..\".\" PARAMETER part.\".SH PARAMETERS.TP.BI "-c " configfileSet the configuration file to be used (by default .IR /etc/iftab ).The configuration file define the mapping between selectors andinterface names, and is described in.IR iftab (5)..brIf.I configfileis "-", the configuration is read from stdin..TP.B -pProbe (load) kernel modules before renaming interfaces. By default.B ifrename only check interfaces already loaded, and doesn't auto-load therequired kernel modules. This option enables smooth integration withsystem not loading modules before calling.BR ifrename ..TP.B -dEnable various.B Debianspecific hacks. Combined with.BR -p ,only modules for interfaces specified in.I /etc/network/interfaceare loaded..TP.BI "-i " interfaceOnly rename the specified.I interface as opposed to all interfaces on the system. The new interface name isprinted..TP.BI "-n " newnameWhen used with.IR -i ,specify the new name of the interface. The list of mappings from theconfiguration file is bypassed, the interface specified with.I -iis renamed directly to.IR newname .The new name may be a wildcard containing a single '*'..brWhen used without .IR -i ,rename interfaces by using only mappings that would rename them to.IR newname .The new name may not be a wildcard. This use of ifrename isdiscouraged, because inefficient.RI ( -n " without " -i ).All the interfaces of the system need to be processed at eachinvocation, therefore in most case it is not faster than just lettingifrename renaming all of them (without both .IR -n " and " -i )..TP.B -tEnable name takeover support. This allow interface name swappingbetween two or more interfaces..brTakeover enable an interface to 'steal' the name of anotherinterface. This works only with kernel 2.6.X and if the otherinterface is down. Consequently, this is not compatible withHotplug. The other interface is assigned a random name, but may berenamed later with 'ifrename'..brThe number of takeovers is limited to avoid circular loops, andtherefore some complex multi-way name swapping situations may not befully processed..brIn any case, name swapping and the use of this feature is discouraged,and you are invited to choose unique and unambiguous names for yourinterfaces....TP.B -DDry-run mode. Ifrename won't change any interface, it will only printnew interface name, if applicable, and return..brIn dry-run mode, interface name wildcards are not resolved. Newinterface name is printed, even if it is the same as the old name..TP.B -VVerbose mode. Ifrename will display internal results of parsing itsconfiguration file and querying the interfaces selectors. Combinedwith the.I dry-runoption, this is a good way to debug complex configurations or trivialproblems..\".\" AUTHOR part.\".SH AUTHORJean Tourrilhes \- jt@hpl.hp.com.\".\" FILES part.\".SH FILES.I /etc/iftab.\".\" SEE ALSO part.\".SH SEE ALSO.BR ifconfig (8),.BR ip (8),.BR iftab (5).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -