From owner-freebsd-net@FreeBSD.ORG Tue Dec 20 17:53:09 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0EE121065673 for ; Tue, 20 Dec 2011 17:53:09 +0000 (UTC) (envelope-from corsmith@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id DCDA68FC15 for ; Tue, 20 Dec 2011 17:53:08 +0000 (UTC) Received: by pbcc3 with SMTP id c3so5192997pbc.13 for ; Tue, 20 Dec 2011 09:53:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=rbUivmz0eDN4dBGXOJKJF85tdhAEmlucitmHdJZ9D4U=; b=X7BxSHRYOuNvcMtZR28tOwYKzVt6xGx2y+83jc1iYNt7DQUErZY57kx3Qi7/+5j9Zi w45rCZm2ubGZcYGvr8Et6XdCNp5fIk8hEINSFr2676zfyIIuKkxZPQBR3CPaIZadZUic JqqUeOX5SryKsKXig123Qc8WT0gnWxrIqa5wQ= MIME-Version: 1.0 Received: by 10.68.190.41 with SMTP id gn9mr4592493pbc.59.1324402150572; Tue, 20 Dec 2011 09:29:10 -0800 (PST) Received: by 10.142.213.4 with HTTP; Tue, 20 Dec 2011 09:29:10 -0800 (PST) Date: Tue, 20 Dec 2011 12:29:10 -0500 Message-ID: From: Corey Smith To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: 82599 receiving packets with vlan tag=0 (vlan strip problem)? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 17:53:09 -0000 This is an old thread from 2010 but I am running into the same issue while using an Intel 2 x 10Gbps 82599 card. Using other 10Gbps Intel cards based on other chipsets I have been able to setup a monitor bridge to aggregate all traffic into a single feed. When setting up a bridge in monitor mode using these cards every packet has two 802.1Q vlan tags. The first tag is always vlan 0. The second tag is the actual valid vlan id. Example: tcpdump -i bridge0 -n -c 1 -e 12:15:01.345246 00:14:4f:00:00:00 > 00:01:d7:00:00:00, ethertype 802.1Q (0x8100), length 494: vlan 0, p 0, ethertype 802.1Q, vlan 21, p 0, ethertype IPv4, 192.168.1.69.10001 > 192.168.1.61.54027: P 3519256927:3519257359(432) ack 646682744 win 49640 uname -a: # also tested in 7.3 and 9.0-RC3 FreeBSD ids 8.2-RELEASE-p3 FreeBSD 8.2-RELEASE-p3 #0: Tue Sep 27 18:45:57 UTC 2011 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 /etc/rc.conf: cloned_interfaces="bridge0" ifconfig_ix0="mtu 9216 up" ifconfig_ix1="mtu 9216 up" ifconfig_ix2="mtu 9216 up" ifconfig_ix3="mtu 9216 up" ifconfig_bridge0="addm ix0 addm ix1 addm ix2 addm ix3 monitor up" pciconf -l: ix0@pci0:10:0:0: class=0x020000 card=0x00038086 chip=0x10fb8086 rev=0x01 hdr=0x00 The work around is to put at least a single dummy vlan sub interface associated with each physical interface. Add this to /etc/rc.conf: cloned_interfaces="bridge0 vlan4080 vlan4081 vlan4082 vlan4083" ifconfig_vlan4080="vlan 4080 vlandev ix0" ifconfig_vlan4081="vlan 4081 vlandev ix1" ifconfig_vlan4082="vlan 4082 vlandev ix2" ifconfig_vlan4083="vlan 4083 vlandev ix3" Apparently this enables vlan processing in the driver and packets are properly vlan tagged. Example output with the work around in place: tcpdump -i bridge0 -n -c 1 -e 12:20:10.830955 00:22:19:00:00:01 > 00:00:0c:00:00:01, ethertype 802.1Q (0x8100), length 914: vlan 28, p 0, ethertype IPv4, 192.168.1.140.1194 > 192.168.10.140.1194: UDP, length 868 Every other driver seems to properly process vlan tags without having to create vlan sub interfaces. Any ideas on how to make vlan tag processing the default behavior on this hardware? -Corey Smith