User:Mattx86/qwn:Renaming a network interface

From Alpine Linux
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Supppose I had an interface named eth3 and I want to rename it as neweth3.

Start out by specifying:

auto neweth3 iface neweth3 inet static

Followed by the address, netmask, gateway, etc., and then add this line:

pre-up nameif -s neweth3 00:11:22:33:44:55

This sets the interface name to neweth3, where the MAC address of the interface is 00:11:22:33:44:55.

Here's a full example:

auto neweth3 iface neweth3 inet static address 10.100.100.1 netmask 255.255.255.0 network 10.100.100.0 broadcast 10.100.100.255 pre-up nameif -s neweth3 00:11:22:33:44:55