From cl@panic.tix.at  Fri Jan 10 14:27:07 2003
Return-Path: <cl@panic.tix.at>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 2124F37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 10 Jan 2003 14:27:07 -0800 (PST)
Received: from panic.tix.at (panic.tix.at [194.152.178.38])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 8EAC743F3F
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 10 Jan 2003 14:27:04 -0800 (PST)
	(envelope-from cl@panic.tix.at)
Received: from panic.tix.at (localhost [IPv6:::1])
	by panic.tix.at (8.12.6/8.12.6) with ESMTP id h0AMQlxe009308
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 10 Jan 2003 23:26:47 +0100 (CET)
	(envelope-from cl@panic.tix.at)
Received: (from cl@localhost)
	by panic.tix.at (8.12.6/8.12.6/Submit) id h0AMQkFQ009307;
	Fri, 10 Jan 2003 23:26:46 +0100 (CET)
Message-Id: <200301102226.h0AMQkFQ009307@panic.tix.at>
Date: Fri, 10 Jan 2003 23:26:46 +0100 (CET)
From: Christoph Loibl <c@tix.at>
Reply-To: Christoph Loibl <c@tix.at>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: bridging between vlan-interfaces on same trunk interface does not work
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         46961
>Category:       kern
>Synopsis:       bridging between vlan-interfaces on same trunk interface does not work
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bms
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 10 14:30:01 PST 2003
>Closed-Date:    Thu Jun 24 19:54:06 MEST 2004
>Last-Modified:  Thu Jun 24 19:54:06 MEST 2004
>Originator:     Christoph Loibl
>Release:        FreeBSD 4.7-RELEASE i386
>Organization:
silver::server
>Environment:
System: FreeBSD panic.tix.at 4.7-RELEASE FreeBSD 4.7-RELEASE #2: Fri Oct 11 11:11:28 CEST 2002 root@panic.tix.at:/usr/obj/usr/src/sys/PANIC i386


	
	CPU: Pentium/P55C (166.59-MHz 586-class CPU)
  	Origin = "GenuineIntel"  Id = 0x543  Stepping = 3
  	Features=0x8001bf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8,MMX>
	real memory  = 100663296 (98304K bytes)
	avail memory = 93048832 (90868K bytes)


>Description:
	
	briding beween vlan interfaces seems to be broken:

	configured 2 vlan interfaces & bridging:
	ifconfig vlan2 create
	ifconfig vlan3 create
	ifconfig vlan2 vlan 10 vlandev xl0 up
	ifconfig vlan3 vlan 11 vlandev xl0 up
	sysctl net.link.ether.bridge_cfg=vlan2,vlan3
	sysctl net.link.ether.bridge=1

	pinging a host on vlan3 from a host on vlan2 results in the arp-broadcast message beeing
	bridged from vlan2 to vlan3. the arp-reply is not bridged back to vlan2. the arp-reply 
	can be seen tcpdumping the trunk interface (xl0) running tcpdump on vlan3 (the vlan where 
	the arp-reply should come from) just sees the arp packet but not the reply

	it seems that bridging in this setup works only for ethernet-broadcasts but not for regular
	communication. 

>How-To-Repeat:
	
	see above config.
>Fix:

	
	not using vlan interfaces for bridging


>Release-Note:
>Audit-Trail:

From: Attila Nagy <bra@fsn.hu>
To: Christoph Loibl <c@tix.at>
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: kern/46961: bridging between vlan-interfaces on same trunk
 interface does not work
Date: Tue, 14 Jan 2003 14:53:23 +0100 (CET)

 Hello,
 
 > 	briding beween vlan interfaces seems to be broken:
 I don't know whether it's FreeBSD's bridge code, or your switch, but you
 can try to disable STP (Spanning Tree Protocol) on the switch.
 But prior to that you can see if it blocked the interface or not. There
 are a lot of switches which has only one STP instance, not many, per
 VLANs, so when you try to bridge between two VLANs it may think it is a
 loop.
 
 ----------[ Free Software ISOs - http://www.fsn.hu/?f=download ]----------
 Attila Nagy					e-mail: Attila.Nagy@fsn.hu
 Free Software Network (FSN.HU)		  phone @work: +361 210 1415 (194)
 						cell.: +3630 306 6758

From: Christoph Loibl <c@tix.at>
To: FreeBSD-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: kern/46961: bridging between vlan-interfaces on same trunk interface does not work
Date: Tue, 14 Jan 2003 15:58:36 +0100

 hi!
 
 On Tue, Jan 14, 2003 at 02:53:23PM +0100, Attila Nagy wrote:
 > 	briding beween vlan interfaces seems to be broken:
 > I don't know whether it's FreeBSD's bridge code, or your switch, but you
 > can try to disable STP (Spanning Tree Protocol) on the switch.
 > But prior to that you can see if it blocked the interface or not. There
 > are a lot of switches which has only one STP instance, not many, per
 > VLANs, so when you try to bridge between two VLANs it may think it is a
 > loop.
 
 i did some more debugging homework on that issue, and established a
 _very_simple_ setup using a ethernet-hub instead of the HP2524 switches:
 
 +---------+          +-----+
 | box 1   |----------|HUB  |
 +---------+          |     |   +---------------+
                      |     |---| box3 (bridge) |
 +---------+          |     |   +---------------+
 | box 2   |----------|     |
 +---------+          +-----+
 
 first i setup the 2 boxes (1,2) with vlan interfaces with the same vlanid to see if 
 communication over the vlan interfaces works. ([x] works fine - i didn't care about 
 using edX interfaces and didn't worry about mtu issues, as packets i transmit are 
 very small) 
 
 -> then i reconfigured the boxes 2 use different vlans and setup box 3 (communication 
 was tested the same way beween all devices)
 
 the final vlan-bridge setup was:
 
 on box 1 i have: 
 
 vlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1496
         inet 192.168.17.10 netmask 0xffffff00 broadcast 192.168.17.255
         inet6 fe80::204:76ff:fe0c:2b2%vlan0 prefixlen 64 scopeid 0x10
         ether 00:4f:4c:04:39:76
         vlan: 20 parent interface: ed1
 
 on box 2:
 
 vlan1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1496
         inet 192.168.17.3 netmask 0xffffff00 broadcast 192.168.17.255
         inet6 fe80::210:60ff:fe80:9733%vlan1 prefixlen 64 scopeid 0x9
         ether 00:10:60:80:97:33
         vlan: 21 parent interface: ed0
 
 the bridge has:
 
 vlan0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1496
         inet6 fe80::250:4ff:fe65:a725%vlan0 prefixlen 64 scopeid 0x4
         ether 00:50:04:65:a7:25
         vlan: 21 parent interface: xl0
 
 vlan1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1496
         inet6 fe80::250:4ff:fe65:a725%vlan1 prefixlen 64 scopeid 0x5
         ether 00:50:04:65:a7:25
         vlan: 20 parent interface: xl0
 
 net.link.ether.bridge_cfg: vlan0,vlan1
 net.link.ether.bridge: 1
 net.link.ether.bridge_ipfw: 0
 net.link.ether.bridge_ipf: 0
 net.link.ether.bridge_ipfw_drop: 0
 net.link.ether.bridge_ipfw_collisions: 0
 
 
 start to ping box2 at box1: 
 
 on vlan20:
 arp-request for 192.168.17.3 as broadcast
 
 on vlan21:
 bridged arp-request for 192.168.17.3 as broadcast
 arp-answer from 192.168.17.3 to 192.168.17.10 _no_broadcast
 
 --> this can only be seen if watching with tcpdump on xl0. 
 using "tcpdump -nei vlan0" does not report any traffic at all(?!).
 
 if you need more information i may repeat this setup and provide you with a login 
 to 2 of the testboxes.
 
 best regards
 
 christoph loibl
 
 -- 
 CHRISTOPH LOIBL >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 mailto:c@tix.at.    |                         "Penguins are tasty snacks"
 http://pix.tix.at   |                                   from freebsd docu
 CHL-RIPE >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> PGP-Key-ID: 0x4B2C0055 >>>

From: "Michael O. Boev" <mike@tric.tomsk.gov.ru>
To: <freebsd-gnats-submit@FreeBSD.org>, <c@tix.at>
Cc:  
Subject: Re: kern/46961: bridging between vlan-interfaces on same trunk interface does not work
Date: Fri, 21 Mar 2003 16:48:26 +0600

 Hi!
 
 Just as a follow-up, I have an exactly-same-looking problem with
 a MUCH-MUCH simpler configuration
 
 ifconfig vlan0 vlan 1 vlandev fxp0
 sysctl net.link.ether.bridge_cfg=vlan0,fxp1
 sysctl net.link.ether.bridge=1
 
 Again, the arp responses coming from one iface don't get passed to the
 other.
 It looks as if bridging doesn't work with vlans.
 (although, bridging between fxp0 and fxp1 works perfextly).
 
 The versions of kernel I've tried are 4.6.2, 4.7, 5.0.
 
 Hope this helps...
 
 Mike Boev.
 
Responsible-Changed-From-To: freebsd-bugs->bms 
Responsible-Changed-By: bms 
Responsible-Changed-When: Wed Jun 23 09:07:29 GMT 2004 
Responsible-Changed-Why:  
Believed curable with m_tags 

http://www.freebsd.org/cgi/query-pr.cgi?pr=46961 
State-Changed-From-To: open->closed 
State-Changed-By: joerg 
State-Changed-When: Thu Jun 24 19:51:56 MEST 2004 
State-Changed-Why:  
Fixed in rev 1.174 of /sys/net/if_ethersubr.c. 

Anyone needing a workaround for the time being (in particular for 4.x) 
should set "ifconfig ... promisc" on all involved (hardware) ethernet 
interfaces.  This will effectively yield the same behaviour as the 
final bugfix. 


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