Mimiko wrote: 
> Hello.
> 
> This is a snippet of my interfaces config file:
> 
> auto eth0
> iface eth0 inet manual
> 
> auto eth1
> iface eth1 inet manual
> 
> auto bond0
> iface bond0 inet manual
>       bond-slaves eth0 eth1
>       bond-mode 802.3ad
>       bond-miimon 100
>       bond-downdelay 200
>       bond-updelay 200
> 
> auto vlan10
> iface vlan10 inet static
>       vlan-raw-device bond0
>       address A.B.C.D
>       netmask X.X.X.X
> 
> 
> 
> On one answer in Internet I've found this mode to configure bonding:
> 
> auto bond0
> iface bond0 inet manual
>         down ip link set $IFACE down
>         post-down rmmod bonding
>         pre-up modprobe bonding mode=4 miimon=200
>         up ip link set $IFACE up mtu 9000
>         up udevadm trigger
> 
> allow-hotplug eth0
> iface eth0 inet manual
>         up ifenslave bond0 $IFACE
>         down ifenslave -d bond0 $IFACE 2> /dev/null
> 
> allow-hotplug eth1
> iface eth1 inet manual
>         up ifenslave bond0 $IFACE
>         down ifenslave -d bond0 $IFACE 2> /dev/null
> 
> 
> My question is, what is a better method of configuring bonding? Whats a core 
> difference in the two types of configuration listed?

The first method:

- uses auto instead of allow-hotplug. Auto tries to bring up the
  interface at boot time. Preferred for PCI/PCIe and
  on-motherboard devices.

- uses integrations into /etc/network/interfaces


The second method:

- uses allow-hotplug. This method waits for kernel to generate
  hotplug events. Preferred for USB interfaces and anything that
  you are likely to yank and reinsert while powered up.

- doesn't use the integration features

For a system which is expected to work immediately at boot, you 
want auto.

For a system which doesn't have anything particularly weird
going on, you want to use the integrations.

-dsr-

Reply via email to