# [SOLVED] Bonding init scripts hang on MAC address confict

## thejbo

I'm trying to setup two separate bonds with four NICs. I need to be able to use different options for each bond so I have setup separate bonding module instances.

So far so good, however when I try to restart, stop, or reboot the server, the init script hangs:

```
/etc/init.d/net.bond1 restart

 * WARNING:  you are stopping a boot service.

 * Stopping bond1

 *   Bringing down bond1

 *     Removing slaves from bond1 ...

 *       eth2 eth3

```

Watching the logs during this restart, I get the following:

```
bonding: bond1: Warning: the permanent HWaddr of eth2 - 00:a0:cc:3c:65:aa - is still in use by bond1. Set the HWaddr of eth2 to a different address to avoid conflicts.

```

It is my understanding that the bond will use the MAC from the first slave and that this is normal behavior. Indeed I have several other servers with bonds that work as expected with the assigned MAC address. Even so, manually resetting the MAC on any of the ethX devices does not seem to help.

I have also tried setting new MAC addresses for bond0 and bond1, but this fails. 

```
 * Starting bond1

 *   Adding slaves to bond1 ...

 *     eth2 eth3                                                          [ !! ]

 *   Changing MAC address of bond1 ...                                    [ !! ]

 *   Failed to set MAC address                                            [ !! ]

```

If anyone has successfully setup multiple bonds with separate options for each bond, I'd be interested to find out how you do it.

/etc/modules.d/bond

```
alias bond0 bonding

alias bond1 bonding

options bond0 -o bond0 mode=3 miimon=100

options bond1 -o bond1 mode=1 miimon=100 primary=eth2

```

/etc/modules.autoload.d/kernel-2.6

```
bond0 -o bond0

bond1 -o bond1

```

```
# lsmod

Module                  Size  Used by

bond1                  71264  0

bond0                  71264  0

```

/etc/conf.d/net

```

modules=( "iproute2" )

config_eth0=("null")

config_eth1=("null")

config_eth2=("null")

config_eth3=("null")

slaves_bond0="eth0 eth1"

slaves_bond1="eth2 eth3"

config_bond0=("192.168.1.4/24")

routes_bond0=("default via 192.168.1.1")

config_bond1=("192.168.2.50/24")

```

```
# ip addr

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue

    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo

    inet6 ::1/128 scope host

       valid_lft forever preferred_lft forever

2: eth0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 qlen 1000

    link/ether 00:50:2c:a7:9b:79 brd ff:ff:ff:ff:ff:ff

3: eth1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 qlen 1000

    link/ether 00:50:2c:a7:9b:79 brd ff:ff:ff:ff:ff:ff

4: eth2: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond1 qlen 1000

    link/ether 00:a0:cc:3c:65:aa brd ff:ff:ff:ff:ff:ff

5: eth3: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond1 qlen 1000

    link/ether 00:a0:cc:3c:65:aa brd ff:ff:ff:ff:ff:ff

6: sit0: <NOARP> mtu 1480 qdisc noop

    link/sit 0.0.0.0 brd 0.0.0.0

7: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue

    link/ether 00:50:2c:a7:9b:79 brd ff:ff:ff:ff:ff:ff

    inet 192.168.1.4/24 brd 192.168.1.255 scope global bond0

    inet6 fe80::250:2cff:fea7:9b79/64 scope link

       valid_lft forever preferred_lft forever

8: bond1: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue

    link/ether 00:a0:cc:3c:65:aa brd ff:ff:ff:ff:ff:ff

    inet 192.168.2.50/24 brd 192.168.2.255 scope global bond1

    inet6 fe80::2a0:ccff:fe3c:65aa/64 scope link

       valid_lft forever preferred_lft forever

```

Last edited by thejbo on Tue May 13, 2008 2:45 pm; edited 1 time in total

----------

## marrowhk

 :Exclamation: 

----------

## thejbo

Solved:

I changed the NICs from tulip based Netgears to 3c905 based 3Coms and everything works fine. I think it may have something to do with the Netgears not being fully supported by mii-tools.

----------

