Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 05 Jan 2002 02:26:35 +0100
From:      "Rogier R. Mulhuijzen" <drwilco@drwilco.net>
To:        "Naga R Narayanaswamy" <nraju@mindspring.com>
Cc:        freebsd-net@freebsd.org
Subject:   Re: Bridging and 'pseudo-device tap' and PPPoE
Message-ID:  <5.1.0.14.0.20020105021521.01cdcc50@mail.drwilco.net>
In-Reply-To: <006f01c19453$aad27440$6a092042@compaq>

next in thread | previous in thread | raw e-mail | index | archive | help
--=====================_119636758==_.ALT
Content-Type: text/plain; charset="us-ascii"; format=flowed

At 07:39 3-1-2002 -0500, you wrote:
>Hello:
>
>I want to create pseudo ethernet devices to simulate many NICs on
>a PC. In Solaris, we can do "ifconfig hme0:1 10.1.1.1 up"
>hme0:2 etc to create logival interfaces. I am trying to do a similar thing
>on FreeBSD. But after searching the archives, I find that I have to use
>tap device. Is there any other way than the approach I am using below.

Doing that on Solaris gives you additional MAC addresses?

>I reconfigured the kernel and I have configured the tap device.

$ kldload tap          >:-)

>ifconfig tap0 shows a MAC address and UP status.
>I assigned a IP address also.
>I want to make fxp0 and tap0 in one bridge group.
>I tried both approaches, using "option BRIDGE"
>and ng_bridge example in /usr/share/examples.
>Is bridging supposed to work with tap devices?

I've used bridging with tap devices plenty. Works fine for me.

>I do not see the bridging  happen between tap0 and fxp0.
>I can see the packet written on tap device when I do a
>"hexdump /dev/tap0", but not on fxp0 (using ethereal).
>(I am doing a ping out of tap interface).
>And when I have bridging turned on using ng_bridge,
>if I initiate a PPPoE session, I get socket already connected
>warning, but I do not see the PADI packet on the fxp0 interface
>at all.

TAP devices don't actually work unless there's a process that has the /dev/ 
entry opened and reads from it (well, they'll buffer a little).

>The goal is that I want to use tap0 device in ppp.conf
>and initiate a ppp -ddial <service>
>The goal is to have 100 tap devices and initiate
>pppoe sessions over each of the tap sessions
>to simulate a 100 NIC cards with different mac addresses.

You might want to use the netgraph ng_eiface node which simulates an 
ethernet interface (if I recall correctly) and you should be able to 
connect that to the ng_bridge node fine. Though what exactly is happening 
with ng_bridge & pppoe you'd need to find out. Maybe someone who knows more 
about userland ppp & PPPoE can clarify that.

One downside.... I just looked and ng_eiface is not in 4.X yet. Looking at 
the CVS logs I'm not even sure it will be built when you build -CURRENT. 
Maybe Julian can shed some light on this =)

         DocWilco


--=====================_119636758==_.ALT
Content-Type: text/html; charset="us-ascii"

<html>
At 07:39 3-1-2002 -0500, you wrote:<br>
<blockquote type=cite class=cite cite><font size=2>Hello:<br>
&nbsp;<br>
I want to create pseudo ethernet devices to simulate many NICs on <br>
a PC. In Solaris, we can do &quot;ifconfig hme0:1 10.1.1.1 up&quot;<br>
hme0:2 etc to create logival interfaces. I am trying to do a similar
thing<br>
on FreeBSD. But after searching the archives, I find that I have to use
<br>
tap device. Is there any other way than the approach I am using
below.</font></blockquote><br>
Doing that on Solaris gives you additional MAC addresses?<br><br>
<blockquote type=cite class=cite cite><font size=2>I reconfigured the
kernel and I have configured the tap device.&nbsp;
</font></blockquote><br>
$ kldload tap&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&gt;:-)<br><br>
<blockquote type=cite class=cite cite><font size=2>ifconfig tap0 shows a
MAC address and UP status.<br>
I assigned a IP address also.<br>
I want to make fxp0 and tap0 in one bridge group. <br>
I tried both approaches, using &quot;option BRIDGE&quot;<br>
and ng_bridge example in /usr/share/examples.<br>
Is bridging supposed to work with tap devices?</font></blockquote><br>
I've used bridging with tap devices plenty. Works fine for me.<br><br>
<blockquote type=cite class=cite cite><font size=2>I do not see the
bridging&nbsp; happen between tap0 and fxp0. <br>
I can see the packet written on tap device when I do a&nbsp; <br>
&quot;hexdump /dev/tap0&quot;, but not on fxp0 (using ethereal). <br>
(I am doing a ping out of tap interface).<br>
And when I have bridging turned on using ng_bridge,<br>
if I initiate a PPPoE session, I get socket already connected<br>
warning, but I do not see the PADI packet on the fxp0 interface<br>
at all.</font></blockquote><br>
TAP devices don't actually work unless there's a process that has the
/dev/ entry opened and reads from it (well, they'll buffer a
little).<br><br>
<blockquote type=cite class=cite cite><font size=2>The goal is that I
want to use tap0 device in ppp.conf<br>
and initiate a ppp -ddial &lt;service&gt; <br>
The goal is to have 100 tap devices and initiate<br>
pppoe sessions over each of the tap sessions <br>
to simulate a 100 NIC cards with different mac
addresses.</font></blockquote><br>
You might want to use the netgraph ng_eiface node which simulates an
ethernet interface (if I recall correctly) and you should be able to
connect that to the ng_bridge node fine. Though what exactly is happening
with ng_bridge &amp; pppoe you'd need to find out. Maybe someone who
knows more about userland ppp &amp; PPPoE can clarify that.<br><br>
One downside.... I just looked and ng_eiface is not in 4.X yet. Looking
at the CVS logs I'm not even sure it will be built when you build
-CURRENT. Maybe Julian can shed some light on this =)<br><br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>DocWilco<br><br>
</html>

--=====================_119636758==_.ALT--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5.1.0.14.0.20020105021521.01cdcc50>