|
楼主 |
发表于 2005-11-28 21:23:07
|
显示全部楼层
等了一天,没人回,自己的贴子,自己回吧。
continue
让这个过滤器不要匹配这个包,但是其它的过滤器可能会匹配它。
Police
This elemental mechanism is only used in Linux traffic control as part of a filter. A policer calls one action above and another action below the specified rate. Clever use of policers can simulate a three-color meter. See also Section 10.
Although both policing and shaping are basic elements of traffic control for limiting bandwidth usage a policer will never delay traffic. It can only perform an action based on specified criteria. See also Example 5.
Example 5. tc filter
[root@leander]# tc filter add \
> dev eth0 \
> parent 1:0 \
> protocol ip \
> prio 5 \
> u32 \
> match ip port 22 0xffff \
> match ip tos 0x10 0xff \
> flowid 1:6 \
> police \
> rate 32000bps \ (11)
> burst 10240 \ (12)
> mpu 0 \ (13)
> action drop/continue (14)
Add a filter. The verb could also be del.
Specify the device onto which we are attaching the new filter.
Specify the parent handle to which we are attaching the new filter.
This parameter is required. It's use should be obvious, although I don't know more.
The prio parameter allows a given filter to be preferred above another. The pref is a synonym.
This is a classifier, and is a required phrase in every tc filter command.
These are parameters to the classifier. In this case, packets with a type of service flag (indicating interactive usage) and matching port 22 will be selected by this statement.
The flowid specifies the handle of the target class (or qdisc) to which a matching filter should send its selected packets.
This is the policer, and is an optional phrase in every tc filter command.
(11)
The policer will perform one action above this rate, and another action below (see action parameter).
(12)
The burst is an exact analog to burst in HTB (burst is a buckets concept).
(13)
The minimum policed unit. To count all traffic, use an mpu of zero (0).
(14)
The action indicates what should be done if the rate based on the attributes of the policer. The first word specifies the action to take if the policer has been exceeded. The second word specifies action to take otherwise.
As evidenced above, the tc command line utility has an arcane and complex syntax, even for simple operations such as these examples show. It should come as no surprised to the reader that there exists an easier way to configure Linux traffic control. See the next section, Section 5.3.
上面这段英文是Traffic Control HOWTO中的原文,应该不难理解。 |
|