From owner-freebsd-net@FreeBSD.ORG Thu Jan 15 12:48:35 2004 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 BE8AD16A4CE; Thu, 15 Jan 2004 12:48:35 -0800 (PST) Received: from phoenix.gargantuan.com (rrcs-se-24-73-171-238.biz.rr.com [24.73.171.238]) by mx1.FreeBSD.org (Postfix) with ESMTP id 47CF343D67; Thu, 15 Jan 2004 12:47:47 -0800 (PST) (envelope-from michael@gargantuan.com) Received: from localhost (localhost.gargantuan.com [127.0.0.1]) by spamassassin-injector (Postfix) with SMTP id 5E3103F4; Thu, 15 Jan 2004 15:47:46 -0500 (EST) Received: by phoenix.gargantuan.com (Postfix, from userid 1001) id 3AEEF6B1; Thu, 15 Jan 2004 15:47:34 -0500 (EST) Date: Thu, 15 Jan 2004 15:47:34 -0500 From: "Michael W. Oliver" To: Robert Watson Message-ID: <20040115204734.GA61637@gargantuan.com> References: <20040115053524.2c6e8db2.dudu@diaspar.rdsnet.ro> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jRHKVT23PllUwdXP" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-Personal-Email: michael@gargantuan.com X-WWW-Site: http://michael.gargantuan.com X-PGP-Public-Key: $X-WWW-Site/gnupg/pubkey.asc X-PGP-Fingerprint: 2694 0179 AE3F BFAE 0916 0BF5 B16B FBAB C5FA A3C9 X-Home-Phone: +1-863-816-8091 X-Mobile-Phone: +1-863-738-2334 X-Home-Address: 8008 Apache Lane, Lakeland, FL, US 33810-2172 X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on phoenix.gargantuan.com X-Spam-Level: X-Spam-Status: No, hits=-104.9 required=5.0 tests=AWL,BAYES_00, USER_IN_WHITELIST autolearn=no version=2.61 cc: freebsd-net@freebsd.org cc: Vlad Galu Subject: Re: Dummy Network 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: Thu, 15 Jan 2004 20:48:36 -0000 --jRHKVT23PllUwdXP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 15, 2004 at 03:07:20PM -0500, Robert Watson wrote: >=20 > On Thu, 15 Jan 2004, Vlad Galu wrote: >=20 > > |On Tue, 13 Jan 2004 ms419@freezone.co.uk wrote: > > | > > |> How does one create a dummy network interface in FreeBSD?=20 > > | > > |Dummy in what sense? An interface where the packets are simply > > |dropped? if_tap and if_tun both provide pseudo-device in /dev that a > > |userspace process can attach to in order to emulate a network interface > > |(used by VMWare, ppp, various tunneling bits, ...) In the absense of a > > |process sitting on the device, they simply drop the packets. Although > > |they may get garbage-collected if unused on -CURRENT... You can also > > |use netgraph to bring pseudo-interfaces, perhaps without anywhere for > > |packets to go.=20 > > | > > |And, I suppose, create in what sense? Are you looking at this from a > > |developer perspective, or you just need one from a user perspective.= =20 > > |If writing a device driver (and hence needing a starting point), if_tap > > |and if_tun are fairly decent models for a pseudo-interface. > >=20 > > I think he could use the discard interface smoothly. On Linux > > (from which the dummy interface notion is taken from) it is simply used > > for testing purposes, as in routing, or perhaps socket programming. I > > personally have used it for a while, but then I used interface aliasing, > > which became a habit.=20 >=20 > Does the discard interface in Linux "act like" another type of interface, > such as point-to-point, ethernet, etc?=20 I believe that he was referring to the discard interface in FreeBSD. I don't know about Linux at all, but I have used the discard interface in a FreeBSD router much like a Null interface in a cisco router. pseudo-device disc man 4 disc --=20 Mike perl -e 'print unpack("u","88V]N=3D&%C=3D\"!I;F9O(&EN(&AE861E