From nobody@FreeBSD.org  Tue Dec 20 15:02:02 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EF3BA1065670
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 20 Dec 2011 15:02:01 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id D45BF8FC12
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 20 Dec 2011 15:02:01 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id pBKF21hH001728
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 20 Dec 2011 15:02:01 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id pBKF21HI001727;
	Tue, 20 Dec 2011 15:02:01 GMT
	(envelope-from nobody)
Message-Id: <201112201502.pBKF21HI001727@red.freebsd.org>
Date: Tue, 20 Dec 2011 15:02:01 GMT
From: Eugen Konkov <kes-kes@yandex.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: interface does not count bytes on interface
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         163480
>Category:       kern
>Synopsis:       [vlan]: interface does not count bytes on interface
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-net
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec 20 15:10:09 UTC 2011
>Closed-Date:    Wed Dec 21 06:50:36 UTC 2011
>Last-Modified:  Wed Dec 21 06:52:44 UTC 2011
>Originator:     Eugen Konkov
>Release:        10.0-CURRENT
>Organization:
ISP FreeLine
>Environment:
# uname -a
FreeBSD meta-up 10.0-CURRENT FreeBSD 10.0-CURRENT #1: Sat Dec 17 21:11:04 EET 2011     @:/usr/obj/usr/src/sys/KES_KERN_v10  i386

>Description:
Getting statistics on interface from SNMP:
octetsIn:4057310174 octetsOut:0 packetsIn:6900040 packetsOut:6059095

Doing trafshow or bwm-ng does not show traffic on vlan interface, BUT if I watch  packets - all is OK


# ifconfig re0
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC>
        ether 00:30:67:5a:44:72
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
# ifconfig vlan7
vlan7: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=103<RXCSUM,TXCSUM,TSO4>
        ether 00:1b:21:45:da:b9
        inet 10.11.19.149 netmask 0xfffffff8 broadcast 10.11.19.151 vhid 5
        inet6 fe80::21b:21ff:fe45:dab9%vlan7 prefixlen 64 scopeid 0x9 vhid 5
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
        vlan: 7 parent interface: igb1
on one console:
# tcpdump -n -i re0
tcpdump: WARNING: re0: no IPv4 address assigned
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on re0, link-type EN10MB (Ethernet), capture size 65535 bytes
16:51:36.478028 ARP, Request who-has 10.11.19.145 tell 10.11.19.146, length 42

on other console:
# ping 10.11.19.146
PING 10.11.19.146 (10.11.19.146): 56 data bytes
64 bytes from 10.11.19.146: icmp_seq=1 ttl=63 time=3.720 ms
64 bytes from 10.11.19.146: icmp_seq=2 ttl=63 time=3.676 ms
64 bytes from 10.11.19.146: icmp_seq=3 ttl=63 time=3.757 ms
64 bytes from 10.11.19.146: icmp_seq=4 ttl=63 time=3.760 ms
^C
--- 10.11.19.146 ping statistics ---
5 packets transmitted, 4 packets received, 20.0% packet loss
round-trip min/avg/max/stddev = 3.676/3.728/3.760/0.034 ms

as you see no ARP, Reply packet seen.

again on first console:
# tcpdump -n -i vlan7
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on vlan7, link-type EN10MB (Ethernet), capture size 65535 bytes
16:53:42.914087 ARP, Request who-has 10.11.19.146 tell 10.11.19.149, length 28
16:53:42.916577 ARP, Reply 10.11.19.146 is-at 00:30:4f:71:a8:7f, length 42
16:53:42.916584 IP 10.11.19.149 > 10.11.19.146: ICMP echo request, id 17749, seq 0, length 64
16:53:42.920280 IP 10.11.19.146 > 10.11.19.149: ICMP echo reply, id 17749, seq 0, length 64
16:53:43.914478 IP 10.11.19.149 > 10.11.19.146: ICMP echo request, id 17749, seq 1, length 64
16:53:43.918174 IP 10.11.19.146 > 10.11.19.149: ICMP echo reply, id 17749, seq 1, length 64
16:53:44.914734 IP 10.11.19.149 > 10.11.19.146: ICMP echo request, id 17749, seq 2, length 64
16:53:44.918462 IP 10.11.19.146 > 10.11.19.149: ICMP echo reply, id 17749, seq 2, length 64



>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: remko 
State-Changed-When: Wed Dec 21 06:50:34 UTC 2011 
State-Changed-Why:  
Duplicate ticket 

http://www.freebsd.org/cgi/query-pr.cgi?pr=163480 
Responsible-Changed-From-To: freebsd-i386->freebsd-net 
Responsible-Changed-By: remko 
Responsible-Changed-When: Wed Dec 21 06:52:20 UTC 2011 
Responsible-Changed-Why:  
This is more something for the networking group. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=163480 
>Unformatted:
