Bug 23090

Summary: FreeBSD (all versions) sends ARP requests for MAC resolving of local aliases
Product: Base System Reporter: nop <nop>
Component: kernAssignee: Peter Pentchev <roam>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.2-RELEASE   
Hardware: Any   
OS: Any   

Description nop 2000-11-25 12:40:01 UTC
FreeBSD of all 4.x versions sends ARP broadcast request for 
resolving MAC address of any local IP, which is _local_ alias 
on it's own ethernet interface. It can't find this MAC, because
it's not respond on it's own broadcast. This is problem when, for 
example we have mass WEB hosting (IP based) on same machine and 
indexing robot on the same machine, which create indexes of any 
site, that is hosted on any of aliases on the same machine. We get
"TIMEOUT" for such query.

Fix: 

Problem can be fixed by:
1) explict arp table change:
  arp -s xx.xx.xx.xx MA-CM-AC-MA-CM-AC pub
2) and of coz by kernel patching, I have no patch.

P.S. 1st method is rather anoying.
How-To-Repeat: #ifconfig ep0 inet xx.xx.xx.xx alias - create an IP alias in the same network as main IP.
#ping xx.xx.xx.xx
ping: sendto: Host is down
ping: sendto: Host is down
Comment 1 Peter Pentchev 2000-11-25 12:53:54 UTC
On Sat, Nov 25, 2000 at 04:32:03AM -0800, nop@sendmail.ru wrote:
> 
> >Number:         23090
> >Category:       kern
> >Synopsis:       FreeBSD (all versions) sends ARP requests for MAC resolving of local aliases
[snip]
> >Description:
> FreeBSD of all 4.x versions sends ARP broadcast request for 
> resolving MAC address of any local IP, which is _local_ alias 
> on it's own ethernet interface. It can't find this MAC, because
> it's not respond on it's own broadcast. This is problem when, for 
> example we have mass WEB hosting (IP based) on same machine and 
> indexing robot on the same machine, which create indexes of any 
> site, that is hosted on any of aliases on the same machine. We get
> "TIMEOUT" for such query.
> >How-To-Repeat:
> #ifconfig ep0 inet xx.xx.xx.xx alias - create an IP alias in the same network as main IP.
> #ping xx.xx.xx.xx
> ping: sendto: Host is down
> ping: sendto: Host is down
> 
> >Fix:
> Problem can be fixed by:
> 1) explict arp table change:
>   arp -s xx.xx.xx.xx MA-CM-AC-MA-CM-AC pub
> 2) and of coz by kernel patching, I have no patch.

An even easier fix: read the FAQ, which is either installed locally on
your system in /usr/share/doc/faq/, or, if you have chosen not to install
documentation, on http://www.freebsd.org/FAQ/.  There is Chapter 9 there,
named Networking, and question 9.8.  To quote:

   9.8. How can I setup Ethernet aliases?
   
   Add netmask 0xffffffff to your ifconfig command-line like the
   following:
    # ifconfig ed0 alias 204.141.95.2 netmask 0xffffffff

Please try this, and if it does not solve your problem (sure works for me),
ask again on the questions mailing list, freebsd-questions@freebsd.org.

G'luck,
Peter

-- 
This sentence is false.
Comment 2 Peter Pentchev freebsd_committer freebsd_triage 2000-11-25 13:02:18 UTC
State Changed
From-To: open->feedback

I believe this problem can be solved by item 9.8 in the FAQ - using a /32 
netmask to configure aliases on an existing Ethernet interface.
Comment 3 Peter Pentchev freebsd_committer freebsd_triage 2000-11-25 13:05:25 UTC
Responsible Changed
From-To: freebsd-bugs->roam

Let's see if I can handle a kern/ PR :)
Comment 4 Peter Pentchev freebsd_committer freebsd_triage 2000-11-25 13:48:11 UTC
State Changed
From-To: feedback->closed

Originator reports success.