1

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?

user160755
  • 11
  • 2

2 Answers2

1

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

dmourati
  • 25,540
  • 2
  • 42
  • 72
0

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.

John
  • 9,070
  • 1
  • 29
  • 34
  • I should have also included (before) that I'm using CentOS6.2. I was thinking that one could use the: GATEWAY=
    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