# Bonding wired and wireless = Enslave failed

## cctsurf

I get a 

```
Master 'bond0', Slave 'eth1': Error: Enslave failed                       [ !! ]
```

 error on my wireless adapter when I attempt to bring up my bonded device.  I have followed http://gentoo-wiki.com/HOWTO_Setup_Bonded_ethernet_adaptersbut am attempting to use dhcp, not the manual configured style, because I may want to travel and use my wireless setup.

I am using a prism54 wireless card, is there a problem with changing mac address on that card?  I have attempted to make that my primary interface, then both interfaces fail as above.

I see a lot of people working with wpa_supplicant with more or less success, I am using wireless-tools because I've been using it since 802.11b days, and I live where I don't have to worry too much about people cracking my wep.

One thing I am looking to do is to have multiple access point information in my /etc/conf.d/net file, for the purpose of moving from place to place, should I move that to /etc/conf.d/wireless?  I thought that was deprecated.

I note that http://gentoo-wiki.com/HARDWARE_Wireless doesn't even mention bonding, but prefers to use ifplugd, but it seemed to me that bonding would be more elegant--as in, when I move from wired to wireless, my net video/audio wouldn't quit (maybe).

I've tried two major implementations of the /etc/conf.d/net files:

```

config_eth0=( "dhcp" )

essid_eth1="newton"

key_newton="xxxxxxx"

config_newton=( "dhcp" )

key_ACTIONTEC="xxxxxx"

config_ACTIONTEC=( "dhcp" )

key_lsmotel06="off"

config_lsmotel06=( "dhcp" )

slaves_bond0="eth0 eth1"

depend_bond0() {

  need net.eth1

}

config_bond0=( "null" )

```

and

```

config_eth0=( "null" )

essid_eth1="newton"

key_newton="xxxxx"

config_newton=( "null" )

key_ACTIONTEC="xxxxx"

config_ACTIONTEC=( "null" )

key_lsmotel06="off"

config_lsmotel06=( "null" )

slaves_bond0="eth0 eth1"

depend_bond0() {

  need net.eth1

}

config_bond0=( "dhcp" )

```

Both of which give the same error, even though the wireless card gets an address on the first try, it doesn't seem to stay powered up, and doesn't show up on the ifconfig under either configuration.

perhaps unrelated, but I get a

```
Jan  4 17:13:40 goel dhcpcd[1772]: eth1: adding route to 169.254.0.0/16 metric 2000
```

line in my /var/log/messages for both interfaces, which has nothing to do with anything as far as I can tell... - maybe part of the bonding?

Anyway thanks for the help in advance!

James

----------

## FantomKnight

I don't think this is possible. Awhile back I enabled interface bonding on a RedHat system for work. I don't remember that much about it except that the bonding interface is really a "dummy" interface. It doesn't actually exist. I believe that the documentation that I read at the time said that since it was a dummy interface, it couldn't get an address via DHCP and must be supplied one manually. I could be wrong because I can't find that documentation anymore. This wasn't an issue for me since all of our servers had static IPs.

----------

## cctsurf

I have gotten a dhcp address for my bond0 interface, when I use the 2nd configuration, and that is what it's supposed to do, have one address--even one mac address (taken from the primary interface) assigned to the bonded connection.  I have it set up to load the module in mode 1, which is automatic fallback, which is what others are doing to bond their connections like this. I got it to work through the wired connection, but the wireless doesn't work and I get the "Enslave Failed" error.

For Reference, I used the bonding topic.

I'm wondering how to overcome this error,

Thanks

James

----------

## Kulfaangaren!

 *cctsurf wrote:*   

> I get a 
> 
> ```
> Master 'bond0', Slave 'eth1': Error: Enslave failed                       [ !! ]
> ```
> ...

 

This problem is solved by adding something like ...

```
preup() {

        if [[ ${IFACE} == "wlan0" ]] ; then

                ifconfig wlan0 up

        fi

}
```

... to /etc/conf.d/net.

Seems ifenslave fails because the wlan0 iface is not setup properly before ifenslave is used.

// Fredrik

----------

