Bug 19436

Summary: when using vlanX interface arp ageing work incorrectly
Product: Base System Reporter: vova <vova>
Component: kernAssignee: Yar Tikhiy <yar>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.0-STABLE   
Hardware: Any   
OS: Any   

Description vova 2000-06-22 11:20:00 UTC
My network environment fbsd server with fxp interface connected to 
Intel 460t switch into trunked port (802.1q)
to not-trunked port of switch connected other server
when I configure vlan interface:
ifconfig vlan3 vlan 3 vlandev fxp0 192.168.1.1 netmask 255.255.255.0
- all work Ok
packets go to 192.168.1.2 (server address) and back
but after about 10 minutes of inactivity (no traffic)
I can't send packets to 192.168.1.2, it seems like packet go to nowere
but I still see packets from 192.168.1.2
when I do 'arp -an' I see his correct arp, BUT when I try to do
'arp -d 192.168.1.2' arp complains:
delete: can't locate 192.168.2.1
when I do 'route delete 192.168.1.2' - all begins work
so it seem there problem in arp aging

Fix: 

not known
How-To-Repeat: see above
Comment 1 vova 2000-07-07 04:24:51 UTC
After some debugging I've found that there is actually two problems:

First - with switching hardware (Inter 460t with 802.1Q capable
firmware), It fails correct deliver broadcasts from trunked port to
untrunked port after untrunked port goes down and then up.

Second - with arp utility, it can't handle arp entries on vlanX
interfaces correctly, there is simple patch for fix arp behavior:
diff -N -u arp.c.orig arp.c

--- usr.sbin/arp/arp.c.orig  Fri Jul  7 07:11:48 2000
+++ usr.sbin/arp/arp.c       Fri Jul  7 07:11:20 2000
@@ -397,7 +397,7 @@
                    (rtm->rtm_flags & RTF_LLINFO) &&
                    !(rtm->rtm_flags & RTF_GATEWAY)) switch (sdl->sdl_type) {
                case IFT_ETHER: case IFT_FDDI: case IFT_ISO88023:
-               case IFT_ISO88024: case IFT_ISO88025:
+               case IFT_ISO88024: case IFT_ISO88025: case IFT_PROPVIRTUAL:
                        goto delete;
                }
        }


--
TSB Russian Express, Moscow
Vladimir B. Grebenschikov, vova@express.ru
Comment 2 peter.jeremy 2000-08-09 00:51:41 UTC
Looking through your patch, I believe it should be the following:
The first hunk supports setting ARP entries, the second is your
patch, the third is to identify the VLAN entries (and is optional).

Index: arp.c
===================================================================
RCS file: /gsmx07/CVSROOT/src/usr.sbin/arp/arp.c,v
retrieving revision 1.22
diff -u -b -r1.22 arp.c
--- arp.c	2000/03/03 13:01:57	1.22
+++ arp.c	2000/08/08 23:45:19
@@ -310,7 +310,7 @@
 		    (rtm->rtm_flags & RTF_LLINFO) &&
 		    !(rtm->rtm_flags & RTF_GATEWAY)) switch (sdl->sdl_type) {
 		case IFT_ETHER: case IFT_FDDI: case IFT_ISO88023:
-		case IFT_ISO88024: case IFT_ISO88025:
+		case IFT_ISO88024: case IFT_ISO88025: case IFT_PROPVIRTUAL:
 			goto overwrite;
 		}
 		if (doing_proxy == 0) {
@@ -397,7 +397,7 @@
 		    (rtm->rtm_flags & RTF_LLINFO) &&
 		    !(rtm->rtm_flags & RTF_GATEWAY)) switch (sdl->sdl_type) {
 		case IFT_ETHER: case IFT_FDDI: case IFT_ISO88023:
-		case IFT_ISO88024: case IFT_ISO88025:
+		case IFT_ISO88024: case IFT_ISO88025: case IFT_PROPVIRTUAL:
 			goto delete;
 		}
 	}
@@ -509,6 +509,9 @@
             case IFT_ISO88025:
                 printf(" [token-ring]");
                 break;
+	    case IFT_PROPVIRTUAL:
+		printf(" [vlan]");
+		break;
             default:
         }
 	if (sdl->sdl_rcf != NULL) {

Peter
Comment 3 Yar Tikhiy freebsd_committer freebsd_triage 2001-04-04 16:17:47 UTC
State Changed
From-To: open->analyzed

I've just committed the fix into -current with respect to the new 
VLAN interface type. I'll MFC that as soon as I get the approval.
Comment 4 Yar Tikhiy freebsd_committer freebsd_triage 2001-04-04 16:26:46 UTC
Responsible Changed
From-To: freebsd-bugs->yar

It's me who deals with the problem.
Comment 5 Yar Tikhiy freebsd_committer freebsd_triage 2001-04-24 14:12:10 UTC
State Changed
From-To: analyzed->closed

Fixed in both -stable & -current.