Difference between revisions of "Renaming ethernet interfaces Debian 5"
From Kenneth Noyens
(Nieuwe pagina aangemaakt met '<h1>Renaming network interfaces</h1> Make a file /etc/mactab with the following contents: ---- <source lang="ini"> wan0 00:01:03:E5:6D:FC lan0 00:19:db:f6:3e:3d </so...') |
|||
Line 12: | Line 12: | ||
− | Now | + | Now enter the command "nameif" to activate the new names. <br /> |
− | + | Normally you have to enter this command every time after rebooting your server. <br /> | |
− | To do this | + | To do this automatically you can make a file (ex. nameif) in /etc/network/if-pre-up.d/: |
---- | ---- |
Revision as of 11:47, 22 November 2009
Renaming network interfaces
Make a file /etc/mactab with the following contents:
<source lang="ini"> wan0 00:01:03:E5:6D:FC lan0 00:19:db:f6:3e:3d </source>
This will rename the ethernet adapter with mac 00:01:03:E5:6D:FC to wan0 and ethernet adapter with mac 00:19:db:f6:3e:3d to lan0.
Now enter the command "nameif" to activate the new names.
Normally you have to enter this command every time after rebooting your server.
To do this automatically you can make a file (ex. nameif) in /etc/network/if-pre-up.d/:
<source lang="bash">
- !/bin/sh
PATH=/sbin
nameif </source>