Fixed NIC names

Question: 

I have two NIC's, one wired and one wireless. On each boot SuSE 9.3 seems to randomly assign eth0 to one of them and eth1 to the other. It doesn't matter that the wireless is disabled. How do I assign a fixed name to each NIC?

Answer: 

You need to assign a "persistent name" to each NIC.

In "/etc/sysconfig/network" you will find a file named ifcfg-something for each NIC. Edit the ones whose names end with MAC adresses and add the line

PERSISTENT_NAME=xxx

to one of them, and

PERSISTENT_NAME=yyy

to the other, then run

SuSEconfig

and

/etc/init.d/network restart.

Note that the names can not be eth0, etc1, etc, since names with that format are reserved. It is generally a good idea to use descriptive names like lan, wan or wlan.

 

Comments

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <small> <sup> <sub> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <h2> <h3> <h4> <img> <br> <br /> <p> <div> <span> <b> <i>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.