From aj@zadok.Ieunet.ie  Tue Oct 17 11:51:51 1995
Received: from pop.Ieunet.ie (zadok.Ieunet.ie [192.111.39.34])
          by freefall.freebsd.org (8.6.12/8.6.6) with SMTP id LAA03429
          for <FreeBSD-gnats-submit@freebsd.org>; Tue, 17 Oct 1995 11:51:45 -0700
Received: by pop.Ieunet.ie (Smail3.1.29.1 #2)
	id m0t5H6d-000IFbC; Tue, 17 Oct 95 19:51 WET DST
Message-Id: <m0t5H6d-000IFbC@pop.Ieunet.ie>
Date: Tue, 17 Oct 95 19:51 WET DST
From: aj@Ieunet.ie (Alan Judge)
Sender: aj@zadok.Ieunet.ie (Alan Judge)
Reply-To: tech@Ieunet.ie
To: FreeBSD-gnats-submit@freebsd.org
Cc: tech@Ieunet.ie
Subject: 2.0.5-950622-SNAP Various ifconfig alias problems
X-Send-Pr-Version: 3.2

>Number:         785
>Category:       kern
>Synopsis:       Various ifconfig alias problems
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 17 12:00:01 PDT 1995
>Closed-Date:    Tue Oct 17 13:21:24 PDT 1995
>Last-Modified:  Tue Oct 17 13:22:11 PDT 1995
>Originator:     Alan Judge
>Release:        FreeBSD 2.0-BUILT-19950612 i386
>Organization:
Ieunet Ltd
>Environment:

	2.0.5-950622-SNAP running busy web server.  10 virtual interfaces
	running using ifconfig alias.

>Description:

	Several, possibly related problems:
	      - ifconfig ed0 xxx.yyy.zzz.123 alias
		returns error:
			ifconfig: ioctl (SIOCAIFADDR): File exists

		If run a second time, there is no error and everything seems
		to be OK.

	      - In order for the new address to be reachable from the
		host itself, you need to do
			ifconfig lo0 xxx.yyy.zzz.123 alias
		as well.  I don't know if this is intentional, but
		it's certainly necessary.

		This usually results in a kernel error message like:
			arp_rtrequest: bad gateway value
			rtinit: wrong ifa (0xf06b2600) was (0xf0746d80)

		And again sometimes must be redone.

	      - Some of this may be related to the fact that the
		presence of an arp entry for the host being aliased
		(even an incomplete one) seems to break everything.
		So I've been doing arp -d first.

>How-To-Repeat:

>Fix:
	
	Unknown.  Current workaround is to do:
		$i=xxx.yyy.zzz.aaa
		arp -d $i > /dev/null 2>&1
		ifconfig ed0 $i alias > /dev/null 2>&1
		ifconfig ed0 $i alias
		ifconfig lo0 $i alias > /dev/null 2>&1
		ifconfig lo0 $i alias
>Release-Note:
>Audit-Trail:

From: "Garrett A. Wollman" <wollman@lcs.mit.edu>
To: tech@ieunet.ie
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: kern/785: 2.0.5-950622-SNAP Various ifconfig alias problems
Date: Tue, 17 Oct 1995 15:40:34 -0400

 <<On Tue, 17 Oct 95 19:51 WET DST, aj@Ieunet.ie (Alan Judge) said:
 
 > 	      - ifconfig ed0 xxx.yyy.zzz.123 alias
 > 		returns error:
 > 			ifconfig: ioctl (SIOCAIFADDR): File exists
 
 Incorrect invocation.
 
 		ifconfig ed0 xxx.yyy.zzz.123 netmask 255.255.255.255 alias
 
 > 	      - In order for the new address to be reachable from the
 > 		host itself, you need to do
 > 			ifconfig lo0 xxx.yyy.zzz.123 alias
 > 		as well.  I don't know if this is intentional, but
 > 		it's certainly necessary.
 
 See above.
 
 > 		This usually results in a kernel error message like:
 > 			arp_rtrequest: bad gateway value
 > 			rtinit: wrong ifa (0xf06b2600) was (0xf0746d80)
 
 See above.
 
 > 	      - Some of this may be related to the fact that the
 > 		presence of an arp entry for the host being aliased
 > 		(even an incomplete one) seems to break everything.
 > 		So I've been doing arp -d first.
 
 See above.
 
 -GAWollman
 
 --
 Garrett A. Wollman   | Shashish is simple, it's discreet, it's brief. ... 
 wollman@lcs.mit.edu  | Shashish is the bonding of hearts in spite of distance.
 Opinions not those of| It is a bond more powerful than absence.  We like people
 MIT, LCS, ANA, or NSA| who like Shashish.  - Claude McKenzie + Florent Vollant
State-Changed-From-To: open->closed 
State-Changed-By: wollman 
State-Changed-When: Tue Oct 17 13:21:24 PDT 1995 
State-Changed-Why:  
User didn't specify correct netmask for his application. 
>Unformatted:
