[pf4freebsd] Re: cbq with borrow not working

Roman Mikus roman at zutom.sk
Wed Sep 15 21:14:02 PDT 2004


Hi all,

I'm sending output of "pfctl -v -vsq" and "pfctl -v -vsr". I forgot to
mention my machine is running FreeBSD 5.3BETA1, but I has also tried
this configuration on OpenBsd3.5 with the same result.

In test I'm downloading from ftp server with ip address 10.0.0.1 to
machine "nb" with ip address 192.168.1.10.
Max downloading speed was about 4kb/s (=32Kbit/s).

Thank you.

roman


hydra# pfctl -v -vsq
queue root_xl0 bandwidth 10Mb priority 0 cbq( wrr root ) {std, group1}
  [ pkts:        798  bytes:    1086790  dropped pkts:      0 bytes:
0 ]
  [ qlength:   0/ 50  borrows:      0  suspends:      0 ]
  [ measured:     3.1 packets/s, 34.70Kb/s ]
queue  std bandwidth 10Mb cbq( default ) 
  [ pkts:          1  bytes:         42  dropped pkts:      0 bytes:
0 ]
  [ qlength:   0/ 50  borrows:      0  suspends:      0 ]
  [ measured:     0.0 packets/s, 0.23 b/s ]
queue  group1 bandwidth 256Kb {user1, user2}
  [ pkts:          0  bytes:          0  dropped pkts:      0 bytes:
0 ]
  [ qlength:   0/ 50  borrows:      0  suspends:      0 ]
  [ measured:     0.0 packets/s, 0 b/s ]
queue   user1 bandwidth 32Kb cbq( borrow ) 
  [ pkts:          0  bytes:          0  dropped pkts:      0 bytes:
0 ]
  [ qlength:   0/ 50  borrows:      0  suspends:      0 ]
  [ measured:     0.0 packets/s, 0 b/s ]
queue   user2 bandwidth 32Kb cbq( borrow ) 
  [ pkts:        797  bytes:    1086748  dropped pkts:      0 bytes:
0 ]
  [ qlength:  22/ 50  borrows:    616  suspends:    144 ]
  [ measured:     3.1 packets/s, 34.70Kb/s ]

^C
hydra# pfctl -v -vsr
@0 scrub in all fragment reassemble
  [ Evaluations: 6083      Packets: 3045      Bytes: 0           States:
0     ]
@0 pass in all
  [ Evaluations: 1802      Packets: 740       Bytes: 37486       States:
0     ]
@1 pass out all
  [ Evaluations: 1802      Packets: 1586      Bytes: 1264030     States:
3     ]
@2 pass out on xl0 inet from any to 192.168.1.11 queue user1
  [ Evaluations: 1062      Packets: 0         Bytes: 0           States:
0     ]
@3 pass out on xl0 inet from any to 192.168.1.10 queue user2
  [ Evaluations: 862       Packets: 862       Bytes: 1167330     States:
0     ]

> -----Original Message-----
> From: Max Laier [mailto:max at love2party.net]
> Sent: Saturday, August 28, 2004 5:43 PM
> To: pf4freebsd at freelists.org
> Cc: Roman Mikus
> Subject: Re: [pf4freebsd] cbq with borrow not working
> 
> On Saturday 28 August 2004 15:58, Roman Mikus wrote:
> > Hi all,
> >
> > I'm trying attached configuration of pf for shapping traffic of user
> > "roman" and "nb". I need group of users sharing same 256kbit/s line
with
> > guaranted minimal traffic 32kbit/s for each. I used cbq queue with
> > borrow option, but it is not working - user roman can only download
at
> > speed 32Kbit/s - queue "user1" doesn't borrow from its parent
"group1"
> > queue.
> >
> > Am I missing something?
> >
> > Thanks for any help.
> 
> Output of $pfctl -vsq would be helpful ... be sure to transfer some
data
> to
> the individual peers so that borrowing should get exercised.
> 
> You can also watch the counters live with $pfctl -vvsq to see where
the
> bandwidth is going to.
> 
> > roman
> >
> > my pf.conf looks like this:
> >
> > int_if  = "rl1"
> > ext_if  = "rl0"
> > internal_net="192.168.1.0/24"
> > external_addr="10.0.0.101"
> >
> > scrub in all
> >
> > altq on $int_if cbq queue { std group1 group2 }
> > queue std cbq(default)
> >
> > queue group1 bandwidth 256Kb cbq { user1 user2 }
> > queue user1 bandwidth 32Kb cbq(borrow)
> > queue user2 bandwidth 32Kb cbq(borrow)
> >
> > queue group2 bandwidth 512Kb cbq { user3 user4 } # not used yet
> > queue user3 bandwidth 32Kb cbq(borrow)   # not used yet
> > queue user4 bandwidth 32Kb cbq(borrow)   # not used yet
> >
> > nat on $ext_if from $internal_net to any -> ($ext_if)
> >
> > roman = "192.168.1.11"
> > nb = "192.168.1.10"
> >
> > pass  in all
> > pass  out all
> >
> > pass  out on $int_if from any to $roman queue user1
> > pass  out on $int_if from any to $nb queue user2
> 
> --
> /"\  Best regards,                      | mlaier at freebsd.org
> \ /  Max Laier                          | ICQ #67774661
>  X   http://pf4freebsd.love2party.net/  | mlaier at EFnet
> / \  ASCII Ribbon Campaign              | Against HTML Mail and News




More information about the freebsd-pf mailing list