From owner-freebsd-questions@FreeBSD.ORG Sat Sep 10 11:52:06 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8E06E16A41F for ; Sat, 10 Sep 2005 11:52:06 +0000 (GMT) (envelope-from ltsampros@upnet.gr) Received: from mail.vivodinet.gr (mail3.vivodinet.gr [80.76.39.13]) by mx1.FreeBSD.org (Postfix) with SMTP id 5D1F643D49 for ; Sat, 10 Sep 2005 11:52:04 +0000 (GMT) (envelope-from ltsampros@upnet.gr) Received: (qmail 1224 invoked from network); 10 Sep 2005 11:51:59 -0000 Received: from dslcustomer-222-89.vivodi.gr (HELO bifteki.home.net) (83.171.222.89) by 0 with SMTP; 10 Sep 2005 11:51:59 -0000 Received: from bifteki.home.net (localhost [127.0.0.1]) by bifteki.home.net (8.13.4/8.13.3) with ESMTP id j8AEpoLx003824; Sat, 10 Sep 2005 14:51:50 GMT (envelope-from gaghiel@bifteki.home.net) Received: (from gaghiel@localhost) by bifteki.home.net (8.13.4/8.13.3/Submit) id j8AEpoZ6003823; Sat, 10 Sep 2005 14:51:50 GMT (envelope-from gaghiel) From: Leonidas Tsampros Date: Sat, 10 Sep 2005 14:51:47 +0000 To: Cheng Jin Message-ID: <20050910145147.GA3028@bifteki.lan> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: rom: Leonidas Tsampros User-Agent: Mutt/1.5.9i Cc: freebsd-questions@freebsd.org Subject: Re: ipfw out xmit trouble X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Sep 2005 11:52:06 -0000 On Sat, Sep 10, 2005 at 12:48:34AM -0700, Cheng Jin wrote: > > Hi, > > I have an ethernet bridging [xl0 fxp0] set up like the following > > outside world --- [xl0 fxp0] --- test machine > > xl0 and fxp0 are the two interfaces on the bridging machine. > xl0 has an IP address (could this be the source of the problem?), > but fxp0 doesnt. > > I would like to simulate a DSL line on the xl0 side (for packets > arriving and leaving xl0). The commands that I use are: > > sysctl -w net.link.ether.bridge_ipfw=1 > sysctl -w net.link.ether.ipfw=1 # not sure whether this is needed > > ipfw -f flush > ipfw -f pipe flush > > ipfw add 65534 allow all from any to any # just so i can login > > ipfw add 65533 pipe 1 all from any to any out xmit xl0 > ipfw add 65533 pipe 2 all from any to any in recv xl0 > > ipfw pipe 1 config delay 20 bw 256K queue 50 > ipfw pipe 2 config delay 13 bw 3M queue 50 > > > pipe 2 works fine, but I couldn't get pipe 1 to work. ping to > and from the test machine shows a delay about 14 ms, i.e. from > the "in recv xl0" part. > > If i change the configuration for pipe 1 to "in recv fxp0", it > would then work, but I think packets would be queued inside > ether_input/bdg_forward on the fxp0 side, rather than > ether_output_frame on the xl0 side. > > Even though I have stared at it for the longest time, I can't > see anything wrong with pipe 1. > > Any help would be greatly appreciated! According to the FreeBSD Handbook, Chapter 26.5 you have to set the following sysctl variables in order to enable bridging support: net.link.ether.bridge.enable=1 net.link.ether.bridge.config=xl0,fxp0 net.link.ether.bridge_ipfw=1 Also you must have recompiled your kernel to include "options BRIDGE". (you can also load the bridge.ko module with "kldload bridge") I hope i was helpful.