User:Mattx86/qwn:Renaming a network interface

From Alpine Linux
Revision as of 10:42, 15 March 2011 by Mattx86 (talk | contribs) (Created page with "Supppose I had an interface named <code>eth3</code> and I want to rename it as <code>neweth3</code>. Start out by specifying: {{Cmd|auto neweth3 iface neweth3 inet static}} Fol...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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