From nobody@FreeBSD.org  Wed Apr  6 15:24:56 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 847C91065670
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  6 Apr 2011 15:24:56 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 75AC78FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  6 Apr 2011 15:24:56 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p36FOtIH078651
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 6 Apr 2011 15:24:55 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p36FOtMh078650;
	Wed, 6 Apr 2011 15:24:55 GMT
	(envelope-from nobody)
Message-Id: <201104061524.p36FOtMh078650@red.freebsd.org>
Date: Wed, 6 Apr 2011 15:24:55 GMT
From: Per von Zweigbergk <pvz@itassistans.se>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Lagg failover does not announce the failover to switch
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         156226
>Category:       kern
>Synopsis:       [lagg]: failover does not announce the failover to switch
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-net
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 06 15:30:09 UTC 2011
>Closed-Date:    
>Last-Modified:  Tue Oct 23 01:20:00 UTC 2012
>Originator:     Per von Zweigbergk
>Release:        8.2
>Organization:
IT-Assistans Sverige AB
>Environment:
FreeBSD redacted.invalid 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011     root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
I have an environment where I want failover between two links to the same subnet on two different switches (some kind of HP Procurve Switches, I don't have the exact model number of them handy).

The switch itself has not been configured to treat the ports specially.

When the link goes down, lagg switches its ACTIVE interface properly, however there is no gratuitous ARP sent out on the link. This means that the CAM on the switch is never updated.

More information is available at a forum thread on the FreeBSD forums: https://forums.freebsd.org/showthread.php?p=102093 - This problem is known since at least FreeBSD 8.0. The problem does not seem to be specific to the em driver, it seems to happen with bce also.
>How-To-Repeat:
Get two switches, hook them together.

On a FreeBSD 8.2 host with two NIC:s, configure them to use lagg-failover. Plug the two NICs into the two different switches.

Yank out the cable to simulate a network failure of the currently-active network card, while running a ping from another host to that host.

Observe that the affected host stops responding to ping.

Send some random traffic from the affected host, and observe that it now starts responding to ping again. Alternatively, wait until the CAM tables in the switch time out.
>Fix:
Make the lagg driver send out a gratuitous ARP in case of a failover. This will update the CAM tables and prevent this problem from occurring.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: remko 
Responsible-Changed-When: Wed Apr 6 20:38:58 UTC 2011 
Responsible-Changed-Why:  
Reassign to -net 

http://www.freebsd.org/cgi/query-pr.cgi?pr=156226 

Date: Mon, 12 Mar 2012 11:51:42 +1100
From: Jason Leschnik <leschnik@gmail.com>
To: bug-followup@FreeBSD.org, pvz@itassistans.se
In-Reply-To: <20120309143434.GB91986@sandvine.com>
Subject: Fwd: Lagg failover does not announce the failover to switch

 ---------- Forwarded message ----------
 From: Ed Maste <emaste@freebsd.org>
 Date: Sat, Mar 10, 2012 at 1:34 AM
 Subject: Re: Lagg failover does not announce the failover to switch
 To: Jason Leschnik <leschnik@gmail.com>
 Cc: freebsd-net@freebsd.org
 
 
 On Wed, Mar 07, 2012 at 02:28:32PM +1100, Jason Leschnik wrote:
 
 > Lagg failover does not gratuitous ARP on the new interface to announce
 > the link failover - This leaves clients trying to access the failed
 > link and never making it to the up'd link.
 >
 > Bug ID: 156226
 > Found on this todo list: http://wiki.freebsd.org/EdMaste/ToDo
 >
 > I was wondering if i could offer a donation Hardware/Money to get this
 > fixed, in my opinion this is a very important feature for the
 > platform. I understand there are other ways to correct the behavior
 > but one would expect this to be solved in the driver.
 
 We've posted a prototype patch for comments:
 http://lists.freebsd.org/pipermail/freebsd-net/2012-February/031328.html
 
 Gleb raised some concerns that we'll look to address before this is
 ready to be committed to the tree, but any testing you can provide on
 the patch in its current state would be appreciated. =A0The (externally
 visible) functionality should remain unchanged.
 
 I appreciate your offer of a hardware or monetary donation, although at
 this point we're not being held up by either. =A0You can send your
 donation to the FreeBSD Foundation instead to help support the FreeBSD
 project in general.
 
 Regards,
 Ed Maste
 
 
 --=20
 Regards,
 Jason Leschnik.
 
 [m] 0432 35 4224
 [w@] jason dot leschnik <at> ansto dot gov dot au
 [U@]=A0jml974@uow.edu.au

From: Ryan Steinmetz <zi@FreeBSD.org>
To: Per von Zweigbergk <pvz@itassistans.se>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/156226: Lagg failover does not announce the failover to
 switch
Date: Mon, 22 Oct 2012 21:12:40 -0400

 This isn't a solution, but is a workaround that I've been using for a
 bit:
 http://people.freebsd.org/~zi/ping
 
 You can drop the file in /usr/local/etc/rc.d and then add
 ping_enable="YES" to /etc/rc.conf
 
 Basically, it sends an icmp echo request to your default gateway every 5
 seconds by default, which forces the switch to update its FIB.  This
 means that after a maximum of 5 seconds after lagg completes an
 interface failover, you should regain network connectivity.
 
 -r
>Unformatted:
