Debian, 2 NICs load-balancing or agregating with one same gateway
Posted
by
pouney
on Server Fault
See other posts from Server Fault
or by pouney
Published on 2011-01-11T19:06:37Z
Indexed on
2011/01/11
19:56 UTC
Read the original article
Hit count: 284
Hi,
I have one server, with double NICs connected to one switch with the same gateway. Behind the switch we have internet.
|Debian| -> eth0 -> switch -> internet -> eth1 -> same
I don't understand how to load-balancing between eth0 and eth1. The inbound/outbound traffic always use eth1.
This is the config:
# The primary network interface
allow-hotplug eth0
auto eth0
iface eth0 inet static
address 192.168.248.82
netmask 255.255.255.240
network 192.168.248.80
broadcast 192.168.248.95
gateway 192.168.248.81
allow-hotplug eth1
auto eth1
iface eth1 inet static
address 192.168.248.83
netmask 255.255.255.240
network 192.168.248.80
broadcast 192.168.248.95
gateway 192.168.248.81
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.248.80 0.0.0.0 255.255.255.240 U 0 0 0 eth1
192.168.248.80 0.0.0.0 255.255.255.240 U 0 0 0 eth0
0.0.0.0 192.168.248.81 0.0.0.0 UG 0 0 0 eth1
0.0.0.0 192.168.248.81 0.0.0.0 UG 0 0 0 eth0
Ips aren't real, it's just for the example.
Anybody have an idea on correct routing to use eth0 on 192.168.248.82 and eth1 on 192.168.248.83 ? I have many example for multiple gateway but here it's the same.
Thanks all.
Regards
© Server Fault or respective owner