Initialization of per-flow delays uses the normal ipfw and dummynet commands (see "man ipfw" and "man dummynet") but requires certain options to be chosen. The following should be executed on each machine to start the per-flow delays. sysctl -w net.inet.ip.dummynet.hash_size=256 This command increases the number of available per-flow queues. ipfw pipe 1 config delay 0ms mask all This command installs dummynet pipe 1 with no bandwidth limitation and no delay (this combination of no bandwidth and 0 delay parameters is what invokes per-flow delays). The "mask all" parameter indicates that all bits of the IP addressing 5-tuple are significant in defining a flow. ipfw add 10 pipe 1 ip from
to
out This command creates firewall rule 10 to pass ip datagrams through pipe 1. The rule number must be chosen so that it comes first in the set of rules. The "out" parameter is important because we want to delay only outbound datagrams and not inbound as well. sysctl -w net.inet.ip.dummynet.delay_cdf=0 sysctl -w net.inet.ip.dummynet.delay_cdf_p1=10 sysctl -w net.inet.ip.dummynet.delay_cdf_p2=150 These sysctl calls write the values for the min (p1) and max (p2) of the uniform distribution of delay times in milliseconds. /sbin/sysctl -w net.inet.ip.dummynet.dn_randseed= This sysctl call writes the value of the random seed that is subsequently used by the per-flow delays. To assign delays that are sampled from IMC'03 paper, use: sysctl -w net.inet.ip.dummynet.delay_cdf=1