[CentOS] 2 nics, 2 networks, 2 switches

Ken Price kprice at nowyouknow.net
Fri Sep 14 16:16:05 UTC 2007


What you're asking can be done a number of ways with different levels  
of complexity, the simplest using routing tables and IPTABLES.   
Instead of asking this list how to technically do this, I'd suggest  
that first you describe what you're trying to accomplish at a higher  
level.  And be very specific.  Then you will/should receive technical  
advice better suited to your problem.

>
> 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.
>
> Regards,
>
> Ranbir
>






More information about the CentOS mailing list