How can I switch eth devices? - Ubuntu

This is a discussion on How can I switch eth devices? - Ubuntu ; Hi, Suppose I have two identical network devices in my Linux server, how can I physically determine which is eth0 and eth1. I could configure the interfaces and connect them individually and see which one 'works' when I ping another ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: How can I switch eth devices?

  1. How can I switch eth devices?

    Hi,

    Suppose I have two identical network devices in my Linux server, how can
    I physically determine which is eth0 and eth1. I could configure the
    interfaces and connect them individually and see which one 'works' when I
    ping another host in the network. I need this information beacause I want
    to do the following: I want a server with two identical network devices.
    Eth0 should be the active device, eth1 would be the backup device. When
    eth0 fails I want to switch to eth1 but, because of config and firewall
    issues, eth1 should become eth0. Howe can I achieve this.

    gr,
    maxx

  2. Re: How can I switch eth devices?

    maxx wrote:
    > Hi,
    >
    > Suppose I have two identical network devices in my Linux server, how can
    > I physically determine which is eth0 and eth1. I could configure the
    > interfaces and connect them individually and see which one 'works' when I
    > ping another host in the network. I need this information beacause I want
    > to do the following: I want a server with two identical network devices.
    > Eth0 should be the active device, eth1 would be the backup device. When
    > eth0 fails I want to switch to eth1 but, because of config and firewall
    > issues, eth1 should become eth0. Howe can I achieve this.
    >
    > gr,
    > maxx

    use ifconfig and identify using the HWaddr or select hardware information under preferences.

    Walt
    Tacoma, WA

  3. Re: How can I switch eth devices?

    On Wed, 26 Dec 2007 09:24:22 -0800, Walt Nelson wrote:

    > use ifconfig and identify using the HWaddr or select hardware
    > information under preferences.
    >
    > Walt
    > Tacoma, WA


    OK. That way I can identify the card. But the second question: how can I
    'switch' them. Suppose I want the current eth0 to be the future eth1 and
    the current eth1 to be the future eth0. Any idea how I can do that?

    gr,
    maxx

  4. Re: How can I switch eth devices?

    maxx wrote:
    > OK. That way I can identify the card. But the second question: how can I
    > 'switch' them. Suppose I want the current eth0 to be the future eth1 and
    > the current eth1 to be the future eth0. Any idea how I can do that?


    There used to be an amazing little tool called ifrename. But Gutsy now
    uses udev and a persistent naming scheme for network interfaces. You'll
    have to play with udev rules. This should help:
    http://obsidianlake.blogspot.com/200...faces-eth.html


    --
    As we enjoy great advantages from inventions of others, we should be
    glad of an opportunity to serve others by any invention of ours;
    and this we should do freely and generously.
    --Benjamin Franklin

  5. Re: How can I switch eth devices?

    maxx wrote:

    > On Wed, 26 Dec 2007 09:24:22 -0800, Walt Nelson wrote:
    >
    >> use ifconfig and identify using the HWaddr or select hardware
    >> information under preferences.
    >>
    >> Walt
    >> Tacoma, WA

    >
    > OK. That way I can identify the card. But the second question: how can I
    > 'switch' them. Suppose I want the current eth0 to be the future eth1 and
    > the current eth1 to be the future eth0. Any idea how I can do that?


    Use /etc/iftab or /etc/udev/rules.d/70-persistent-net.rules, depending
    on your Ubuntu version

    Florian
    --

    -----------------------------------------------------------------------
    ** Hi! I'm a signature virus! Copy me into your signature, please! **
    -----------------------------------------------------------------------

  6. Re: How can I switch eth devices?

    On Wed, 26 Dec 2007 19:36:47 +0000, maxx wrote:

    > On Wed, 26 Dec 2007 09:24:22 -0800, Walt Nelson wrote:
    >
    >> use ifconfig and identify using the HWaddr or select hardware
    >> information under preferences.
    >>
    >> Walt
    >> Tacoma, WA

    >
    > OK. That way I can identify the card. But the second question: how can I
    > 'switch' them. Suppose I want the current eth0 to be the future eth1 and
    > the current eth1 to be the future eth0. Any idea how I can do that?


    I am not sure if it is configured in the Ubuntu Kernel, but on server
    Linux distros, you would accomplish this via ethernet bonding. There is
    a howto here:

    http://www.kernel.org/pub/linux/kern...elo/linux-2.4/
    Documentation/networking/bonding.txt

    Basically, you do not use eth0 and eth1. Rather, you configure bond0 to
    hold bothe cards in a failover config, and switch on failure. It works
    quite well, but I only use Ubuntu on my desktops, and have never had the
    need for redundancy...




    --
    Joe - Linux User #449481/Ubuntu User #19733
    joe at hits - buffalo dot com
    "Hate is baggage, life is too short to go around pissed off all the
    time..." - Danny, American History X

+ Reply to Thread