Solved

Backup Network Connection

Posted on 2002-07-17
7
257 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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

762 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

18 Experts available now in Live!

Get 1:1 Help Now