From owner-freebsd-net@FreeBSD.ORG Wed Oct 16 18:54:33 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 39A60BBC for ; Wed, 16 Oct 2013 18:54:33 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-qe0-x22b.google.com (mail-qe0-x22b.google.com [IPv6:2607:f8b0:400d:c02::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EE96C23B4 for ; Wed, 16 Oct 2013 18:54:32 +0000 (UTC) Received: by mail-qe0-f43.google.com with SMTP id nc12so985208qeb.16 for ; Wed, 16 Oct 2013 11:54:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=mxPaKapPFGWnqeL3Ln9M1rrUuohH4yszNleA+YCiHFY=; b=No5h7ccHaeymdW+WZS4U1niEaQ44KdhjFY61bYoIFMO9zwh1QbFSF4gDLzLiLSuH/Q rWaji0QqxoP0yMYY3drfisN2rOFmjxO+46IPw2D9pt/IqY2M0J1rJAayvashL9lptywU 8ulOisXouPS6kx9pH1U/v8X6L4LP2KgnEceq9DrBm2qQ0iFHZqXCddlB5/57gFrHMhf4 iU+DXI2QOLRWP2edkCIGDPj5V4ult95yZYcdQLMJgNGPEYoGjGtPGh8cNAeneP18cWvx mOG12j/OIfCmX+TtODlHE5fqWw+lFYQY4HpEclOoCDqtwrVhjHGWnriUSdsNWF8gsm/v kAhA== MIME-Version: 1.0 X-Received: by 10.224.11.133 with SMTP id t5mr7076031qat.34.1381949672053; Wed, 16 Oct 2013 11:54:32 -0700 (PDT) Sender: asomers@gmail.com Received: by 10.49.39.97 with HTTP; Wed, 16 Oct 2013 11:54:31 -0700 (PDT) In-Reply-To: References: Date: Wed, 16 Oct 2013 12:54:31 -0600 X-Google-Sender-Auth: KQtSRfBwXoltpRRxu5_Xz55IxTs Message-ID: Subject: Re: ifconfig: ioctl (SIOCAIFADDR): File exists - but not only with alias command From: Alan Somers To: Raimundo Santos Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Oct 2013 18:54:33 -0000 On Wed, Oct 16, 2013 at 12:17 PM, Raimundo Santos wrote: > Hello list, > > I have a quad port Intel NIC and I am stucked on this problem: whenever I > try to modify the address of one port of this NIC, I see from ifconfig > > ifconfig: ioctl (SIOCAIFADDR): File exists > > Here is the status of one port: > > # ifconfig igb1 > igb1: flags=8843 metric 0 mtu 1500 > > options=401bb > ether 00:1b:21:5a:93:31 > inet6 fe80::21b:21ff:fe5a:9331%igb1 prefixlen 64 scopeid 0x2 > nd6 options=29 > media: Ethernet autoselect (1000baseT ) > status: active > > As you can see, no inet address. Try to put an address that was used before > in the same port of this NIC, and.. > > > # ifconfig igb1 XX.XX.XX.20/28 > ifconfig: ioctl (SIOCAIFADDR): File exists > > I have routed running with this /etc/gateways: > > ripv2 > if=tun0 no_rip > if=tun1 no_rip > if=et0 no_rip > if=et1 no_rip > if=igb2 no_rip > if=igb3 no_rip > rdisc_interval=45 > no_ag > no_super_ag > subnet=X.Y.Z.56/30,1 > subnet=X.Y.Z.0/29,1 > subnet=X.Y.Z.8/29,1 > subnet=X.Y.Z.16/29,1 > subnet=X.Y.Z.24/29,1 > subnet=X.Y.Z.32/29,1 > subnet=X.Y.Z.40/29,1 > subnet=X.Y.Z.48/29,1 > subnet=X.Y.Z.64/29,1 > subnet=X.Y.Z.72/29,1 > subnet=X.Y.Z.80/29,1 > subnet=X.Y.Z.88/29,1 > subnet=X.Y.Z.96/29,1 > subnet=X.Y.Z.104/29,1 > subnet=X.Y.Z.112/29,1 > subnet=X.Y.Z.120/29,1 > > The problem occurs when configuring the primary address or an alias in any > port, after unconfigure some other address. > > Using > > # uname -a > FreeBSD XXX 9.1-RELEASE-p4 FreeBSD 9.1-RELEASE-p4 #10: Thu Aug 1 19:04:09 > BRT 2013 XXX:/usr/obj/usr/src/sys/XXX_KERNEL amd64 > > A custom system with 0 thru 15 FIBs, FWD in ipfw, and VNET/VIMAGE all > enabled. > > Thank you! > Raimundo Santos > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" I ran into the same problem, on a system with LAGGs, multiple FIBs and multiple aliases per interface. I believe that the problem was due to a race condition in the kernel. Two process tried to SIOCAIFADDR with the same address simultaneously. The second one of them failed and printed the error message that you see. But due to the race, the first process reported success, yet the interface did not get the address. Unfortunately, I was unable to locate the race. My solution was to prevent two processes from trying to initialize the interface at the same time. The first process was our custom management software, which calls "service netif cloneup lagg0" and "service netif start lagg0" in rapid succession. The second process was devd, which was trying to initialize the newly attached lagg0 interface. I commented out the following lines in /etc/devd.conf and the problem went away. I don't know if this will solve your problem, but I recommend that you use dtrace or some other method to determine whether two processes are trying to SIOCAIFADDR at the same time. notify 0 { match "system" "IFNET"; match "type" "ATTACH"; action "/etc/pccard_ether $subsystem start"; }; -Alan