This is my first question on this forum. Hope I will be able to help others in the future.

I have two boxes with two NICs each. I know that using bonding I can have some degree of fault tolerance but I feel I need something else. What I want is different traffic (PING, LOGIN, etc..) following one path and the other traffic (DRBD, web, etc..) following the other one.

Just in the case that one of the links fail, I want part of the other traffic (in my case, just IP for a heartbeat mechanism) following the same path as DRBD and web do. Is this possible?, what do I need to monitor links status and acct accordingly?. I would know how to do this statically (iproute and so on), but need it dynamically...


This tutorial on load-balancing links shows how to mark packets and dynamically choose a route. Instead of marking every nth packet, mark the packets based on port instead.

It's also my instinct that you don't need to use the conditional tagging, but rather just enter redundant routes in each table and set the route priority correctly. Example:


default via dev eth0 metric 100
default via dev eth1 metric 110

DRBD tagged:

default via dev eth0 metric 110
default via dev eth1 metric 100
  • I think this is a good response. Will dive deeply on it... priorities is perhaps what I need here... Thanks !.
    – kankamuso
    Jan 19 '12 at 14:54
  • @user107564 clicking the up arrow is liking giving us answer folk a cookie for our good work ;) Jan 19 '12 at 14:57
  • I just can click the tick mark. The arrow says I have no enough reputation yet, sorry :-(
    – kankamuso
    Jan 19 '12 at 15:12
  • @user107564 Ah, I forget about that happening when you're new. Glad to help! Jan 19 '12 at 15:17

You do not want what you're asking for in the Question. Use a single bond interface. Bonding has several different modes to accommodate various balances of throughput and fault tolerance. Be sure to put the time into configuring it correctly for your networks capability's and your application's requirements.

That said, you could create two bonding devices Bond0 and Bond1 which both have members Eth0 and Eth1, with Bond0 having Eth0 as primary and vice versa for Bond1, and configure the Bond interfaces for failover only. Then assign IPs to each of the Bond interfaces. And finally assign services to a particular IP. This would create a situation where traffic prefers one NIC or the other, but is an administrative nightmare and likely to cause many more problems than you perceive it to solve.

  • Thanks a lot for your response. I had a look at bonding and did not find a mode that would fit my needs, or did I?. Perhaps I am not able tu fully understand which one of the modes fits them... may be xor?. Also, I did not mention I only have two NICS and no possibility to add another one... so I cannot have a backup, idle slave.
    – kankamuso
    Jan 19 '12 at 14:13
  • What specifically did you think it did not fit?
    – Chris S
    Jan 19 '12 at 14:13
  • The fact that I did not find the way to adapt it dynamically depending on the traffic nature. I mean, I don't want to use the "data" connection to send "management" traffic unless strictly necessary. I have been reading about bonding and all goes in the MAC-MAC direction, no traffic-level...
    – kankamuso
    Jan 19 '12 at 14:18
  • Why do you think you don't want data and management co-mingling? I can see why you would want to logically separate them with a vLAN or similar, but they're both hitting the same switched Ethernet fabric anyway.
    – Chris S
    Jan 19 '12 at 14:27
  • Because I have two wireless links and one of them is now carrying VoIP traffic so I must reroute DRBD (high load) traffic using the other one. But I can still accomodate management (low traffic, some PINGS, etc..) using the VoIP connection.
    – kankamuso
    Jan 19 '12 at 14:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.