From owner-freebsd-net@FreeBSD.ORG Fri Jun 20 12:41:16 2003 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 3A3D337B401 for ; Fri, 20 Jun 2003 12:41:16 -0700 (PDT) Received: from relay.macomnet.ru (relay.macomnet.ru [195.128.64.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id C6CA443FB1 for ; Fri, 20 Jun 2003 12:41:14 -0700 (PDT) (envelope-from maxim@macomnet.ru) Received: from news1.macomnet.ru (news1.macomnet.ru [195.128.64.14]) by relay.macomnet.ru (8.11.6/8.11.6) with ESMTP id h5KJfAq7887861; Fri, 20 Jun 2003 23:41:11 +0400 (MSD) Date: Fri, 20 Jun 2003 23:41:10 +0400 (MSD) From: Maxim Konovalov To: Han Hwei Woo In-Reply-To: <000c01c33739$cf3d9910$0200a8c0@a7n8x> Message-ID: <20030620233323.W47630@news1.macomnet.ru> References: <000c01c33739$cf3d9910$0200a8c0@a7n8x> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-net@freebsd.org Subject: Re: VLAN/Bridge No response from trunk Interface 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: Fri, 20 Jun 2003 19:41:16 -0000 Hello, On Fri, 20 Jun 2003, 11:39-0300, Han Hwei Woo wrote: > Here's the network I'm trying to setup > > 192.168.0.3 192.168.0.1 192.168.0.2 > OpenBSD | vlan0----><--- vlan0 | FreeBSD | em0 ---><--- em0 | Windows 2000 > > with net.link.ether.bridge_cfg: vlan0,em0 > > If I try to ping the FreeBSD machine from OpenBSD, arp requests are > sent out, and they are seen on both of the FreeBSD machine's > interfaces. However, no arp response is generated. > > So, I enter in the arp entries myself. > > Once I do that, when I again try to ping the FreeBSD host from > OpenBSD, the ping requests are seen on both the FreeBSD interfaces. > However, no response is generated. > > If I instead try to ping the OpenBSD machine from FreeBSD, the ping > requests get to the OpenBSD machine, and the OpenBSD replies, and > both the FreeBSD interfaces receive the reply, according to tcpdump. > However, the ping program does not receive them. > > > I also tried this setup: > > 192.168.0.3 192.168.0.1 192.168.0.2 > OpenBSD | vlan0----><--- vlan0 | FreeBSD | vlan1 ---><--- vlan0 | Windows 2000 > > with net.link.ether.bridge_cfg: vlan0,vlan1 > > And the same problem occurs. I have also tried with different > network cards as the parent interface of vlan0 on FreeBSD > (fxp0,dc0). 1) Please try a hack below; 2) Don't use bridge.ko, it is semi-broken, compile the bridging code in kernel instead (options BRIDGE); 3) sysctl net.inet.ip.check_interface=0 is mandatory in some topologies. Index: if_ethersubr.c =================================================================== RCS file: /home/ncvs/src/sys/net/if_ethersubr.c,v retrieving revision 1.147 diff -u -r1.147 if_ethersubr.c --- if_ethersubr.c 5 May 2003 09:15:50 -0000 1.147 +++ if_ethersubr.c 20 May 2003 15:06:50 -0000 @@ -625,6 +625,7 @@ if (rule) /* packet was already bridged */ goto post_stats; +#if 0 if (!(BDG_ACTIVE(ifp))) { /* * Discard packet if upper layers shouldn't see it because it @@ -641,6 +642,7 @@ return; } } +#endif /* Discard packet if interface is not up */ if ((ifp->if_flags & IFF_UP) == 0) { %%% -- Maxim Konovalov, maxim@macomnet.ru, maxim@FreeBSD.org