System with 2 NICS

Dave Andruczyk djandruczyk at yahoo.com
Thu Jun 3 21:05:01 EDT 2004


--- Robert Dege <rdege at cse.Buffalo.EDU> wrote:
> 
> I recently added a 2NIC to a server I have at work.  The server beforms 2
> functions, it acts as a NFS File Server, and it runs Amanda (Network
> Backup software)
> 
> The way that I want the server to work is that
> 
> NIC #1 - is dedicated to NFS traffic
> NIC #2 - is dedicated to Amanda network backups
> 
> Each NIC has their own IP, and own hostname.  This way, it's easy to point
> autofs to one host, and amanda clients tothe other host.  Both IPs are
> also in the same subnet, so I'm working within a single subnet.
> 
> here is my problem... according to netstat -rn, all outgoing
> network traffic is using NIC #2, whether the data is incoming from NIC #1
> or NIC #2.  Here's is my netstat -rn:
> 
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags   MSS Window  irtt
> Iface
> 167.225.72.0    0.0.0.0         255.255.255.0   U         0 0        0 eth1
> 167.225.72.0    0.0.0.0         255.255.255.0   U         0 0        0 eth1
> 169.254.0.0     0.0.0.0         255.255.0.0     U         0 0        0 eth1
> 127.0.0.0       0.0.0.0         255.0.0.0       U         0 0        0 lo
> 0.0.0.0         167.225.72.254  0.0.0.0         UG        0 0        0 eth1
> 
> 
> The first 2 entries are NIC #1 & NIC #2.  The 3rd entry is some Redhat
> Zeroconf crap.  Does anyone know what I have to do to get NIC #1 traffic
> to stay on NIC #1?
> 

Your route table is screwy, eth0 is not even in there.    Make sure your eth
config files have the right "DEVICE" or "DEV" line.

Normally when adding a route (the manual way) is:
	route add -net net_addy netmask net_mask dev ethx (the dev ethx binds this
route to a specific device,  if no "dev ethx" is specified I belive the kernel
defaults to using the first interface on that subnet,  if you have multiple
interfaces on that subnet it would blindly choose the first one unless you
specified it..

A probably better way (but is dependant on your switches) is to bind the two
ethernet adapters into one virtual nic (etherchannel), but requires a switch
that can do it (cisco 2900 or better). This will give you more bandwidth and
failover ability (in case one nic dies, or the cable gets yanked it'll still
work). This needs only 1 ip address. (only the virtual "etherchannel" device
gets the address the inidividual cards don't)





> Any insight is appreciated.
> 
> Dege
> 
> As seen on bash.org:
> The problem with America is stupidity. I'm not saying there
> should be a capital punishment for stupidity, but why don't
> we just take the safety labels off of everything and let
> the problem solve itself?


=====
Dave J. Andruczyk


	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 



More information about the nflug mailing list