[ previous ] [ next ] [ threads ]
 From:  Rolf Sommerhalder <rolf dot sommerhalder at alumni dot ethz dot ch>
 To:  m0n0wall at lists dot m0n0 dot ch
 Subject:  Shaping Outbound Traffic in 1.2b8 Bridged Mode not working
 Date:  Sat, 04 Jun 2005 22:09:19 +0200
I found that 1.2b8 in (un-filtered) bridging mode correctly shapes 
inbound traffic, but appears not to shape outbound traffic. Unless I 
have a misconception, this looks like a bug.

I am using 1.2b8 in (un-filtered) bridging mode to emulate delay in both 
the forward and return path of an IP channel, e.g. to use the DummyNet 
module of FreeBSD it was originally designed for before it became a 
traffic shaper.

client PC  ---  OPT1 / m0n0wall 1.2b8 on WRAP / WAN --- cable modem
                               management PC

Besides setting up m0n0wall as a non-filtering bridge as shown above, I 
used the Magic shaper whizzard to generate the traffic shping rules. It 
generates rules for inbound and outbound traffic on the WAN interface 
only. Then I added a delay in the order of 200 ms to both inbound and 
outbound pipe. Among the shaping rules generated by the whizzard are two 
rules for ICMP in- and outbound traffic.

When pinging a host on the Internet from the client PC, I find that only 
the delay added to the inbound pipe has an effect, whereas the delay on 
the outbound pipe has no effect at all.
After manually rewriting the shaping rule that affects the outbound ICMP 
traffic from
   WAN out ICMP  *  *  m_High Priority #2 Upload  m_ICMP Upload
   OPT1 in ICMP 	*  *  m_High Priority #2 Upload  m_ICMP Upload
the desired delay now also affects my outgoing ICMP pings.

When checking the pipes in exec.php using the command
   ipfw pipe 1 show
there are matches after the rewrite of the rule

  BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes 
Pkt/Byte Drp
   0 icmp  x.y.z.148/0      a.b.c.79/0      722    71048  0    0   0

while there were no such matches before the rewrite.

I have not tried this in 1.2b7 because trafic shaping in bridging mode 
was disabled due to a kernel bug in that version. Also, I assume that 
this affects not only the delay parameter of outbound pipes, but all 
other shaping parameters as well.

Any ideas where I should continue to investigate, and where eventually 
to fix this? (I manage to compile a new kernel and to make a new image, 
so I can test further.)