Quantcast
Channel: linuxadmin: Expanding Linux SysAdmin knowledge
Viewing all articles
Browse latest Browse all 17856

I'd like traffic to/from an IP to use the interface that has that IP. How can I make this happen?

$
0
0

Hello guys,

Yesterday I successfully set up a server that has two physical network interfaces, eth0 and eth1. Each picks up its own IP address via DHCP. Both IPs are reachable, I've bound services to both and things are generally working. Linux Debian Stable. Pretty straightforward stuff.

However, eth0 seems to be picking up most of the traffic; it's seeing a lot of RX and TX. Sometimes eth1 will take some RX from eth0 from time to time, but they're no TX on eth1 at all. I would like eth1 to have its respective traffic corresponding to the IP it's handling, and likewise with eth0, so that they're load-balanced. The Linux routing table tells me eth0 is the default interface, and that's fine, but I'm looking for a bit more traffic on eth1.

Here some routing information: ("X.Y.Z" is the beginning of the server's IP)

# ip route default via X.Y.Z.254 dev eth0 X.Y.Z.0/24 dev eth0 proto kernel scope link src X.Y.Z.4 X.Y.Z.0/24 dev eth1 proto kernel scope link src X.Y.Z.28 # route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 X.Y.Z.254 0.0.0.0 UG 0 0 0 eth0 X.Y.Z.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 X.Y.Z.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 

I'm behind a non-managed switch, so interface bonding may not be an option. I have a near identical problem to this post but I couldn't find an applicable solution. I've also looked at this resource and found this as well. I'm challenged by my limited knowledge of underlying networking protocol, but I would appreciate any advice.

One of the local sysadmin guys suggested "ip route add default via X.Y.Z.254 dev eth1" but I get "RTNETLINK answers: File exists".

Does anyone have experience with this sort of thing? What should I adjust to get the traffic more balanced on my machine?

submitted by DemandsBattletoads
[link][10 comments]

Viewing all articles
Browse latest Browse all 17856

Trending Articles