Dummy Network Interface
Robert Watson
rwatson at freebsd.org
Thu Jan 15 12:09:09 PST 2004
On Thu, 15 Jan 2004, Vlad Galu wrote:
> |On Tue, 13 Jan 2004 ms419 at freezone.co.uk wrote:
> |
> |> How does one create a dummy network interface in FreeBSD?
> |
> |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.
> |
> |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.
> |If writing a device driver (and hence needing a starting point), if_tap
> |and if_tun are fairly decent models for a pseudo-interface.
>
> 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.
Does the discard interface in Linux "act like" another type of interface,
such as point-to-point, ethernet, etc?
Robert N M Watson FreeBSD Core Team, TrustedBSD Projects
robert at fledge.watson.org Senior Research Scientist, McAfee Research
More information about the freebsd-net
mailing list