From akanwar@digitarchy.com  Mon Jul 14 17:06:47 2003
Return-Path: <akanwar@digitarchy.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 5372237B401
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 14 Jul 2003 17:06:47 -0700 (PDT)
Received: from relay3.softcomca.com (relay3.softcomca.com [168.144.1.70])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 8B8A743F93
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 14 Jul 2003 17:06:46 -0700 (PDT)
	(envelope-from akanwar@digitarchy.com)
Received: from M2W093.mail2web.com ([168.144.251.205]) by relay3.softcomca.com with Microsoft SMTPSVC(5.0.2195.6713);
	 Mon, 14 Jul 2003 20:06:45 -0400
Message-Id: <4910-2200372150645652@M2W093.mail2web.com>
Date: Mon, 14 Jul 2003 20:06:45 -0400
From: "akanwar@digitarchy.com" <akanwar@digitarchy.com>
Reply-To: akanwar@digitarchy.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: em driver does not send out gratituous arp at initialization

>Number:         54488
>Category:       kern
>Synopsis:       em driver does not send out gratituous arp at initialization
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pdeuskar
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 14 17:10:14 PDT 2003
>Closed-Date:    Tue Sep 30 15:35:26 PDT 2003
>Last-Modified:  Tue Sep 30 15:35:26 PDT 2003
>Originator:     Ansh Kanwar (anshuman@expertcity.com)
>Release:        FreeBSD 4.8-RELEASE i386
>Organization:
Expertcity Inc.=09
>Environment:
System: FreeBSD rack2-108.sjc 4.8-RELEASE FreeBSD 4.8-RELEASE #5: Thu Apr 10
17:26:50 GMT 2003 root@codebase:/usr/src/sys/compile/EC-RACK-04 i386


>Description:

  I am running a custom redundancy daemon that migrates the IP address of a
 server from one interface to another in case the active network path fails.
 Till now I was experimenting with two fxp interfaces and everything worked
 perfectly. i.e. when the ip address moved over (using a perl script to run
 ifconfig commands) it sent out grat. arps for each of its alias IPs.  This
 allowed the router to update its arp table and talk to the newly active
 interface.

 Now when I try running the code with em (gigabit Ethernet over copper)
 NICs, I simply do not see the gratuitous arps come out of the new
interface.

>How-To-Repeat:

1) Connect a FreeBSD 4.8 machine (Intel Pro 1000 NIC) to a cisco switch
(gigE port).
2) Start tcpdump arp from another machine on the same network.
3) from the console of the FreeBSD 4.8 machine do
 ifconfig em[0-9] inet [IPadd]/netmask

4) No gratuitous ARP is seen by the host that is tcpdump-ing
5) if steps 1-4 are done with a machine with a fxp driver (/NIC). A grat
 ARP is seen as soon as the interface comes up.

6) This lack of ARP has been confirmed by other people on the freebsd-net
list. Please see thread "gratuitous ARP with em interface." (28/29 May
2003).


>Fix:

 I suspect this is a timing issue. I traced the kernel and it actually does
call "arp_ifinit" which should send out the ARP -- but doesn't. There needs
to be a way to send out the grat arp after the initialization is done.

My fix : wrote a libnet based gratituous ARP program and call it from my
daemon right after the ifconfig completes.



Anshuman Kanwar  =20
Unix SysAdmin
Expertcity Inc.
--
(805) 690-5714   [off]   ansh@expertcity.com
(805) 895-4231   [cel]   5385 Hollister Ave=20
(805) 690-6471   [fax]   Goleta, CA.  93111




--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->freebsd-bugs 
Responsible-Changed-By: ceri 
Responsible-Changed-When: Tue Jul 15 13:00:49 PDT 2003 
Responsible-Changed-Why:  
Reassign misfiled PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=54488 
Responsible-Changed-From-To: freebsd-bugs->pdeuskar 
Responsible-Changed-By: dwmalone 
Responsible-Changed-When: Wed Jul 16 06:28:24 PDT 2003 
Responsible-Changed-Why:  
While this might not be a em driver issue, Prafulla is most likely to 
point us in the right direction. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=54488 
State-Changed-From-To: open->analyzed 
State-Changed-By: pdeuskar 
State-Changed-When: Mon Jul 21 13:47:02 PDT 2003 
State-Changed-Why:  
The problem has been root caused to a driver issue. 
The fix will be available in the next release of the driver. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=54488 
State-Changed-From-To: analyzed->closed   
State-Changed-By: pdeuskar 
State-Changed-When: Tue Sep 30 15:34:50 PDT 2003 
State-Changed-Why:  
Fixed in 1.7.16 version of the driver. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=54488 
>Unformatted:
