I am trying to set up dummynet on a FreeBSD 10 host running on VMware. I have 2 NICs, one on each of two virtual switches, and a bridge configured. Following is what I am using to set up the bridge:
I also have the following sysctl entries:
This is how I am setting up ipfw:
However, bridging is not working with the above. When I do a
I'd be most grateful for any help.
Code:
ifconfig bridge0 addm em0 addm em1 up
ifconfig em0 up
ifconfig em1 up
ifconfig bridge0 10.25.0.101/24
route add default 10.25.0.1
I also have the following sysctl entries:
Code:
net.link.bridge.ipfw=1
net.link.ether.ipfw=1
This is how I am setting up ipfw:
Code:
ipfw -f flush
ipfw add 65000 allow ip from any to any
ipfw add 100 pipe 1 ip from any to 10.25.0.153 layer2
ipfw add 101 pipe 2 ip from 10.25.0.153 to any layer2
ipfw pipe 1 config bw 5Mbits/s queue 6250B delay 50
However, bridging is not working with the above. When I do a
tcpdump
, I see packets on either interface (depending on which side the traffic is coming from) and also on bridge0, but not on the other interface. If I turn off net.link.bridge.ipfw or net.link.ether.ipfw, bridging starts working, but then the ipfw rule 100 is not picked up; it passes to rule 65000.I'd be most grateful for any help.