I am trying to do network emulation using dummynet in FreeBSD 10. I have this working in 9.3 however things must have changed and I cant determine exactly what but my setup no longer works. I have pretty basic config:
**/boot/loader.conf**
dummynet_load="YES"
if_bridge_load="YES"
ipfw_load="YES"
kern.hz=10000
**/etc/sysctl.conf**
net.link.bridge.ipfw=1
net.inet.ip.fw.one_pass=1
net.inet.ip.forwarding=1
net.inet.ip.fastforwarding=1
net.inet.ip.dummynet.io_fast=1
net.inet.ip.dummynet.pipe_byte_limit=16777216
**/etc/rc.conf**
cloned_interfaces="bridge0"
ifconfig_bridge0="addm em0 addm em1 up"
ifconfig_em0="up"
ifconfig_em1="up"
In my firewall script I have:
ipfw pipe 111 config bw 1Mbit/s delay 10ms plr .01 queue 1000KB
ipfw add pipe 111 log all from 10.25.0.129 to 10.25.0.11
When I do a ping test from 10.25.0.129 to 10.25.0.11 it is always successful however the firewall hits look like:
root@dummynet:/etc/dummynet # ipfw -a list
00100 0 0 pipe 111 log ip from 10.25.0.129 to 10.25.0.11
65535 77 15511 deny ip from any to any
If I shut the BSD machine down the pings stop working so I know the pings are definitely being bridged by BSD for some reason the rule isn't getting hit like it did in FreeBSD9.3 though.
net.link.bridge.ipfw
should pass packets to theipfw
otherwise this is a matter for PR. What version of FreeBSD you have used?