But I don't know how to enable ifenslave at boot?
# ifenslave bond0 eth0 eth1
Can I put that in /etc/network/interfaces?
Sorry, by Googling I found some options.
Is it correct below?
# apt-get install ifenslave
In /etc/modules i put "bonding".
In /etc/network/interfaces I put this:
auto bond0
iface bond0 inet static
address 1.2.3.4
netmask 1.2.3.4
gateway 1.2.3.4
up ifenslave bond0 eth0
up ifenslave bond0 eth1
post-down ifconfig eth1 down
post-down ifconfig eth0 down
See, you're smarter than I am :)
It looks ok to me, I forgot about this (from the man file) in my previous post:
up command
Run command after bringing the interface up.
So it seems to me like you're ready to roll. Why don't you give it a go with:
/etc/init.d/networking restart