From owner-freebsd-net@FreeBSD.ORG Wed Mar 9 20:21:10 2005 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9E14616A4CE for ; Wed, 9 Mar 2005 20:21:10 +0000 (GMT) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.46]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7C34E43D41 for ; Wed, 9 Mar 2005 20:21:10 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from mac.com (smtpin02-en2 [10.13.10.147]) by smtpout.mac.com (8.12.6/MantshX 2.0) with ESMTP id j29KLAes019317; Wed, 9 Mar 2005 12:21:10 -0800 (PST) Received: from [192.168.1.6] (pool-68-161-53-96.ny325.east.verizon.net [68.161.53.96]) (authenticated bits=0)j29KL8Js017865; Wed, 9 Mar 2005 12:21:09 -0800 (PST) In-Reply-To: <20050309111759.O97008@schluting.com> References: <20050309111759.O97008@schluting.com> Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <3aa4b0ab62a3d4855fdc62383a77b9d5@mac.com> Content-Transfer-Encoding: 7bit From: Charles Swiger Date: Wed, 9 Mar 2005 15:21:06 -0500 To: Charlie Schluting X-Mailer: Apple Mail (2.619.2) cc: net@freebsd.org Subject: Re: tcpdump/bpf and seeing .1q tags X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Mar 2005 20:21:10 -0000 On Mar 9, 2005, at 2:22 PM, Charlie Schluting wrote: > So with tcpdump -e it somehow magically sees vlan tags.. even if > hardware stripping of the tags is enabled. How? tcpdump normally puts the interface into promiscuous mode. Perhaps retry using the '-p' flag? > More importantly, I'm trying to figure out if a bpf read will see them > as well. Any insight on this? Yes, or it will if you use promisc mode and an appropriate BPF filter: vlan [vlan_id] True if the packet is an IEEE 802.1Q VLAN packet. If [vlan_id] is specified, only true is the packet has the specified vlan_id. Note that the first vlan keyword encountered in expression changes the decoding offsets for the remainder of expression on the assumption that the packet is a VLAN packet. -- -Chuck