# lagg failover issue



## trutlze (Sep 3, 2012)

Hi,

Can you help me with this issue? I posted it to freebsd-net@, but until now no one was able to help me.



> I'm using following devices:
> 
> bge0 - NetLink BCM57780 Gigabit Ethernet PCIe
> ndis0 - BCM43225 802.11b/g/n
> ...





> I can provide some additional informations:
> 
> I read somewhere that it might be a problem to change the ethernet address of a
> ndis-interface. On the accesspoint I saw that although I changed the ethernet
> ...



Addition:
lagg0 continously shows

```
status: no carrier
```
when cable is removed.

I got mainly two hints:

MAC of wireless NIC can't be changed
possibly gratuitous arp problem

I think both hints aren't relevant to my problem.

Sources:
http://lists.freebsd.org/pipermail/freebsd-net/2012-August/033122.html
http://lists.freebsd.org/pipermail/freebsd-net/2012-August/033132.html


----------



## trutlze (Sep 4, 2012)

hello, world

Sorry for beeing obtrusive. Maybe I'm missing something.
Am I commiting a breach of etiquette, so that nobody wants to answer?
Or is this uncharted territory?
Do you need additional information?


----------



## Uniballer (Sep 4, 2012)

I don't see any breach of etiquette.  We probably just don't know anything useful to your situation.

My Mom taught me "If you can't post something useful, don't post anything at all."


----------



## mamalos (Sep 5, 2012)

Hi trutlze,

I think you should give some more info with respect to how your configuration is not working, like:
- You say that each interface works fine before creating the lagg0 interface. What is happening when lagg0 is created? None of them works? How are you testing it? Install a program that gives you a bit more information (you can try bmon) to see what's going on when you're sending packets to your lagg interface. Of course, you can see everything that's going on with tcpdump.
- If connectivity is present with both interfaces connected and lagg created, which you haven't covered in your post, what happens when you disconnect: a) the wired NIC, b) the wireless NIC?
- What is your topology and how are you trying to connect to your lagg interface?

These are a few questions that come to my head when reading your post (horizontally, to be honest, so you might be explaining something that I don't understand by reading this way  ).

Good luck.


----------



## trutlze (Sep 5, 2012)

Lucky to hear from you!

*@Uniballer*
Your mom seems to be a unix philosopher. 


*@mamalos*
Your *first question* should have been answered with 





> With cable connected I saw
> ping traffic (in & out) on lagg0 and bge0. When removing cable after a small
> break I only saw outgoing packages on lagg0.


I can push traffic through lagg0 in each direction while there is a cable plugged in bge0 (the failover-MASTER).

*Second question*, second answer:
Connectivity over lagg0 is present when both interfaces are connected and when bge0 is connected only. It's not present when wlan0 is connected only.

*Topology*

```
accesspoint
               |
blackbox|---|switch|---|host
```

lagg0 becomes the interface for the default gateway and the subnet of the requested IP when requesting IP/DNS/Gateway over DHCP on lagg0. Every traffic takes this route then.


----------



## mamalos (Sep 6, 2012)

trutlze,

I reread your initial post so as to understand exactly what you did. I think the problem is that lagg0 shows to be disconnected when your wired NIC is disconnected. I don't want to ask you what commands exactly you've used, since I assume that you've followed the steps correctly (and tried them more than once).

On the other hand, I was unable to understand your topology (sorry, I can be quite stupid at some times ), since I don't understand which one is your box and how you're connected to your wireless card (I saw an access point, a switch and a blackbox that confused me...). Moreover, I had some difficulties understanding your example of pinging that host. I suppose that your machine is connected to a LAN through your wired NIC and to a WAN (for the sake of simplicity) through a wireless NIC; the LAN has a default route and the wireless NIC as well (a different one). How were you able to send traffic to this external host through all three interfaces simultaneously since you're running a failover configuration and not a load-balancing configuration?

Sorry for not understanding your problem well, even though I am trying...

PS1. Have you tried the exact same configuration using a different wireless NIC (maybe with some driver already supported by FreeBSD)?
PS2. What is your routing configuration?


----------



## Terry_Kennedy (Sep 8, 2012)

trutlze said:
			
		

> Do you need additional information?


Posting the relevant pieces of your /etc/rc.conf might be helpful. I only run lagg in LACP mode, where both devices (FreeBSD system and the connected Ethernet switch) need to be running LACP for the lagg device to come up.


----------



## trutlze (Sep 10, 2012)

*mamalos*,

well, the "blackbox" should be the part of the net that isn't relevant to this issue (like other hosts or the "internet", etc. pp.). "host" should be the machine affected by the described issue. The lines in my "drawing" should be wires. The accesspoint offers wireless connections to clients.

The box is a notebook and should be connected to the same LAN through wired NIC and wireless NIC. Once the user disconnects the wired NIC the box should have access to the LAN through the wireless NIC without explicitly activating the wireless connection.

To me the benefit of using lagg is that you don't need to configure each NIC seperately (DNS, Gateway, Route). You can only configure your lagg-interface. And that's what I did. So the wired NIC and the wireless NIC don't have seperate configurations as you supposed in your post.

Unfortunately there is no other wireless NIC for testing.

Routing configuration is supplied by DHCP. lagg0 is the default gateway interface and default gateway is a router (hidden in "blackbox" in my drawing).

*Terry_Kennedy*,

My rc.conf looks like those examples I mentioned in my inital post. Only difference: I don't change the MAC of the wireless NIC, I change that of the wired one.


```
ifconfig_bge0="ether xx:xx:xx:xx:xx:xx"
kld_list="bcmwl564_sys"
wlans_ndis0="wlan0"
ifconfig_wlan0="WPA"
cloned_interfaces="lagg0"
ifconfig_lagg0="laggproto failover laggport bge0 laggport wlan0 DHCP"
```


----------



## mamalos (Sep 12, 2012)

truzle,

thanks for the clarifications, now I understand your network setup. I'll try your configuration at home, during the weekend, using my laptop (I use a different driver, iwn if I remember correctly), my AP and my LAN and I will post you my results.


----------



## trutlze (Sep 19, 2012)

"Are we there, yet?"


----------



## Beeblebrox (Sep 19, 2012)

I did not post before because my suggested solution is not directly related to your problem. It is about failover with diskless clients. Your system however, is not diskless from what I have read, but since the problem persists, maybe this will help:
http://www.bugs.au.freebsd.org/dokuwiki/doku.php/laggdiskless
Pay attention to the script you must create (/etc/rc.d/lagg) as linked at the end of the page. Also don't feel bad about your problem, as lagg still seems to be a work-in-progress and its adventurers must be willing to venture on...


----------



## mamalos (Sep 23, 2012)

trutlze,

I've just finished my tests at home with a USB stick run(4) wireless interface and an msk(4) wired interface and tried all combinations I could think of (first sharing the msk's MAC address, then the other way round). I disabled LAN and WiFi interchangeably, and at all times the laptop did not lose connectivity with the network. The only problems I encountered were routing related (when I was creating the wlan interface it remembered its last IP which was on the same subnet my lagg(4) interface was, so the kernel replied that interface was busy). Once I changed its IP to something else, everything worked like a charm (Ah, and I had to remove my statically configured default gateway as well).

So, your problem may have to do with your ndis(4) driver and your wireless card...


----------



## rjw (Oct 11, 2012)

From http://www.freebsd.org/cgi/man.cgi?query=lagg#EXAMPLES

```
(Note the mac address of the wireless device is forced to match the wired device as a workaround.)
```


----------



## trutlze (Jan 4, 2013)

Well, I tested the whole thing with a iwn device and it works as expected and as documented in handbook. So I think it's pretty likely that the problems I ran into were caused by the ndis-driver. Thanks to anyone trying to help me with this issue.


----------

