[IPFW] Issues with pipe

Hello,

I'm doing a laboratory to test some virtual WAN optimization equipments. This is the diagram of my network:
Lab_WANOptimization_routermode_1.jpeg


I installed a VMWare image with FreeBSD and DummyNet already set up and also, I put off the WAN Optimization equipments to test the WAN simulator - Dummynet and then, I have followed these steps to set up Dummynet:

  1. I have created a ipfw rule
    Code:
    ipfw add allow all from any to any
  2. Create the pipe
    Code:
    ipfw add pipe 1 ip from any to any
  3. Set up the pipe
    Code:
    ipfw pipe 1 config bw 100Kbit/s delay 50ms

Then, from the Client1 (IP 10.10.20.3) I have pinged the Client2(10.10.40.3) and viceversa. After that, with the commands ipfw -t listand ipfw -a list, I have checked the ipfw rule was working, as you can see on this image, the traffic on the rule is increasing. However, the traffic on the pipe 1 doesn't increase and continue on zero:

ipfw_list.jpg


I used the command ipfw pipe 1 show and it doesn't show any traffic detail:

ipfw_pipe.jpg


Also, the ping continued with the same delay 10ms and didn't show increase to 50ms (the delay set up on the pipe 1).

I need to finish my lab as soon as possible, please, someone knows if I'm missing something? I have to see the same increase on the pipe? What command can I use to check the increase on the pipe?

Thanks so much!
 
IPFW is a "first-match wins" packet filter. Meaning, the very first rule that matches a packet is the one that is used, and the search terminates, and the packet is processed.

Your very first rule is "allow ip from any to any" which matches every single packet. Thus, nothing goes past that rule.

Remove that rule, and then things will start to work the way you think they should.
 
Hi Phoenix,

I removed the general rule and applied the following commands and now, it is working.

Code:
ipfw add 100 pipe 1 ip from 10.10.20.0/24 to 10.10.40.0/24
ipfw pipe 1 config bw 10000kbit/s delay 0ms

Thanks so much!
 
Back
Top