Re: How to set my Linux machine to have two network cards with two IPs



William Pechter wrote:

In article <1180256578.345257.44170@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
<keanewoon@xxxxxxxxx> wrote:
Dear all gurus out there,

I am newbie to Linux and networking.

I have a Red hat linux that used as a Database machine, oracle.

I have 2 network cards that I wish to set to 192.168.0.10 and
192.168.0.11 respectively, the default gw is 192.168.0.1. The
connection of the two IPs coming from 2 different switches (still from
the same router).

My purpose is that : if one of the switches is down, my connection
still up with the other side.

I know switch is hardly "down", but i wish to have full redundancy.

What I did is, I jus set the 2 network cards with the two IPs and I
switch off one of the switches, "poof" the whole network
down..........so, how can it be done ?

Or any other alternatives ?


Thanks.


Google bonding network interfaces...

You need to have one ip address that is on both switches and will move
from a primary to a seconday NIC.

Follow on from this:

Caveat: I have only done bonding with 802.3ad for the purposes of link
aggregation (enhanced bandwith), not for failover.

I agree that bonding is probably the neater solution (only ever have one IP)
and I believe that a suitable way would be to use the arp monitoring
failover mode in the linux bonding module. Wanring though: don't just set
up a bonded link in aggregation mode willy nilly or there is going to be
much network weirdness resulting (arp confusion for one). The "ultimate"
documentation can be found in the linux source here:

linux/Documentation/networking/bonding.txt

To the OP - when you have a solution, I would recommend that you test it
thoroughly with 2 tcpdump sessions bound each to one NIC and see if it is
really behaving as you expect. Link aggregation requires support from the
switch infrastructure and I've never come across link aggregation working
where the links feed two different switches. Failover should howvere work
with any kit, though you might get a pregnant pause when the primary link
fails and the switches have to re-discover the path, but that shouldn;t be
more than a few seconds IME.

Cheers

Tim


.



Relevant Pages

  • Re: Big security/question
    ... > switches. ... We are part of a bigger network, ... Should I just forget Linux and buy some pretty ... A dedicated machine is always better. ...
    (comp.security.firewalls)
  • Re: Comparing SunTrunking and IPMP with Linuxs channel bonding module
    ... I have no idea if the Linux things you've posted are right or wrong.... ... bonding module under mode 6. ... If it's multiple switches, how does the host control inbound traffic ... only perform link aggregation for ports within itself, ...
    (comp.unix.solaris)
  • Re: How to set my Linux machine to have two network cards with two IPs
    ... I have a Red hat linux that used as a Database machine, ... if one of the switches is down, ... I jus set the 2 network cards with the two IPs and I ... Intel had it's own IANS software on the older Linux versions but is now ...
    (comp.os.linux.networking)
  • Re: Comparing SunTrunking and IPMP with Linuxs channel bonding module
    ... I have no idea if the Linux things you've posted are right or wrong.... ... If it's multiple switches, how does the host control inbound traffic ... to be the MAC address of one of the slaves. ... only perform link aggregation for ports within itself, ...
    (comp.unix.solaris)
  • Re: Is my system secure? What else should I do?
    ... > network functionality for my computing activities (browsing, ... My network shows No presence to the outside world, ... browsing and open for secure browsing. ... Linux is no longer protecting the other computers/devices on your local ...
    (comp.os.linux.security)