From owner-freebsd-net@FreeBSD.ORG Mon Oct 31 07:36:52 2005 Return-Path: X-Original-To: freebsd-net@FreeBSD.org 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 4511216A41F for ; Mon, 31 Oct 2005 07:36:52 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2301243D46 for ; Mon, 31 Oct 2005 07:36:50 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.13.3/8.13.3) with ESMTP id j9V7anvT056073 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 31 Oct 2005 10:36:49 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.sick.ru (8.13.3/8.13.1/Submit) id j9V7amLt056072; Mon, 31 Oct 2005 10:36:48 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 31 Oct 2005 10:36:48 +0300 From: Gleb Smirnoff To: Shawn Saunders Message-ID: <20051031073648.GA41520@cell.sick.ru> Mail-Followup-To: Gleb Smirnoff , Shawn Saunders , dionch@freemail.gr, freebsd-net@FreeBSD.org References: <20051021053228.GX59364@cell.sick.ru> <20051026141733.GI41520@cell.sick.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i Cc: dionch@freemail.gr, freebsd-net@FreeBSD.org Subject: Re: Trying to make a Host into a gigabit hub for testing 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: Mon, 31 Oct 2005 07:36:52 -0000 On Sun, Oct 30, 2005 at 03:49:26AM -0800, Shawn Saunders wrote: S> Can you clarify then, the difference between the on2many and hub modules? S> S> Based upon the names, I would consider the one2many to do exactly that, S> take anything from 'one' and redirect it out to anything identified by S> 'many?' >From ng_hub manual page: Packets received on any of the hooks are forwarded out the other hooks. >From ng_one2many manual page: Packets received on any of the many hooks are forwarded out the one hook. Packets received on the one hook are forwarded out one or more of the many hooks; which hook(s) is determined by the node's config- ured transmit algorithm. S> I would also think that hub would behave exactly as a hub, introducing S> collisions, etc, within the shared namespace of the environment for hub. No, there is no collisions in ng_hub. Several threads can work in the node simultaneously, forwarding packets in different directions. S> At what level is the redirection happening, specifically, is this happening S> in the driver on the NIC? Or are the packets being brought from the NIC S> into the kernel on the host, and then retransmitted out the NIC on the S> other port? Just currious. netgraph(4) works in the kernel, independently from device drivers. This means that packet is forwarded by driver to upper network layer in the kernel, there it is consumed by netgraph and later passed out the other NIC. S> I am hoping to be running an interesting environment for about 20 days, and S> at the end of that, I hope to have some interesting real-life metrics, that S> I will be happy to share with the rest of you. It will be interesting. P.S. Please do not top quote. -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE