Bug 785 - Various ifconfig alias problems
Summary: Various ifconfig alias problems
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1995-10-17 20:00 UTC by Alan Judge
Modified: 1995-10-17 21:22 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Judge 1995-10-17 20:00:01 UTC
	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.

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
Comment 1 wollman 1995-10-17 20:40:34 UTC
<<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
Comment 2 Garrett Wollman freebsd_committer freebsd_triage 1995-10-17 21:21:24 UTC
State Changed
From-To: open->closed

User didn't specify correct netmask for his application.