Subject: kern/11032: moving IP networks makes arp-cached hosts unreachable
To: None <gnats-bugs@gnats.netbsd.org>
From: John Hawkinson <jhawk@mit.edu>
List: netbsd-bugs
Date: 09/17/2000 20:05:22
>Number:         11032
>Category:       kern
>Synopsis:       moving IP networks makes arp-cached hosts unreachable
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Sep 17 18:19:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     John Hawkinson
>Release:        -current of 15 Aug 2000
>Organization:
MIT
>Environment:
	
System: NetBSD zorkmid.mit.edu 1.5E NetBSD 1.5E (ZORKMID-$Revision: 1.2 $) #54: Fri Aug 18 01:53:49 EDT 2000 jhawk@zorkmid.mit.edu:/usr/local/netbsd-current/src/sys/arch/i386/compile/ZORKMID i386


>Description:
	If I move IP subnetworks (on my laptop, moving across campus),
and attempt to reach a host that is directly connected to the prior
subnet, for which I have an arp cache entry, then I cannot reach that
host after I move subnets, unless I manually delete the cache entry.

>How-To-Repeat:
	I am initially on 18.187/16, and talking to 18.187.1.73.
	I then move to 18.78/16, and cannot ping 18.187.1.73.

zorkmid# route -v get multics
u: inet 18.187.1.73; u: link ; RTM_GET: Report Metrics: len 112, pid: 0, seq 1, errno 0, flags:<UP,GATEWAY,HOST,STATIC>
locks:  inits: 
sockaddrs: <DST,IFP>
 MULTICS.MIT.EDU 
   route to: MULTICS.MIT.EDU
destination: MULTICS.MIT.EDU
 local addr: zorkmid
  interface: wi0
      flags: <UP,HOST,REJECT,DONE,LLINFO>
 recvpipe  sendpipe  ssthresh  rtt,msec    rttvar  hopcount      mtu     expire
       0         0         0         0         0         0      1500        -8 

locks:  inits: 
sockaddrs: <DST,GATEWAY,IFP,IFA>
 MULTICS.MIT.EDU  wi0:8.0.46.6.0.6b zorkmid
zorkmid# arp -d multics
zorkmid# route -v get multics
u: inet 18.187.1.73; u: link ; RTM_GET: Report Metrics: len 112, pid: 0, seq 1, errno 0, flags:<UP,GATEWAY,HOST,STATIC>
locks:  inits: 
sockaddrs: <DST,IFP>
 MULTICS.MIT.EDU 
   route to: MULTICS.MIT.EDU
destination: default
       mask: default
    gateway: B24-RTR-B35-ETHER.MIT.EDU
 local addr: SLOAN-THREE-NINETEEN.MIT.EDU
  interface: wi0
      flags: <UP,GATEWAY,DONE,STATIC>
 recvpipe  sendpipe  ssthresh  rtt,msec    rttvar  hopcount      mtu     expire
       0         0         0         0         0         0      1500         0 

locks:  inits: 
sockaddrs: <DST,GATEWAY,NETMASK,IFP,IFA>
 default B24-RTR-B35-ETHER.MIT.EDU default wi0:8.0.46.6.0.6b SLOAN-THREE-NINETEEN.MIT.EDU

>Fix:
	Not sure. Invalidate old cached arp entries when the ip address
changes? Or when the interface loses carrier? When the default route
changes subnetworks? None of those seem like the right heuristic...

Workaround is to arp -d any such hosts. It'd be nicer if "route flush"
would do this, but alas...
>Release-Note:
>Audit-Trail:
>Unformatted: