[CentOS] 2 nics, 2 networks, 2 switches

Ross S. W. Walker rwalker at medallion.com
Fri Sep 14 16:08:00 UTC 2007


Kanwar Ranbir Sandhu wrote:
> 
> Hi Everyone,
> 
> I have a server with two NICs. One NIC is already configured 
> for network
> A, but the second is disabled at the moment.  I want to enable it too,
> but put it on network B.  Unfortunately, I don't know how to do that.
> Well, what I've tried hasn't worked anyway.
> 
> Each NIC is plugged into a separate switch, and each network has it's
> own gateway.  But, I can only set one default gateway.  What 
> parameters
> do I need to use in the NIC config file to force NIC 1 to use 
> gateway 1,
> and NIC 2 to use gateway 2?  I tried using "GATEWAY=blah" in 
> each config
> file (ifcfg-eth0 and ifcfg-eth1), but it didn't work.
> 
> I'm over looking something.

There can only be 1 path to a destination at 1 time.

This being said you can use dynamic routing to distribute the load
across 2 paths with 'gated' by putting 2 default routes with equal
weight in the gated.conf and then gated will be responsible for
adding and removing the default route from the system's routing
table on a per-packet or per-connection basis.

You will need to select a routing protocol and have a peer that
can reciprocate this routing information.

-Ross

______________________________________________________________________
This e-mail, and any attachments thereto, is intended only for use by
the addressee(s) named herein and may contain legally privileged
and/or confidential information. If you are not the intended recipient
of this e-mail, you are hereby notified that any dissemination,
distribution or copying of this e-mail, and any attachments thereto,
is strictly prohibited. If you have received this e-mail in error,
please immediately notify the sender and permanently delete the
original and any copy or printout thereof.




More information about the CentOS mailing list