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

Reply via email to