Difference between revisions of "Rename network interfaces"

From ArchWiki
Jump to: navigation, search
(Deprecated because of http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames.)
(Merged.)
Line 1: Line 1:
[[Category:Hardware detection and troubleshooting]]
+
#REDIRECT [[Configuring Network#Network Interfaces]]
[[Category:Networking]]
+
{{merge|Configuring Network}}
+
 
+
==Prerequisites==
+
* {{Ic|ifrename}} tool which is a part of the {{Ic|wireless_tools}} package.
+
 
+
==Generic network interfaces==
+
 
+
===Option 2: ifrename===
+
Run ifrename directly
+
 
+
  # ifrename -i eth0 -n lan
+
 
+
or create config file ({{ic|/etc/iftab}}), for example:
+
 
+
lan mac 00:0C:6E:C6:94:81
+
internet mac 00:0C:6E:C6:94:82
+
 
+
and run
+
 
+
  # ifrename -c /etc/iftab
+
 
+
==PPP interfaces==
+
Add into {{ic|/etc/ppp/ip-up}} script the following lines:
+
 
+
  IF=$1
+
  ip link set dev $IF down
+
  /usr/sbin/ifrename -i $IF -n <NEWNAME>
+
  ip link set dev <NEWNAME> up
+
 
+
where <NEWNAME> is the new name for the ppp interface
+

Revision as of 08:26, 22 March 2013