# example.3.conf: shape masq'd hosts
#
# send a SIGHUP to reload this file with the command killall -HUP shaperd

# this is an "internal" log level (all logs are sent with facility daemon,
# priority info; see the syslog manpage for more information).
# valid levels are:
# alert   (1)
# error   (2)
# warning (3)
# info    (4)
# debug1  (5)
# debug2  (6)
# log levels beggining from warning (3) will log unmatched packets
log level = warning

# this is a required option. note that shaperd must have been built with
# the correct forwarding mechanism(s) in order for these to work
# see the README for further details
# packet forwarding = ipq
# packet forwarding = divert
packet forwarding = ipq

# this is useful for debugging
# shaperd will run detached if set to "yes"
daemon = yes

# full path to shaperd's pidfile
# it will be generated in daemon mode only
pidfile = /var/run/shaperd.pid

class A_up {
        bandwidth = 32 kbit/s
        ipv4 classifier out_if=ppp+ saddr=192.168.0.254
        borrow from B_up, C_up, D_up
        queue limits = 0 kb 150 packets
}

class A_down {
        bandwidth = 128 kbit/s
        ipv4 classifier inp_if=ppp+ daddr=192.168.0.254
        borrow from B_down, C_down, D_down
        queue limits = 0 kb 150 packets
}

class B_up {
        bandwidth = 32 kbit/s
        ipv4 classifier out_if=ppp+ saddr=192.168.0.253
        borrow from A_up, C_up, D_up
        queue limits = 0 kb 150 packets
}

class B_down {
        bandwidth = 128 kbit/s
        ipv4 classifier inp_if=ppp+ daddr=192.168.0.253
        borrow from A_down, C_down, D_down
        queue limits = 0 kb 150 packets
}

class C_up {
        bandwidth = 32 kbit/s
        borrow from A_up, B_up, D_up
        ipv4 classifier out_if=ppp+ saddr=192.168.0.252
        queue limits = 0 kb 150 packets
}

class C_down {
        bandwidth = 128 kbit/s
        borrow from A_down, B_down, D_down
        ipv4 classifier inp_if=ppp+ daddr=192.168.0.252
        queue limits = 0 kb 150 packets
}

class D_up {
        bandwidth = 32 kbit/s
        borrow from A_up, B_up, C_up
        ipv4 classifier out_if=ppp+ saddr=192.168.0.251
        queue limits = 0 kb 150 packets
}

class D_down {
        bandwidth = 128 kbit/s
        borrow from A_down, B_down, C_down
        ipv4 classifier inp_if=ppp+ daddr=192.168.0.251
        queue limits = 0 kb 150 packets
}

class wrz_up {
	bandwidth = 4.0 kbyte/s
	ipv4 classifier out_if=ppp+ proto=tcp sport=80
	queue limits = 0 kb 20 packets
}
