# [IPFW] Issues with pipe



## Sandra (Apr 16, 2012)

Hello,

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






I installed a VMWare image with *Free*BSD 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:


I have created a ipfw rule

```
ipfw add allow all from any to any
```

Create the pipe

```
ipfw add pipe 1 ip from any to any
```

Set up the pipe

```
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 list*and *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:






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






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? *W*hat command can I use to check the increase on the pipe?

Thanks so much!


----------



## phoenix (Apr 16, 2012)

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.


----------



## Sandra (Apr 17, 2012)

Hi Phoenix,

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


```
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!


----------

