Problem with Dummynet

Hello All,

I am having a problem with dummynet. I have set up FreeBSD (8.2 i386) as a bridge with dummynet for rate limiting traffic.

Two computers communicate with each other via the bridge. Once I set up a pipe, they can no longer do so.

Here's the code for ipfw and ifconfig on the bridge:
Code:
[B]IPFW[/B]

[B]root@ ~ # ipfw list[/B]
00001 pipe 1 ip from any to any
65534 allow ip from any to any
65535 deny ip from any to any

[B]root@ ~ # ipfw pipe 1 show[/B]
00001:  40.000 Mbit/s   25 ms burst 0 
q131073  50 sl.plr 0.050000 0 flows (1 buckets) sched 65537 weight 0 lmax 0 pri 0 droptail
 sched 65537 type FIFO flags 0x0 0 buckets 1 active
  0 ip           0.0.0.0/0             0.0.0.0/0        2      200  0    0   0

root@ ~ #

Code:
[B]IFCONFIG[/B]

[B]root@ ~ # ifconfig[/B]
em0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC>
        ether 00:30:48:fd:74:5e
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
em1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC>
        ether 00:30:48:fd:74:5f
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
plip0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> metric 0 mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=3<RXCSUM,TXCSUM>
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4 
        inet6 ::1 prefixlen 128 
        inet 127.0.0.1 netmask 0xff000000 
        nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 42:a0:f5:ab:c5:19
        inet 192.168.1.100 netmask 0xffffff00 broadcast 192.168.1.255
        id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
        maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200
        root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
        member: em1 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                ifmaxaddr 0 port 2 priority 128 path cost 2000000
        member: em0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                ifmaxaddr 0 port 1 priority 128 path cost 2000000
ipfw0: flags=8801<UP,SIMPLEX,MULTICAST> metric 0 mtu 65536


Code:
[B]
root@ ~ # kldstat[/B]
Id Refs Address    Size     Name
 1   17 0xc0400000 bd97b4   kernel
 2    1 0xc7e45000 9000     if_bridge.ko
 3    1 0xc7e4e000 6000     bridgestp.ko
 4    1 0xc86f3000 e000     dummynet.ko
 5    1 0xc8701000 11000    ipfw.ko
 6    1 0xc8712000 d000     libalias.ko

If I remove the pipe everything works fine. I have tried compiling dummynet into the kernel and tried by dynamically loading the kernel module -- both methods fail. Any idea how I can get this to work?

Thanks,
atwinix

P.S. I just found out that setting only the plr allows the two hosts to ping each other. Setting bw and delay does not allow any communication to take place.
 
OK, I found out where the problem was. I needed to set the sysctl variable for net.link.bridge.ipfw to 1.

[cmd=]sysctl net.link.bridge.ipfw=1[/cmd]

Hope this thread helps someone. :D

Cheers,
atwinix
 
this helped me, thanks a lot!
do you have any idea why in 8.2 you have to put net.link.ether.ipfw=0?
for me in 8.0 this worked with net.link.ether.ipfw=1 perfectly, ported everything to 8.2 and it does not work anymore unless i set this to 0. the rest can all stay identical...
 
Back
Top