Since people pointed to distribution specific files, let's
consolidate the knowledge:
 * Renaming interfaces used to be done by the nameif(8) command.
 * Although this command is still carried by modern distributions
   (e.g: my Fedora-8 and Fedora-9) its usage was deprecated in favor
   of the modern ip(8) command.
 * To rename an interface:
    /sbin/ip link set <some_mac_addr> name <wanted_name>

As is common in Unix/Linux systems, there are scripts that run these
commands for us (e.g: during boot), and these scripts read their
configuration information from other files.

The relevant script in Fedora/Centos/Red Hat is
  /etc/sysconfig/network-scripts/ifup-eth
and it calls the shell function rename_device defined
in /etc/sysconfig/network-scripts/network-functions.

Ehud Karni correctly pointed that these scripts read from:
> On Fedora/Centos the file /etc/sysconfig/network-scripts/ifcfg-eth<N>
> can have the line:   HWADDR=xx:xx:xx:xx:xx:xx  (mac address)
> to assign the eth<N> to specific network card.

As pointed by others, Debian has different scripts which read
the configuration in interfaces(5).

Yet, other distributions have their own scripts/configs. However
if we search for the nameif(8) or ip(8) commands in the right
directories (under /etc of course) we would find the correct
scripts to configure and from there the config files they use.

And we haven't talked about NetworkManager yet...

Cheers,

-- 
Oron Peled                             Voice/Fax: +972-4-8228492
[EMAIL PROTECTED]                  http://www.actcom.co.il/~oron
"In theory, there is no difference between theory and practice.
 In practice, there is."
        -- Yogi Berra

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to