Solved

Backup Network Connection

Posted on 2002-07-17
7
259 Views
Last Modified: 2013-12-27
Greeting,

I have Solaris servers and I want to connect every server to two Ethernet switches. That's mean I will have two Network Interface Cards (NIC) on every Solaris server.

The scenario that I want is as following:
if one of the two switches failed while the active Ethernet connection on the server is connected to it, the Solaris machine should switch the traffic to the other Ethernet interface (the backup interface)

So, I would like to know if this kind of back is possible. If not, how I can install backup network interface on the Solaris machine???

If this is possible, then how and what are the commands and I prefer both Ethernet interfaces to be in the same IP segment.

Please assist...
Thanks
0
Comment
Question by:omars
7 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7160515
this is possible, and simple. The command you need is: ifconfig

Then you need to write a watchdog script, which periodicaly checks the connection, and switches to the backup NIC if the primary one failed. Somthing like:

   ping -c 1 -w 1 ip-NIC1
   if ($status == 1) then
      ifconfig le0 IP-le0 down
      ifconfig le0 0.0.0.0
      ifconfig le1 IP-le1 down
      ifconfig le1 IP-le0 up
   endif

I recommend to use different subnets for the 2 NICs.
0
 
LVL 2

Expert Comment

by:blowfish
ID: 7161272
Once you run the ifconfig commands, you will also need to change the default route.  

If you have services running like Apache, then they are probably listening on one or more virtual IPs configured on the card that went down.  You will probably need to maintain two configuration files in this case, and stop and start services each time you switch NICs.  

0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7161354
oops, I missed the route stuff, thanks blowfish

About Apache, etc.: most services do not need to be restarted (as long as they are bound to IP, not NICs)
0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 

Author Comment

by:omars
ID: 7161826
Will this script affect the network speed or performance or the server performance since my servers are too busy.

Also, is this applicable for the firewall serevrs??

Thanks
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7162077
> .. affect the network speed or performanc ..
depends on how you measure your performance.
In fact the script shuts down the network for a few milliseconds. But does this really matter, if the primary NIC already had gone (and so does not respond anything)?

> .. applicable for the firewall ..
depends on the firewall.
Most modern firewalls use packetfilters which can have rules depending on NIC and/or MAC. In this case it's best to stop and then restart the firewall service.
0
 
LVL 14

Accepted Solution

by:
chris_calabrese earned 200 total points
ID: 7162488
Actually, if your routers support Router Discovery Protocol, Solaris 8 and above can do this automagically without the need for special watchdog scripts. And it'll even balance the load through the two interfaces.

See http://www.sun.com/solutions/blueprints/0201/Multipathing.pdf
0
 
LVL 1

Expert Comment

by:k.kidambi
ID: 7163300
If you are running Solaris 8 then I would suggest Chris_calabrese way of doing the NIC teaming / multipathing.

Thanks
kidambi
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

813 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

10 Experts available now in Live!

Get 1:1 Help Now