How can I force a network device to always be eth0 (for example)?

Posted on 2006-04-21
Last Modified: 2008-03-10
I've recently figured out a problem when upgrading from 2.4 kernel to 2.6. It was because the 2.4 kernel detected my (in use) network adapter as eth0 while the 2.6 kernel detected the unused network adapter as eth0 instead.  I had to configure eth1 to get the 2.6 kernel on the network.

1. Was it detected differently because of udev?
2. Can I force a network adapter to always be eth0?

Many thanks,
Question by:sda100
    LVL 43

    Accepted Solution

    Example from my RH system
    file: /etc/udev/rules.d/10-localeth.rules content

    Also, You can use ifrename tool
    LVL 9

    Author Comment

    Thank you.  I use Gentoo, which is slightly different but you pointed me in the right direction, and I've solved my problem.  Thank you very much.

    Steve :)

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    In this tutorial I will explain how to make squid prevent malwares in five easy steps: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-…
    rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now