bond over bonds

hello,

i have the following config which works quiet good:

There are two 3x1Gbit 802.3ad bonds and they are connected to
two redundant switches so i want a active-backup bond on top of these two bonds.

And this works but if i reboot the router the bond didn’t start automaticly. I
thing this is a order problem. How could i solve this?

add mode=active-backup mtu=9100 name=sw12 slaves=sw12-1,sw12-2
add mode=802.3ad mtu=9100 name=sw12-1 slaves=gi1-bond-sw12-1,gi2-bond-sw12-1,gi3-bond-sw12-1
add mode=802.3ad mtu=9100 name=sw12-2 slaves=gi6-bond-sw12-2,gi7-bond-sw12-2,gi8-bond-sw12-2

If i stop sw12 and start it again all is working.

thx

meno

Have you tried using the scheduler to start your second bonding interface some seconds after the first ?
i.e.

/system scheduler
add disabled=no name=schedule1 on-event="/interface disable bonding1\r\
    \n/interface disable bonding2\r\
    \n/interface enable bonding1\r\
    \nping count=5 127.0.0.1\r\
    \n/interface enable bonding1\r\
    \n" policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api start-time=startup

So, at startup, you disable all bonding interfaces, then enable the first one, wait 5 seconds (with a fake ping) and enable the second bonding interface.

I now build this ugly hack to enable a bond over a bond and it works…but please MikroTik
fix this problem internaly.

Here is how it works

/interface bonding
add arp=disabled mode=802.3ad mtu=9200 name=sw12-1 slaves=gi1-bond-sw12-1,gi2-bond-sw12-1,gi3-bond-sw12-1
add arp=disabled mode=802.3ad mtu=9200 name=sw12-2 slaves=gi6-bond-sw12-2,gi7-bond-sw12-2,gi8-bond-sw12-2
add mode=active-backup mtu=9200 name=sw12 slaves=_sw12-1,_sw12-2



/system script
add name=disable-sw12 policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive source=\
    "/interface bonding disable [ find name=sw12 ]; /system scheduler enable [ find name=enable-sw12 ]"
add name=enable-sw12 policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive source=" \
    \n  :local run [ /interface bonding find running=yes and (name=_sw12-1 or name=_sw12-2)]\
    \n  :if (\$run!=\"\") do={ \
    \n    /interface bonding enable [find name=sw12]\
    \n    /system schedule disable [ find name=enable-sw12 ] \
    \n  } \
    \n"



/system scheduler
add name=disable-sw12 on-event=disable-sw12 policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive \
    start-time=startup
add disabled=yes interval=10s name=enable-sw12 on-event=enable-sw12 policy=\
    ftp,reboot,read,write,policy,test,password,sniff,sensitive start-date=oct/07/2014 start-time=17:27:49

Again this is ugly bad awful just a hack…mikrotik solve this internally.
meno