Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a server that has (4) physical port (let's call them eth0 to eth3). What I would like to do is have two separate bonded interfaces (bond0 and bond1) that aggregate eth0,1 and eth2,3 resp.

Can I do this and give each its own default GW? I can use separate subnets and/or VLANs to connect up the interfaces to the upstream switch.

Are there any weird side-effects that anyone can think of that would create asymmetric routing or similar?

share|improve this question

You can setup policy based routing and use iptables fwmarks to pick interfaces and set routes based on your internal VLANs/subnets, ports, etc.

share|improve this answer

The system can have only a single default gateway. You can give it two, but the behavior at that point would be undefined and most likely not what you want. You can put each of the bonds on different subnets, but you only get one default gateway.

share|improve this answer
I should have also included (before) that I'm using CentOS6.2. I was thinking that one could use the: GATEWAY=<address> within the /etc/sysconfig/network-scripts/ifcfg-bond0/1 file to change the default GW for each bond to over-ride the system's default GW. No? – user160755 Feb 19 '13 at 19:53
The GATEWAY= line will override the system's default gateway, not that interface's gateway. The default gateway is a system setting, not an individual interface setting. – John Feb 19 '13 at 20:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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