Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

2 Answers

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

http://lartc.org/howto/lartc.rpdb.html

http://www.securityfocus.com/archive/91/412504/30/420/threaded

http://linux-ip.net/html/adv-multi-internet.html

share|improve this answer
add comment

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
add comment

Your Answer

 
discard

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.