[ale] Dual NICs

Chris Ricker kaboom at gatech.edu
Fri Feb 14 11:57:10 EST 2003


On Thu, 13 Feb 2003, Thomas Holmquist wrote:

> I want 2 NICs in my server (in a load-balancing array) they would both
> be going to the same Lan.
> 
> where should I get started/any tips?

Look at the bonding driver. Basic idea is that you bind the two NICs together
as a single virtual interface:

[cricker at mooru cricker]$ /sbin/ifconfig 
bond0     Link encap:Ethernet  HWaddr 00:E0:18:25:00:F6  
          inet addr:10.1.0.5  Bcast:10.1.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:36711512 errors:0 dropped:0 overruns:1 frame:0
          TX packets:70010247 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 
          RX bytes:911066397 (868.8 Mb)  TX bytes:952155100 (908.0 Mb)

eth0      Link encap:Ethernet  HWaddr 00:E0:18:25:00:F6  
          inet addr:10.1.0.5  Bcast:10.1.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:25427716 errors:0 dropped:0 overruns:0 frame:0
          TX packets:35040887 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 
          RX bytes:783462271 (747.1 Mb)  TX bytes:499775924 (476.6 Mb)

eth1      Link encap:Ethernet  HWaddr 00:E0:18:25:00:F6  
          inet addr:10.1.0.5  Bcast:10.1.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:11283796 errors:0 dropped:0 overruns:1 frame:0
          TX packets:34969360 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 
          RX bytes:127604126 (121.6 Mb)  TX bytes:452379176 (431.4 Mb)
<snip>

Here, eth0 and eth1 are bound. Traffic is routed over bond0

[cricker at mooru cricker]$ netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
10.1.0.0        0.0.0.0         255.255.0.0     U        40 0          0 bond0
10.1.0.0        0.0.0.0         255.255.0.0     U        40 0          0 eth0
10.1.0.0        0.0.0.0         255.255.0.0     U        40 0          0 eth1
127.0.0.0       0.0.0.0         255.0.0.0       U        40 0          0 lo
0.0.0.0         10.1.0.1        0.0.0.0         UG       40 0          0 bond0
[cricker at mooru cricker]$ 

and load-balances across the underlying physical interfaces....

later,
chris
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale






More information about the Ale mailing list