From owner-freebsd-net Fri Jan 4 17:31:57 2002 Delivered-To: freebsd-net@freebsd.org Received: from artemis.drwilco.net (artemis.drwilco.net [209.167.6.62]) by hub.freebsd.org (Postfix) with ESMTP id 7237D37B9F0 for ; Fri, 4 Jan 2002 17:17:44 -0800 (PST) Received: from ceres.drwilco.net (docwilco.xs4all.nl [213.84.68.230]) by artemis.drwilco.net (8.11.6/8.11.6) with ESMTP id g051HgR78110 (using TLSv1/SSLv3 with cipher DES-CBC3-SHA (168 bits) verified NO); Fri, 4 Jan 2002 20:17:44 -0500 (EST) (envelope-from drwilco@drwilco.net) Message-Id: <5.1.0.14.0.20020105021521.01cdcc50@mail.drwilco.net> X-Sender: lists@mail.drwilco.net X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Sat, 05 Jan 2002 02:26:35 +0100 To: "Naga R Narayanaswamy" From: "Rogier R. Mulhuijzen" Subject: Re: Bridging and 'pseudo-device tap' and PPPoE Cc: freebsd-net@freebsd.org In-Reply-To: <006f01c19453$aad27440$6a092042@compaq> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=====================_119636758==_.ALT" Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --=====================_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 >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" 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-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message