Backup Ethernet interfaces

2007-12-25 9:35:00

Thanks to:

Harvey Wamboldt

mvanderv@yahoo.com

Ronald Loftin

Sam Vilain

Jonathan Loh

Arvinder Paul

marka@bluestone.com

Tim McDonough

Anthony Worrall

Benjamin Cline

Seth Rothenberg

MARC.NEWMAN@chase.com

Tom Ballingall

Joselito Alfonso

Jim Hebert

My original question:

> Just a quick question. Does Solaris support backup Ethernet interface

> (i.e., having a backup interface take over with the same IP address if

> the primary interface stops working)?

Several people suggest Sun's "Alternate Pathing". It could be found at

"http://docs.sun.com". (search by the keyword "Alternate Pathing").

However, it won't do automatic failover. You have to switch it over manually.

Arvinder Paul pointed out that a product called Etherchannel by Sun could

do this (I haven't checked this yet); Tom Ballingall said that they are

using "Sun Trunking 1.0.1" with a quad ether card on their Enterprise 450's.

Sam Vilain and Seth Rothenberg think it's easy to be done by a simple

script. The following is the script sent by Seth Rothenberg (thanks you

again):

==========================================================

#!/bin/sh

# script to add static route to configure le1

if [ ! -d /usr/bin ]

then # /usr not mounted

        exit

fi

echo "IN S71configle0" >> /tmp/success

 

date > /tmp/success

ifconfig -a >> /tmp/success 2>&1

echo "setting address for le1" >> /tmp/success

ifconfig le1 plumb >> /tmp/success 2>&1

ifconfig le1 ether aa:0:04:0:2:50 2>&1

ifconfig le1 inet testdg1 >> /tmp/success 2>&1

echo "setting netmask for le1" >> /tmp/success

ifconfig le1 netmask class_c broadcast + up >> /tmp/success 2>&1

ifconfig -a >> /tmp/success 2>&1

ping 255.255.255.255

netstat -r >> /tmp/success

==========================================================

The concept here is:

when the primary interface(le0, for example) stop working, then

ifconfig le0 down

ifconfig le0 unplumb

ifconfig le1 plumb

ifconfig le1 `uname -n` up

He also mention that in this case, make sure you do NOT have 2 interfaces

online with the same ethernet address.

The problem here is how to detect an interface error. I'm not a

programmer, so I don't know if there's any function which can check

whether a network interface is working properly or not(although I

think there should be one/some). To me, it seems like the command

"netstat -I le0" would do the trick. This command shows the state of the

interface. I think this might not be the best way. So please don't

hesitate to email me if you have a better resolution. I'll summarize

again.

Here are some other replies I got:

===================================

>From Harvey Wamboldt:

Yes. I'm not an expert, but one way to do this would be to install

two interfaces, then set the metric on the "backup" interface higher

than the "primary" interface. See ifconfig(1M). You should also be

aware that the ethernet address for a SPARCstation is stored in the

mainboard EEPROM. This means your startup scripts must "manually" set

the ethernet address for additional interfaces using something like:

  /sbin/ifconfig hme0 ether xx:xx:xx:xx:xx:xx

(I put mine in /etc/rcS.d/S30rootusr.sh inside a test for

/etc/hostname.hme0).

===================================

>From marka@bluestone.com:

This is a feature that is currently only supported as part of the

SunCluster software; the package is called NAFO (Network Adapter

Fail-Over). Maybe you could start a movement to pressure Sun into

unbundling NAFO from the SunCluster stuff (it really does work standalone,

they just don't sell or support it that way).

===================================

>From Joselito Alfonso:

YES, Solaris does support it...we have that setup and we're using Sun

Cluster 2.1.

We have a high availability configuration that has a backup for Ethernet

interfaces

(hme0 <--> hme3 and hme1 <--> hme2 ) and of course for the array and the

system itself...

===================================

Jerry Lu

Unix Administrator

Comments

Got something to say?

You must be logged in to post a comment.