[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bandwidth throttling a NIC
count rules under ipf merely count the amount of processed bytes that match the rule.
nothing to do with bandwidth throttling. let's not mix apples and oranges ;)
altq should be able to do the trick.
see below .. taken from http://www.csl.sony.co.jp/person/kjc/kjc/software/TIPS.txt
section 2.1
...cut-o pasto...
Basic commands
Though there are many commands and options, all you need to use
will be the following commands and their options.
interface if_name [bandwidth bps] cbq
(e.g., "interface fxp0 bandwidth 10M cbq")
class cbq if_name class_name parent [borrow] [pbandwidth percent]
[red] [default|control]
(e.g., "class cbq fxp0 my_ftp tcp_class borrow pbandwidth 30 red")
filter if_name class_name dst_addr dst_port src_addr src_port proto
(e.g., "filter fxp0 my_ftp 133.138.1.83 0 0 20 6")
"interface" command sets up the interface. specify the interface
bandwidth in bits-per-second.
"class" command creates a class. set the bandwidth of the class
by "pbandwidth" in percent of the interface bandwidth.
set "borrow" when the class can borrow bandwidth from its parent
class. set "red" if you use RED dropper (good for TCP).
"filter" command sets a packet-filter to a class.
a basic filter uses <dst_addr, dst_port, src_addr, src_port, proto>.
NOTE: dst comes first.
set "0" if you don't care about the field.
--
Matt Sauve-Frankel ||Philosophie Bleue http://philosophiebleue.com
Network Administrator || http://philosophyblue.com