diff options
author | Kenjiro Cho <kjc@cvs.openbsd.org> | 2001-07-25 10:44:34 +0000 |
---|---|---|
committer | Kenjiro Cho <kjc@cvs.openbsd.org> | 2001-07-25 10:44:34 +0000 |
commit | da80af9da19811cdf99bd468dd8d5462ab692677 (patch) | |
tree | 0aeabaf63a419104fe56259fb89631e2bca481d3 /usr.sbin | |
parent | 07c732048dbad789850470a4d94dbfd5c04fe67f (diff) |
mdoc fixes; sync with KAME.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/altq/altqd/altq.conf.5 | 856 | ||||
-rw-r--r-- | usr.sbin/altq/altqd/altqd.8 | 40 |
2 files changed, 455 insertions, 441 deletions
diff --git a/usr.sbin/altq/altqd/altq.conf.5 b/usr.sbin/altq/altqd/altq.conf.5 index 58820c4537d..6ffc5958e34 100644 --- a/usr.sbin/altq/altqd/altq.conf.5 +++ b/usr.sbin/altq/altqd/altq.conf.5 @@ -1,5 +1,5 @@ -.\" $OpenBSD: altq.conf.5,v 1.4 2001/07/25 10:04:56 mpech Exp $ -.\" $KAME: altq.conf.5,v 1.8 2001/04/09 16:26:28 thorpej Exp $ +.\" $OpenBSD: altq.conf.5,v 1.5 2001/07/25 10:44:33 kjc Exp $ +.\" $KAME: altq.conf.5,v 1.11 2001/07/25 10:40:15 kjc Exp $ .\" .\" Copyright (C) 2000 .\" Sony Computer Science Laboratories Inc. All rights reserved. @@ -35,9 +35,10 @@ .\" .Sh DESCRIPTION The -.Nm altq.conf +.Nm file contains a number of lines specifying the behavior of queueing -disciplines. Comments start with a # and extend to the end of the line. +disciplines. +Comments start with a # and extend to the end of the line. .Pp The .Xr altqd 8 @@ -49,10 +50,9 @@ HFSC (Hierarchical Fair Service Curve), PRIQ (Priority Queueing), RED (Random Early Detection), RIO (RED with IN/OUT), WFQ (Weighted Fair Queueing), and CDNR (Diffserv Traffic Conditioner) can be configured in this file. -.Pp -.Sh Interface Commands +.Ss Interface Commands .Bl -tag -width interface -offset indent -.It Nm interface +.It Cm interface .Ar if_name .Op Cm bandwidth Ar bps .Op Cm tbrsize Ar bytes @@ -61,46 +61,48 @@ and CDNR (Diffserv Traffic Conditioner) can be configured in this file. .El .Pp The -.Sy interface +.Cm interface command specifies a network interface to be under control of ALTQ. One interface specification is provided for each network interface -under control of ALTQ. A system configured as a router may have -multiple interface specifications. -.\" +under control of ALTQ. +A system configured as a router may have multiple interface +specifications. .Bl -tag -width 8n -offset indent -.It Em if_name +.It Ar if_name specifies the name of a network interface (e.g., fxp0). -.It Sy bandwidth +.It Cm bandwidth specifies the interface bandwidth in bits per second. This is the maximum rate that the queueing discipline will allow on this interface. -.It Sy tbrsize +.It Cm tbrsize specifies the bucket size of a token bucket regulator in bytes. When -.Sy tbrsize +.Cm tbrsize is omitted, the system automatically sets the bucket size using heuristics. The token rate is set to the interface bandwidth specified by the -.Sy interface +.Cm interface command. -.It Em sched_type -Type of a queueing discipline. It must be either -.Sy blue , -.Sy cbq , -.Sy fifoq , -.Sy hfsc , -.Sy priq , -.Sy red , -.Sy rio , +.It Ar sched_type +Type of a queueing discipline. +It must be either +.Cm blue , +.Cm cbq , +.Cm fifoq , +.Cm hfsc , +.Cm priq , +.Cm red , +.Cm rio , or -.Sy wfq . +.Cm wfq . If the interface has only traffic conditioners and no queueing -discipline, sched_type can be omitted. +discipline, +.Ar sched_type +can be omitted. .El -.Pp -.Sh Class Command +.Ss Class Command .Bl -tag -width class -offset indent -.It Nm class +.It Cm class .Ar sched_type .Ar if_name .Ar class_name @@ -112,39 +114,42 @@ discipline, sched_type can be omitted. .El .Pp The -.Sy class +.Cm class command specifies a packet scheduling class for CBQ, HFSC, or PRIQ. A class specifier must be provided for each packet scheduling class. .Bl -tag -width 8n -offset indent -.It Em sched_type -Type of queueing discipline. Must correspond to the discipline name -in interface specification. -.It Em if_name -Interface name. Must correspond to name in interface specification. -.It Em class_name -Arbitrary name for this class. Must be unique for this interface. -.It Em parent_name +.It Ar sched_type +Type of queueing discipline. +Must correspond to the discipline name in interface specification. +.It Ar if_name +Interface name. +Must correspond to name in interface specification. +.It Ar class_name +Arbitrary name for this class. +Must be unique for this interface. +.It Ar parent_name The name of the parent class for this class (for CBQ or HFSC). Parent class must have been previously defined. -PRIQ does not have class hierarchy and parent_name must be ``NULL'' +PRIQ does not have class hierarchy and parent_name must be +.Dv NULL for PRIQ classes. -.It Sy red +.It Cm red Use RED (Random Early Detection) on this class queue. RED drops packets with the probability proportional to the average queue length. -.It Sy rio +.It Cm rio Use RIO (RED with In/Out bit) on this class queue. RIO runs triple RED algorithms at the same time. -.It Sy ecn +.It Cm ecn Use RED/ECN (Explicit Congestion Notification) on this -class queue (experimental implementation). ECN implies RED. -.It Sy cleardscp +class queue (experimental implementation). +ECN implies RED. +.It Cm cleardscp Clear diffserv codepoint in the IP header. .El -.Pp -.Sh Filter Commands +.Ss Filter Commands .Bl -tag -width filter -offset indent -.It Nm filter +.It Cm filter .Ar if_name .Ar class_name .Op Cm name Ar fltr_name @@ -153,34 +158,35 @@ Clear diffserv codepoint in the IP header. .El .Pp The -.Sy filter +.Cm filter command specifies a filter to classify packets into a scheduling class. A filter specifier determines any statically-defined packet classification rules. .Bl -tag -width 10n -offset indent -.It Em if_name +.It Ar if_name Name of a network interface (e.g., fxp0). -.It Em class_name +.It Ar class_name Name of a class or a conditioner to which matching packets are directed. -.It Sy name +.It Cm name Add an arbitrary name to the filter for a future refenece. -.It Sy ruleno -Specifies explicit order of filter matching. Filter matching is performed -from a filter with a larger ruleno. Default is 0. +.It Cm ruleno +Specifies explicit order of filter matching. +Filter matching is performed from a filter with a larger ruleno. +Default is 0. .El .Pp -.Em filter_value +.Ar filter_value should be in the following format: .Bl -tag -width filter -offset indent -.It filter_values : +.Ar filter_values : .Ad dst_addr Op Cm netmask Ar mask .Ar dport .Ad src_addr Op Cm netmask Ar mask .Ar sport .Ar proto .Oo -.Sy tos +.Cm tos .Ar value .Op Cm tosmask Ar value .Oc @@ -192,25 +198,25 @@ Here and .Ad src_addr are dotted-decimal addresses of -the destination and the source respectively. An address may be -followed by -.Sy netmask +the destination and the source respectively. +An address may be followed by +.Cm netmask keyword. -.Em dport +.Ar dport and -.Em sport +.Ar sport are port numbers of the destination and the source respectively. -.Em proto +.Ar proto is a protocol number defined for IP packets (e.g. 6 for TCP). -.Sy tos +.Cm tos keyword can be used to specify the type of service field value. -.Sy gpi +.Cm gpi keyword can be used to specify the Security Parameter Index value for IPSec. .Pp When filter value 0 is used, it is taken as a wildcard. .Bl -tag -width filter6 -offset indent -.It Nm filter6 +.It Cm filter6 .Ar if_name .Ar class_name .Op Cm name Ar fltr_name @@ -219,20 +225,20 @@ When filter value 0 is used, it is taken as a wildcard. .El .Pp The -.Sy filter6 +.Cm filter6 command is for IPv6. -.Em filter6_value +.Ar filter6_value should be in the following format: .Bl -tag -width filter6 -offset indent .It filter6_values : -.Ad dst_addr[/prefix_len] +.Ad dst_addr Ns Op /prefix_len .Ar dport -.Ad src_addr[/prefix_len] +.Ad src_addr Ns Op /prefix_len .Ar sport .Ar proto .Op Cm flowlabel Ar value .Oo -.Sy tclass +.Cm tclass .Ar value .Op Cm tclassmask Ar value .Oc @@ -244,32 +250,30 @@ Here and .Ad src_addr are IPv6 addresses of the destination and the source respectively. -An address may be followed by an optional -.Sy address prefix length . -.Em dport +An address may be followed by an optional address prefix length. +.Ar dport and -.Em sport +.Ar sport are port numbers of the destination and the source respectively. -.Em proto +.Ar proto is a protocol number defined for IPv6 packets (e.g. 6 for TCP). -.Sy flowlabel +.Cm flowlabel keyword can be used to specify the flowlabel field value. -.Sy tclass +.Cm tclass keyword can be used to specify the traffic class field value. -.Sy gpi +.Cm gpi keyword can be used to specify the Security Parameter Index value for IPSec. .Pp When filter value 0 is used, it is taken as a wildcard. -.Pp -.Sh CBQ Commands +.Ss CBQ Commands CBQ (Class Based Queueing) achieves both partitioning and sharing of -link bandwidth by hierarchically structured classes. +link bandwidth by hierarchically structured classes. Each class has its own queue and is assigned its share of bandwidth. A child class can borrow bandwidth from its parent class as long as excess bandwidth is available. .Bl -tag -width interface -offset indent -.It Nm interface +.It Cm interface .Ar if_name .Op Cm bandwidth Ar bps .Op Cm tbrsize Ar bytes @@ -278,36 +282,37 @@ excess bandwidth is available. .El .Pp .Bl -tag -width 8n -offset indent -.It Em if_name +.It Ar if_name specifies the name of a network interface (e.g., fxp0). -.It Sy bandwidth +.It Cm bandwidth specifies the interface bandwidth in bits per second. -.It Sy tbrsize +.It Cm tbrsize specifies the bucket size of a token bucket regulator in bytes. -.It Em sched_type +.It Ar sched_type must be either -.Sy cbq , -.Sy cbq-wrr +.Cm cbq , +.Cm cbq-wrr (weighted-round robin) or -.Sy cbq-prr +.Cm cbq-prr (packet-by-packet round robin). -.Sy cbq +.Cm cbq is equivalent to -.Sy cbq-wrr . -.It Sy efficient -Enables CBQ's link efficiency mode. This means that -the scheduler will send a packet from the first overlimit -class it encounters of all classes of the link-sharing +.Cm cbq-wrr . +.It Cm efficient +Enables CBQ's link efficiency mode. +This means that the scheduler will send a packet from the first +overlimit class it encounters of all classes of the link-sharing structure when all classes are overlimit. This will also cause the scheduler to use greater than it's assigned bandwidth, if the link is capable of more than the assigned bandwidth. -By default, this mode is turned off. By adding the keyword -.Sy efficient +By default, this mode is turned off. +By adding the keyword +.Cm efficient to the interface specification line, enables this mode. .El .Pp .Bl -tag -width class -offset indent -.It Nm class +.It Cm class .Ar sched_type .Ar if_name .Ar class_name @@ -333,117 +338,124 @@ to the interface specification line, enables this mode. .El .Pp The -.Sy class +.Cm class command specifies a CBQ class. The classes are organized as a hierarchy, and every class, except for the root class, has a parent. .Bl -tag -width 8n -offset indent -.It Em sched_type +.It Ar sched_type must be -.Sy cbq +.Cm cbq for a CBQ class. -.It Em if_name -Interface name. Must correspond to name in interface specification. -.It Em class_name -Arbitrary name for this class. Must be unique within the class -hierarchy for this interface. The name -.Sy ctl_class +.It Ar if_name +Interface name. +Must correspond to name in interface specification. +.It Ar class_name +Arbitrary name for this class. +Must be unique within the class +hierarchy for this interface. +The name +.Cm ctl_class is a reserved class name. -.It Em parent_name +.It Cm parent_name The name of the parent class for this class or -.Sy NULL -if this is the root class. Parent class must have been previously defined. -.It Sy admission +.Dv NULL +if this is the root class. +Parent class must have been previously defined. +.It Cm admission The type of admission control and QoS type. -.Sy cntlload -is controlled load service for -.Em RSVP , -otherwise, it should be -.Sy none . +.Cm cntlload +is controlled load service for RSVP, otherwise, it should be +.Cm none . The default is -.Sy none . -.It Sy priority -High numbers are higher priority. Max value is 7 and Min value is 0. +.Cm none . +.It Cm priority +High numbers are higher priority. +Max value is 7 and Min value is 0. Default is 1. -.It Sy pbandwidth +.It Cm pbandwidth The percentage of the interface bandwidth allocated to this class. Generally should add up to 100 percent at each level of the class hierarchy, although other amounts can be specified for purposes of experimentation. -.It Sy exactbandwidth +.It Cm exactbandwidth Specify the bandwidth in bits-per-second instead of -.Sy pbandwidth . +.Cm pbandwidth . Note that the bandwidth allocation of CBQ is not so precise but this is just a way to pass a parameter to CBQ; the user is supposed to know the detailed internals of CBQ. -.Sy pbandwidth +.Cm pbandwidth is a preferred way to specify the bandwidth of a class. -.It Sy borrow +.It Cm borrow The class can borrow bandwidth from its parent class when this class is overlimit. If this keyword is not present, then no borrowing is done, and the packet is delayed or dropped when the class is overlimit. -.It Sy default -Specify the default class. When this keyword is present, all packets -that do not match some classification criteria are assigned to this -class. Must be exactly one class on each interface defined as the -default class. -.It Sy control -Specify the control class. When this keyword is present, the predefined -control class packets (RSVP, IGMP, and ICMP) are assigned to this +.It Cm default +Specify the default class. +When this keyword is present, all packets that do not match some +classification criteria are assigned to this class. +Must be exactly one class on each interface defined as the default class. +.It Cm control +Specify the control class. +When this keyword is present, the predefined control class packets +(RSVP, IGMP, and ICMP) are assigned to this class. Note that when the control class is not specified by the time the default class is created, one is automatically created with default -parameters. Thus, if the control class is specified, it must be -listed before the default class. -Must be exactly one class on each interface defined as the -control class. -.It Sy maxburst +parameters. +Thus, if the control class is specified, it must be listed before the +default class. +Must be exactly one class on each interface defined as the control +class. +.It Cm maxburst The maximum burst of back-to-back packets allowed in this class. Default is 16 but the default value is automatically reduced to 4 when the class bandwidth is small (about less than 1Mbps). -.It Sy minburst -The minimum burst is used to obtain the steady state burst size. It's -the parameter to help compute offtime for the class. Offtime is the -amount of time a class is to wait between packets. Default is 2. -.It Sy maxdelay +.It Cm minburst +The minimum burst is used to obtain the steady state burst size. +It's the parameter to help compute offtime for the class. +Offtime is the amount of time a class is to wait between packets. +Default is 2. +.It Cm maxdelay The maxdelay is specified in millisecond and used to obtain the max queue size of the class. If not specified, the default max queue size (30 packets) is used. -.It Sy packetsize +.It Cm packetsize The average packet size in bytes to be used in CBQ over-/under-limit -computations. Default value is MTU of the interface. -.It Sy maxpacketsize -The maxium packet size in bytes for the class. +computations. +Default value is MTU of the interface. +.It Cm maxpacketsize +The maximum packet size in bytes for the class. Default value is MTU of the interface. -.It Sy red +.It Cm red enables RED on this class queue. -.It Sy rio +.It Cm rio enables RIO on this class queue. -.It Sy ecn +.It Cm ecn enables RED/ECN on this class queue. -.It Sy flowvalve +.It Cm flowvalve enables RED/flow-valve (a.k.a. red-penalty-box) on this class queue. -.It Sy cleardscp +.It Cm cleardscp clears diffserv codepoint in the IP header. .El -.Pp -.Sh HFSC Commands +.Ss HFSC Commands HFSC (Hierarchical Fair Service Curve) supports both link-sharing and -guaranteed real-time services. H-FSC employs a service curve based QoS -model, and its unique feature is an ability to decouple delay and -bandwidth allocation. +guaranteed real-time services. +H-FSC employs a service curve based QoS model, and its unique feature +is an ability to decouple delay and bandwidth allocation. HFSC has 2 independent scheduling mechanisms. Real-time scheduling is used to guarantee the delay and the bandwidth allocation at the same time. Hierarchical link-sharing is used to distribute the excess bandwidth. When dequeueing a packet, HFSC always tries real-time scheduling -first. If no packet is eligible for real-time scheduling, -link-sharing scheduling is performed. +first. +If no packet is eligible for real-time scheduling, link-sharing +scheduling is performed. HFSC does not use class hierarchy for real-time scheduling. .Bl -tag -width interface -offset indent -.It Nm interface +.It Cm interface .Ar if_name .Op Cm bandwidth Ar bps .Op Cm tbrsize Ar bytes @@ -451,28 +463,28 @@ HFSC does not use class hierarchy for real-time scheduling. .El .Pp .Bl -tag -width 8n -offset indent -.It Em if_name +.It Ar if_name specifies the name of a network interface (e.g., fxp0). -.It Sy bandwidth +.It Cm bandwidth specifies the interface bandwidth in bits per second. -.It Sy tbrsize +.It Cm tbrsize specifies the bucket size of a token bucket regulator in bytes. -.It Em sched_type +.It Ar sched_type must be -.Sy hfsc +.Cm hfsc for HFSC. .El .Pp .Bl -tag -width class -offset indent -.It Nm class +.It Cm class .Ar sched_type .Ar if_name .Ar class_name .Ar parent_name .Op Cm admission cntlload|none -.Op Bq Cm sc Em m1 d m2 -.Op Bq Cm rt Em m1 d m2 -.Op Bq Cm ls Em m1 d m2 +.Op Bq Cm sc Ar m1 d m2 +.Op Bq Cm rt Ar m1 d m2 +.Op Bq Cm ls Ar m1 d m2 .Op Cm pshare Ar percent .Op Cm grate Ar bps .Op Cm default @@ -483,93 +495,98 @@ for HFSC. .El .Pp The -.Sy class +.Cm class command specifies a HFSC class. The classes are organized as a hierarchy, and every class, except for the root class, has a parent. .Pp Each HFSC class has 2 service curves, the real-time service curve and -the link-sharing service curve. Service curves are specified by -.Bq Em type m1 d m2 -\&. -.Em type +the link-sharing service curve. +Service curves are specified by +.Bq Ar type Ar m1 d m2 . +.Ar type should be either -.Sy sc, rt +.Cm sc, rt or -.Sy ls . -.Sy sc +.Cm ls . +.Cm sc (service curve) is used to set the same values to both service curves. -.Sy rt +.Cm rt (real-time) is used to specify the real-time service curve. -.Sy ls +.Cm ls (link-sharing) is used to specify the link-sharing service curve. -.Em m1 +.Ar m1 is the slope of the first segment specified in bits-per-second. -.Em d +.Ar d is the x-projection of the intersection point of the 2 segments specified in milli-second. -.Em m2 +.Ar m2 is the slope of the second segment specified in bits-per-second. .Bl -tag -width 8n -offset indent -.It Em sched_type +.It Ar sched_type must be -.Sy hfsc +.Cm hfsc for a HFSC class. -.It Em if_name -Interface name. Must correspond to name in interface specification. -.It Em class_name -Arbitrary name for this class. Must be unique within the class -hierarchy for this interface. The name -.Sy root -is a reserved class name for the root class. The root class for the -interface is automatically created by the -.Sy interface +.It Ar if_name +Interface name. +Must correspond to name in interface specification. +.It Ar class_name +Arbitrary name for this class. +Must be unique within the class hierarchy for this interface. +The name +.Cm root +is a reserved class name for the root class. +The root class for the interface is automatically created by the +.Cm interface command. -.It Em parent_name -The name of the parent class for this class. Keyword -.Sy root -is used when the parent is the root class. Parent class must -have been previously defined. -.It Sy admission +.It Ar parent_name +The name of the parent class for this class. +Keyword +.Cm root +is used when the parent is the root class. +Parent class must have been previously defined. +.It Cm admission The type of admission control and QoS type. -.Sy cntlload -is controlled load service for -.Em RSVP , -otherwise, it should be -.Sy none . +.Cm cntlload +is controlled load service for RSVP, otherwise, it should be +.Cm none . The default is -.Sy none . -.It Sy pshare -Percent of the link share. This specifies a linear link-sharing -service curve as a fraction of the link bandwidth. -It is a short hand of [ls 0 0 (link-bandwidth * percent / 100)]. -.It Sy grate -Guaranteed rate. This specifies a linear real-time service curve. -It is a short hand of [rt 0 0 bps]. -.It Sy default -Specify the default class. When this keyword is present, all packets -that do not match some classification criteria are assigned to this -class. Must be exactly one class on each interface defined as the -default class. -.It Sy qlimit -The maxium queue size in number of packets. +.Cm none . +.It Cm pshare +Percent of the link share. +This specifies a linear link-sharing service curve as a fraction of +the link bandwidth. +It is a short hand of +.Li [ls 0 0 (link-bandwidth * percent / 100)] . +.It Cm grate +Guaranteed rate. +This specifies a linear real-time service curve. +It is a short hand of +.Li [rt 0 0 bps] . +.It Cm default +Specify the default class. +When this keyword is present, all packets that do not match some +classification criteria are assigned to this class. +Must be exactly one class on each interface defined as the default +class. +.It Cm qlimit +The maximum queue size in number of packets. Default value is 50. -.It Sy red +.It Cm red enables RED on this class queue. -.It Sy rio +.It Cm rio enables RIO on this class queue. -.It Sy ecn +.It Cm ecn enables RED/ECN on this class queue. -.It Sy cleardscp +.It Cm cleardscp clears diffserv codepoint in the IP header. .El -.Pp -.Sh PRIQ Commands +.Ss PRIQ Commands PRIQ (Priority Queueing) implements a simple priority-based queueing. A higher priority class is always served first. Up to 16 priorities can be used with PRIQ. .Bl -tag -width interface -offset indent -.It Nm interface +.It Cm interface .Ar if_name .Op Cm bandwidth Ar bps .Op Cm tbrsize Ar bytes @@ -577,20 +594,20 @@ Up to 16 priorities can be used with PRIQ. .El .Pp .Bl -tag -width 8n -offset indent -.It Em if_name +.It Ar if_name specifies the name of a network interface (e.g., fxp0). -.It Sy bandwidth +.It Cm bandwidth specifies the interface bandwidth in bits per second. -.It Sy tbrsize +.It Cm tbrsize specifies the bucket size of a token bucket regulator in bytes. -.It Em sched_type +.It Ar sched_type must be -.Sy priq +.Cm priq for PRIQ. .El .Pp .Bl -tag -width class -offset indent -.It Nm class +.It Cm class .Ar sched_type .Ar if_name .Ar class_name @@ -604,40 +621,45 @@ for PRIQ. .El .Pp .Bl -tag -width 8n -offset indent -.It Em sched_type +.It Ar sched_type must be -.Sy priq +.Cm priq for a PRIQ class. -.It Em if_name -Interface name. Must correspond to name in interface specification. -.It Em class_name -Arbitrary name for this class. Must be unique for this interface. -.It Em parent_name -Parent class must be ``NULL'' for PRIQ. -.It Sy priority +.It Ar if_name +Interface name. +Must correspond to name in interface specification. +.It Ar class_name +Arbitrary name for this class. +Must be unique for this interface. +.It Ar parent_name +Parent class must be +.Dv NULL +for PRIQ. +.It Cm priority High numbers are higher priority. -Max value is 15 and Min value is 0. Default is 0. +Max value is 15 and Min value is 0. +Default is 0. A higher priority class is always served first in PRIQ. Priority must be unique for the interface. -.It Sy default -Specify the default class. When this keyword is present, all packets -that do not match some classification criteria are assigned to this -class. Must be exactly one class on each interface defined as the -default class. -.It Sy qlimit -The maxium queue size in number of packets. +.It Cm default +Specify the default class. +When this keyword is present, all packets that do not match some +classification criteria are assigned to this class. +Must be exactly one class on each interface defined as the default +class. +.It Cm qlimit +The maximum queue size in number of packets. Default value is 50. -.It Sy red +.It Cm red enables RED on this class queue. -.It Sy rio +.It Cm rio enables RIO on this class queue. -.It Sy ecn +.It Cm ecn enables RED/ECN on this class queue. -.It Sy cleardscp +.It Cm cleardscp clears diffserv codepoint in the IP header. .El -.Pp -.Sh WFQ Commands +.Ss WFQ Commands WFQ (Weighted Fair Queueing) implements a weighted-round robin scheduler for a set of queue. A weight can be assigned to each queue to give a @@ -646,7 +668,7 @@ A hash function is used to map a flow to one of a set of queues, and thus, it is possible for two different flows to be mapped into the same queue. .Bl -tag -width interface -offset indent -.It Nm interface +.It Cm interface .Ar if_name .Op Cm bandwidth Ar bps .Op Cm tbrsize Ar bytes @@ -657,39 +679,40 @@ queue. .El .Pp .Bl -tag -width 8n -offset indent -.It Em if_name +.It Cm if_name specifies the name of a network interface (e.g., fxp0). -.It Sy bandwidth +.It Cm bandwidth specifies the interface bandwidth in bits per second. -.It Sy tbrsize +.It Cm tbrsize specifies the bucket size of a token bucket regulator in bytes. -.It Em sched_type +.It Ar sched_type must be -.Sy wfq +.Cm wfq for WFQ. -.It Sy nqueues +.It Cm nqueues The number of queues in WFQ. Default value is 256. -.It Sy qsize -The size of each queue in number of bytes. Default value is 64K bytes. -.It Sy hash +.It Cm qsize +The size of each queue in number of bytes. +Default value is 64K bytes. +.It Cm hash Type of hash policy to select a queue. -.Sy dstaddr +.Cm dstaddr specifies a hashing policy by IP destination address. -.Sy full +.Cm full specifies a hashing policy by IP addresses and ports. -.Sy srcport -specifies a hashing policy by IP source port number. Default is -.Sy dstaddr +.Cm srcport +specifies a hashing policy by IP source port number. +Default is +.Cm dstaddr .El -.Pp -.Sh FIFOQ Commands +.Ss FIFOQ Commands FIFOQ (First-In First-Out Queueing) is a simple tail-drop FIFO queue. FIFOQ is the simplest possible implementation of a queueing discipline in ALTQ, and can be used to compare with other queueing disciplines. FIFOQ can be also used as a template for those who want to write their own queueing disciplines. .Bl -tag -width interface -offset indent -.It Nm interface +.It Cm interface .Ar if_name .Op Cm bandwidth Ar bps .Op Cm tbrsize Ar bytes @@ -698,46 +721,45 @@ own queueing disciplines. .El .Pp .Bl -tag -width 8n -offset indent -.It Em if_name +.It Ar if_name specifies the name of a network interface (e.g., fxp0). -.It Sy bandwidth +.It Cm bandwidth specifies the interface bandwidth in bits per second. -.It Sy tbrsize +.It Cm tbrsize specifies the bucket size of a token bucket regulator in bytes. -.It Em sched_type +.It Ar sched_type must be -.Sy fifoq +.Cm fifoq for FIFOQ. -.It Sy qlimit -The maxium queue size in number of packets. +.It Cm qlimit +The maximum queue size in number of packets. Default value is 50. .El -.Pp -.Sh RED Commands +.Ss RED Commands RED (Random Early Detection) is an implicit congestion notification mechanism that exercises packet dropping or packet marking stochastically according to the average queue length. RED can be viewed as a buffer management mechanism and can be integrated into other packet scheduling schemes. .Bl -tag -width red -offset indent -.It Nm red +.It Cm red .Ar min_th .Ar max_th .Ar inv_pmax .El .Pp The -.Sy red +.Cm red command sets the default RED paramters. -.Em min_th +.Ar min_th and -.Em max_th +.Ar max_th are the minimum and the maximum threshold values. -.Em inv_pmax +.Ar inv_pmax is the inverse (reciprocal) of the maximum drop probability. For example, 10 means the maximum drop probability of 1/10. .Bl -tag -width interface -offset indent -.It Nm interface +.It Cm interface .Ar if_name .Op Cm bandwidth Ar bps .Op Cm tbrsize Ar bytes @@ -753,42 +775,42 @@ For example, 10 means the maximum drop probability of 1/10. .El .Pp .Bl -tag -width 8n -offset indent -.It Em if_name +.It Ar if_name specifies the name of a network interface (e.g., fxp0). -.It Sy bandwidth +.It Cm bandwidth specifies the interface bandwidth in bits per second. -.It Sy tbrsize +.It Cm tbrsize specifies the bucket size of a token bucket regulator in bytes. -.It Em sched_type +.It Ar sched_type must be -.Sy red +.Cm red for RED. -.It Sy qlimit -The maxium queue size in number of packets. +.It Cm qlimit +The maximum queue size in number of packets. Default value is 60. -.It Sy packetsize -The average packet size in number of bytes. This parameter is used to -calibrate the idle period. Default value is 1000. -.It Sy weight +.It Cm packetsize +The average packet size in number of bytes. +This parameter is used to calibrate the idle period. +Default value is 1000. +.It Cm weight The inverse of the weight of EWMA (exponentially weighted moving average). -.It Sy thmin +.It Cm thmin The minimum threshold. -.It Sy thmax +.It Cm thmax The maximum threshold. -.It Sy invpmax +.It Cm invpmax The inverse of the maximum drop probability. -.It Sy ecn +.It Cm ecn enables ECN. -.It Sy flowvalve +.It Cm flowvalve enables flowvalve. .El -.Pp -.Sh RIO Commands +.Ss RIO Commands ALTQ/RIO has 3 drop precedence levels defined for the Assured Forwarding of DiffServ (RFC2597). -Since adaptive flows are likely to stay under -the medium drop precedence level under congestion, the medium drop -precedence would protect adaptive flows from unadaptive flows. +Since adaptive flows are likely to stay under the medium drop +precedence level under congestion, the medium drop precedence would +protect adaptive flows from unadaptive flows. .Pp The original RIO has 2 sets of RED parameters; one for in-profile packets and the other for out-of-profile packets. @@ -804,7 +826,7 @@ capacity allocated for users. This mechanism can be extended to support an arbitrary number of drop precedence levels. ALTQ supports 3 drop precedence levels. .Bl -tag -width rio -offset indent -.It Nm rio +.It Cm rio .Ar low_min_th .Ar low_max_th .Ar low_inv_pmax @@ -817,11 +839,12 @@ precedence levels. ALTQ supports 3 drop precedence levels. .El .Pp The -.Sy rio -command sets the default RIO paramters. The parameters are -RED parameters for 3 (low, medium, high) drop precedence. +.Cm rio +command sets the default RIO paramters. +The parameters are RED parameters for 3 (low, medium, high) drop +precedence. .Bl -tag -width interface -offset indent -.It Nm interface +.It Cm interface .Ar if_name .Op Cm bandwidth Ar bps .Op Cm tbrsize Ar bytes @@ -842,49 +865,49 @@ RED parameters for 3 (low, medium, high) drop precedence. .El .Pp .Bl -tag -width 8n -offset indent -.It Em if_name +.It Ar if_name specifies the name of a network interface (e.g., fxp0). -.It Sy bandwidth +.It Cm bandwidth specifies the interface bandwidth in bits per second. -.It Sy tbrsize +.It Cm tbrsize specifies the bucket size of a token bucket regulator in bytes. -.It Em sched_type +.It Ar sched_type must be -.Sy rio +.Cm rio for RIO. -.It Sy qlimit -The maxium queue size in number of packets. +.It Cm qlimit +The maximum queue size in number of packets. Default value is 60. -.It Sy packetsize -The average packet size in number of bytes. This parameter is used to -calibrate the idle period. Default value is 1000. -.It Sy weight +.It Cm packetsize +The average packet size in number of bytes. +This parameter is used to calibrate the idle period. +Default value is 1000. +.It Cm weight The inverse of the weight of EWMA (exponentially weighted moving average). -.It Sy lo_thmin +.It Cm lo_thmin The minimum threshold for low drop precedence. -.It Sy lo_thmax +.It Cm lo_thmax The maximum threshold for low drop precedence. -.It Sy lo_invpmax +.It Cm lo_invpmax The inverse of the maximum drop probability for low drop precedence. -.It Sy med_thmin +.It Cm med_thmin The minimum threshold for medium drop precedence. -.It Sy med_thmax +.It Cm med_thmax The maximum threshold for medium drop precedence. -.It Sy med_invpmax +.It Cm med_invpmax The inverse of the maximum drop probability for medium drop precedence. -.It Sy hi_thmin +.It Cm hi_thmin The minimum threshold for high drop precedence. -.It Sy hi_thmax +.It Cm hi_thmax The maximum threshold for high drop precedence. -.It Sy hi_invpmax +.It Cm hi_invpmax The inverse of the maximum drop probability for high drop precedence. -.It Sy ecn +.It Cm ecn enables ECN. .El -.Pp -.Sh BLUE Commands +.Ss BLUE Commands .Bl -tag -width interface -offset indent -.It Nm interface +.It Cm interface .Ar if_name .Op Cm bandwidth Ar bps .Op Cm tbrsize Ar bytes @@ -897,35 +920,34 @@ enables ECN. .El .Pp .Bl -tag -width 8n -offset indent -.It Em if_name +.It Ar if_name specifies the name of a network interface (e.g., fxp0). -.It Sy bandwidth +.It Cm bandwidth specifies the interface bandwidth in bits per second. -.It Sy tbrsize +.It Cm tbrsize specifies the bucket size of a token bucket regulator in bytes. -.It Em sched_type +.It Ar sched_type must be -.Sy blue +.Cm blue for BLUE. -.It Sy qlimit +.It Cm qlimit The maximum queue size in number of packets. Default value is 60. -.It Sy packetsize +.It Cm packetsize The average packet size in number of bytes. Default value is 1000. -.It Sy maxpmark +.It Cm maxpmark specifies the precision of marking probability. -.It Sy holdtime +.It Cm holdtime specifies the hold time in usec. -.It Sy ecn +.It Cm ecn enables ECN. .El -.Pp -.Sh CDNR Commands +.Ss CDNR Commands The -.Sy conditioner -command specifies a diffserv traffic conditioner. A traffic -conditioner is not a queueing discipline but a component to meter, -mark or drop incoming packets according to some rules. +.Cm conditioner +command specifies a diffserv traffic conditioner. +A traffic conditioner is not a queueing discipline but a component to +meter, mark or drop incoming packets according to some rules. .Pp As opposed to a queueing discipline, a traffic conditioner handles incoming packets at an input interface. @@ -933,70 +955,72 @@ If no queueing discipline (e.g., CBQ) is used for the interface, a null interface command should be used to specify an input network interface. .Bl -tag -width interface -offset indent -.It Nm interface +.It Cm interface .Ar if_name .Op Cm bandwidth Ar bps .Op Cm tbrsize Ar bytes .El .Pp The -.Sy conditioner +.Cm conditioner command has the following syntax. .Bl -tag -width conditioner -offset indent -.It Nm conditioner +.It Cm conditioner .Ar if_name .Ar cdnr_name .Aq action .El .Pp .Bl -tag -width 10n -offset indent -.It Em if_name +.It Ar if_name Interface name. Must correspond to name in interface specification. -.It Em cdnr_name -Arbitrary name for this conditioner. Must be unique for this -interface. -.It Em action +.It Ar cdnr_name +Arbitrary name for this conditioner. +Must be unique for this interface. +.It Ar action Action of the conditioner. .El .Pp -An action can be a recursively defined action. The following actions -are defined. +An action can be a recursively defined action. +The following actions are defined. .Bl -tag -width pass -offset indent -.It Nm pass +.It Cm pass .Bl -inset -offset indent -.It Sy pass +.It Cm pass allows the packet to go through without any modification to the packet. .El .El .Pp .Bl -tag -width drop -offset indent -.It Nm drop +.It Cm drop .Bl -inset -offset indent -.It Sy drop -rejects the packet. The packet is immediately discarded. +.It Cm drop +rejects the packet. +The packet is immediately discarded. .El .El .Pp .Bl -tag -width mark -offset indent -.It Nm mark +.It Cm mark .Ar value .Bl -inset -offset indent -.It Sy mark -sets the specified value to the ds field in the IP header. Then, the -packet is allowed to go through. +.It Cm mark +sets the specified value to the ds field in the IP header. +Then, the packet is allowed to go through. .El .El .Pp .Bl -tag -width tbmeter -offset indent -.It Nm tbmeter +.It Cm tbmeter .Ar rate depth .Aq in_action .Aq out_action .Pp .Bl -inset -offset indent -.It Sy tbmeter +.It Cm tbmeter is a token bucket meter configured with rate and depth parameters. -Rate is token rate in bits-per-second. Depth is bucket depth in KB. +Rate is token rate in bits-per-second. +Depth is bucket depth in KB. When an incoming packet is in profile (available token is more than the packet size), tbmeter takes in_action. Otherwise, tbmeter takes out_action. @@ -1004,56 +1028,56 @@ Otherwise, tbmeter takes out_action. .El .Pp .Bl -tag -width trtcm -offset indent -.It Nm trtcm +.It Cm trtcm .Ar cmtd_rate cmtd_depth peak_rate peak_depth .Aq green_action .Aq yellow_action .Aq red_action .Op Cm coloraware|colorblind .Bl -inset -offset indent -.It Sy trtcm +.It Cm trtcm is a 2-rate 3 color marker for Assured Forwarding. A trtcm consists of 2 token buckets, one for a committed rate and the other for a peak rate. When an incoming packet is in the committed profile, trtcm takes -green_action. When the packet is out of the committed profile but in -the peak profile, trtcm takes yellow_action. Otherwise, tbtcm takes -red_action. -A trtcm is either color-aware or color-blind. A color-aware trtcm do -not raise the color (ds field value), that is, a yellow packet can be -yellow or red but can not be blue. Default is color-blind. +green_action. +When the packet is out of the committed profile but in the peak +profile, trtcm takes yellow_action. +Otherwise, tbtcm takes red_action. +A trtcm is either color-aware or color-blind. +A color-aware trtcm do not raise the color (ds field value), that is, +a yellow packet can be yellow or red but can not be blue. +Default is color-blind. .El .El .Pp .Bl -tag -width tswtcm -offset indent -.It Nm tswtcm +.It Cm tswtcm .Ar cmtd_rate peak_rate avg_interval .Aq green_action .Aq yellow_action .Aq red_action .Bl -inset -offset indent -.It Sy tswtcm +.It Cm tswtcm is a time sliding window 3 color marker for Assured Forwarding. A tswtcm differs from trtcm in that a tswtcm probabilistically marks packets. A tswtcm consists of 2 rates, one for a committed rate and the other for a peak rate. When an incoming packet is in the committed profile, tswtcm takes -green_action. When the packet is out of the committed profile but in -the peak profile, tswtcm takes yellow_action. Otherwise, tswtcm takes -red_action. +green_action. +When the packet is out of the committed profile but in the peak +profile, tswtcm takes yellow_action. +Otherwise, tswtcm takes red_action. cmtd_rate and peak_rate are specified in bits per second. avg_interval provides the size of time window for averaging incoming -rate, and is specified in milli-second. 500 msec is ok for normal -settings. +rate, and is specified in milli-second. +500 msec is ok for normal settings. .El .El -.Pp .Sh EXAMPLES -.nf - -CBQ Example: - +.Ss CBQ Example +.Bd -literal # # cbq configuration for vx0 (10Mbps ether) # give at least 40% to TCP @@ -1073,9 +1097,9 @@ class cbq vx0 csl_class tcp_class pbandwidth 10 red # sample filter6 command # filter6 vx0 csl_class ::0 0 d000:a:0:123::/64 80 6 - -HFSC Example: - +.Ed +.Ss HFSC Example +.Bd -literal # # hfsc configuration for hierachical sharing # @@ -1108,10 +1132,9 @@ class hfsc pvc0 pitt_other pitt pshare 20 grate 10M filter pvc0 pitt_other 0 0 136.142.0.0 netmask 0xffff0000 0 0 class hfsc pvc0 pitt_cs pitt pshare 20 grate 5M filter pvc0 pitt_cs 0 0 136.142.79.0 netmask 0xffffff00 0 0 - - -PRIQ Example: - +.Ed +.Ss PRIQ Example +.Bd -literal # # priq configuration for fxp0 (100Mbps ether) # icmp: high priority @@ -1125,20 +1148,17 @@ class priq fxp0 high_class NULL priority 2 class priq fxp0 med_class NULL priority 1 filter fxp0 high_class 0 0 0 0 6 class priq fxp0 low_class NULL priority 0 default - - -WFQ Example: - +.Ed +.Ss WFQ Example +.Bd -literal interface pvc0 bandwidth 134000000 wfq - - -FIFOQ Example: - +.Ed +.Ss FIFOQ Example +.Bd -literal interface rl0 bandwidth 10M fifoq - - -Conditioner Example: - +.Ed +.Ss Conditioner Example +.Bd -literal # interface fxp0 # @@ -1164,9 +1184,7 @@ conditioner pvc1 ef_cdnr <tbmeter 6M 64K <mark 0xb8><drop>> # conditioner fxp0 af1x_cdnr <trtcm 3M 32K 10M 64K <mark 0x28><mark 0x30><mark 0x38>> filter fxp0 af1x_cdnr 0 0 192.168.0.178 0 0 - -.fi -.Pp +.Ed .Sh SEE ALSO .Xr altqd 8 .Sh BUGS diff --git a/usr.sbin/altq/altqd/altqd.8 b/usr.sbin/altq/altqd/altqd.8 index 722572cd5df..176b3dea3e8 100644 --- a/usr.sbin/altq/altqd/altqd.8 +++ b/usr.sbin/altq/altqd/altqd.8 @@ -1,5 +1,5 @@ -.\" $OpenBSD: altqd.8,v 1.1 2001/06/27 18:23:17 kjc Exp $ -.\" $KAME: altqd.8,v 1.4 2001/04/09 16:26:28 thorpej Exp $ +.\" $OpenBSD: altqd.8,v 1.2 2001/07/25 10:44:33 kjc Exp $ +.\" $KAME: altqd.8,v 1.5 2001/07/19 11:07:33 kjc Exp $ .\" .\" Copyright (C) 2000 .\" Sony Computer Science Laboratories Inc. All rights reserved. @@ -37,56 +37,53 @@ .Sh DESCRIPTION .Nm is a daemon program that reads a configuration file and then sets up -the ALTQ state of network interfaces. After configuring the ALTQ -state, +the ALTQ state of network interfaces. +After configuring the ALTQ state, .Nm will detach and become a daemon. - +.Pp The signal SIGINT or SIGTERM will shutdown .Nm , and the signal SIGHUP will restart -.Nm -\&. +.Nm . .Pp The following options are available: .Bl -tag -width Fl -offset indent .It Fl f -Specify a configuration file to read instead of the default. The -default file is -.Pa /etc/altq.conf -\&. +Specify a configuration file to read instead of the default. +The default file is +.Pa /etc/altq.conf . .It Fl d Debug mode. .Nm does not detach and goes into the command mode. .It Fl v -Print debugging information. This option implies -.Fl d -\&. +Print debugging information. +This option implies +.Fl d . .It Fl D Dummy mode. .Nm does not issue altq system calls. .El - .Sh COMMANDS When .Fl d option is provided, .Nm goes into the command mode after reading the configuration file and -setting up the ALTQ state. Each command is a single line, starting -with the command verb. +setting up the ALTQ state. +Each command is a single line, starting with the command verb. .Pp The basic commands are as follows: .Bl -tag -width help -offset indent -.It Sy help Em or Sy ? +.It Cm help|? Display a complete list of commands and their syntax. -.It Sy quit +.It Cm quit Exit. -.It Sy altq reload +.It Cm altq Ar reload reload the configuration file and reinitialize ALTQ. -.It Sy altq Em iface_name Op enable|disable +.It Cm altq Ar iface_name Op enable|disable Enables or disables ALTQ on the interface named .Em iface_name . When @@ -94,7 +91,6 @@ When enters the command mode, ALTQ is enabled on all the interfaces listed in the configuration file. .El - .Sh FILES .Pa /etc/altq.conf , .Pa /var/run/altqd.pid |