2 .\" Copyright (C) 2004, 2009 Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH IPQOSCONF 1M "Dec 18, 2008"
8 ipqosconf \- configure the IPQoS facility
12 \fB/usr/sbin/ipqosconf\fR
17 \fB/usr/sbin/ipqosconf\fR \fB-a\fR \fIconf_file\fR [\fB-vs\fR]
22 \fB/usr/sbin/ipqosconf\fR \fB-c\fR
27 \fB/usr/sbin/ipqosconf\fR \fB-f\fR
32 \fB/usr/sbin/ipqosconf\fR \fB-l\fR
37 \fB/usr/sbin/ipqosconf\fR \fB-L\fR
43 The \fBipqosconf\fR utility configures the Quality of Service facility of the
44 Internet Protocol (\fBIP\fR). Only superusers can use this command.
47 Without arguments, \fBipqosconf\fR displays the actual \fBIPQoS\fR
51 Configuration is not preserved across reboot. You must apply the configuration
52 every time that the machine reboots. To apply the configuration early in the
53 boot phase, you can populate the \fB/etc/inet/ipqosinit.conf\fR file, which is
54 then read from the \fBsvc:/network/initial:default\fR service.
58 The following options are supported:
62 \fB\fB-a\fR \fIconf_file\fR\fR
65 Apply the configuration in \fIconf_file\fR. If the \fIconf_file\fR is
66 \fB\(mi\fR, \fBipqosconf\fR reads from standard input.
75 Populate the boot file with the current configuration.
84 Flush the configuration.
93 List the current applied configuration.
102 List the current configuration in verbose mode.
104 In addition to the information that the \fB-l\fR option provides, the \fB-L\fR
105 option provides filters and classes configured through other means than the
106 \fBiqposconf\fR command. This option also provides the full set of filters that
107 were created by \fBipqosconf\fR by representing a multi-homed host in a
117 Log messages to \fBsyslog\fR during an \fB-a\fR operation.
126 Toggle verbose mode during an \fB-a\fR operation.
128 The \fB-v\fR option causes all messages to go to the console in addition to
129 their normal destination. Messages intended to go to \fBsyslog\fR, because the
130 \fB-s\fR flag is set or because it is a log message, still go to \fBsyslog\fR
131 as well as the console.
134 .SH CONFIGURATION FILE
137 The configuration file is composed of a format version and a succession of
138 configuration (action) blocks. There are different configuration blocks for
139 each type of action that is being configured.
143 The first line of the configuration file specifies the format version contained
144 in the configuration file.
147 The following entry specifies the format version:
151 fmt_version \fIx\fR.\fIx\fR
157 where \fIx\fR.\fIx\fR is the format version. \fB1.0\fR is the only supported
159 .SS "Configuration Blocks"
162 Following the format version, are a succession of configuration (action) blocks
163 that are different for each type of action being configured. A configuration
164 block always has the following structure:
175 action_name ::= string
176 module_name ::= ipgpc | dlcosmk | dscpmk | flowacct | tswtclmt |
179 params_clause ::= params {
184 parameters ::= prm_name_value parameters | ""
186 prm_name_value ::= \fIparam_name\fR \fIparam_value\fR
194 The \fIparam_name\fR and the types of \fIparam_value\fR are specific to a given
199 params_stats ::= global_stats boolean
201 cf_clauses ::= class_clause cf_clauses |
202 filter_clause cf_clauses | ""
204 class_clause ::= class {
206 next_action next_action_name
210 class_name ::= string
211 next_action_name ::= string
212 class_stats ::= enable_stats boolean
213 boolean ::= TRUE | FALSE
215 filter_clause ::= filter {
221 filter_name ::= string
228 There must be exactly one configuration block belonging to module \fBipgpc\fR.
229 The action must be named \fBipgpc.classify\fR. All other actions should be
230 reachable from \fBipgpc\fR by way of parameters of type action or the
231 next_action of a class.
234 The set of types that are used for parameters of the different modules are:
242 uint32 ::= 0..4294967296
243 int32 ::= -2147483648..2147483648
244 address ::= <see the description section>
245 ifname ::= <interface name recognized by SIOGLIFINDEX ioctl>
246 enum ::= string | { string_list }
247 boolean ::= TRUE | FALSE
248 integer_array ::= { range_value_list }
250 address ::= ip_address | ip_node_name
251 user ::= uid | username
254 string_list ::= string sl_entrys
255 sl_entrys ::= ',' string sl_entrys | ""
256 range_value_list ::= range_value_entry range_value_entrys
257 range_value_entry ::= range ':' integer_array_value
258 range ::= uint32 '-' uint32
259 integer_array_value ::= string | integer_array_number
260 integer_array_number ::= uint8 | uint32
261 range_value_entrys ::= ';' range_value_entry range_value_entrys | ""
262 ip_node_name ::= string
263 ip_address ::= v4_address | v6_address
264 v4_address ::= v4_ip_address / v4_cidr_mask |
266 v4_cidr_mask ::= 1-32
267 v6_address ::= v6_ip_address / v6_cidr_mask |
269 v6_cidr_mask ::= 1-128
276 METER module tokenmt configuration syntax:
280 red_action_name action
281 yellow_action_name action
282 green_action_name action
283 committed_rate uint32
284 committed_burst uint32
286 <if present this signifies that this will be a two rate meter, not
289 <this is the 'peak' burst size for a two rate meter, but
290 the 'excess' burst size for a single rate meter>
292 color_map integer_array
300 METER module tswtclmt configuration syntax:
304 red_action_name action
305 yellow_action_name action
306 green_action_name action
307 committed_rate uint32
317 MARKER module dscpmk configuration syntax:
323 dscp_detailed_stats boolean
331 MARKER module dlcosmk configuration syntax:
343 CLASSIFIER module ipgpc configuration syntax:
374 ACCOUNTING module flowacct configuration syntax:
393 A string of characters with a matching action definition. The character string
394 can be up to twenty three characters in length. To allow for spaces the string
395 needs to be enclosed in quotes and cannot span lines. Two special actions are
396 pre-defined and can not have an explicit action definition. The two pre-defined
397 actions are \fBcontinue\fR and \fBdrop\fR. continue causes the packet that is
398 passed to it to continue normal processing. \fBdrop\fR causes the packet that
399 is passed to it to be dropped.
408 A machine name or address recognized by \fBgetipnodebyname\fR(3SOCKET). If a
409 machine name is specified, and \fBip_version\fR has been defined, the query is
410 done using that address family. If a machine name is not specified and
411 \fBip_version\fR has not been defined, the query is done using the
412 \fBAI_DEFAULT\fR flag to \fBgetipnodebyname()\fR(\fB\&..AF_INET6..\fR).
413 \fBCIDR\fR address masks following an IP address are allowed. Specify the
414 \fBCIDR\fR address masks as \fB1\fR-\fB32\fR (for \fBv4\fR) or
415 \fB1\fR-\fB128\fR (for \fBv6\fR). \fBCIDR\fR addresses are disallowed for node
425 Either one of the supported values or comma delimited list of support values,
426 enclosed in curly braces.
435 A non-\fINULL\fR, existing interface name recognized by the \fBSIOGLIFINDEX\fR
442 \fB\fIinteger_array\fR\fR
445 A comma delimited set of \fIrange\fR/\fIvalue\fR pairs, enclosed in curly
448 Specify \fIrange\fR in the format \fIx\fR-\fIy\fR, where \fIx\fR and \fIy\fR
449 are integers that denote the range of array indexes to which the value applies.
450 The minimum value for both \fIx\fR and \fIy\fR is \fB0\fR. The maximum value
451 for \fIx\fR is particular to the parameter. Any array indexes not referred to
452 in the set of ranges are left at their previous value.
458 \fB\fImap_index\fR\fR
461 A non-negative integer used as an index into any maps associated with a
462 parameter of this type.
464 The maximum value of this type is dictated by the number of entries in the
465 associated maps. The index starts at \fB0\fR.
474 Either a service name recognized by \fBgetservbyname\fR(3SOCKET) or an integer
484 Either a protocol name recognized by \fBgetprotobyname\fR(3SOCKET) or an
485 integer \fB1\fR-\fB255\fR.
494 A character string. Enclose \fIstring\fR in quotes. \fIstring\fR cannot span
504 Either a valid user ID or username for the system that is being configured.
510 The configuration file can contain the following parameters
517 A value of \fBTRUE\fR or \fBFALSE\fR, indicating whether or not the configured
518 action takes account of the previous packet coloring when classifying.
527 An integer array that defines which values of the \fBdscp\fR field correspond
528 with which colors for when the \fBcolor_aware\fR parameter is set to
535 \fBcommitted_burst\fR
538 The committed burst size in bits.
547 The committed rate in bits per second.
556 The value used to determine the underlying driver level priority applied to the
557 packet which is defined in \fB802.1D\fR.
566 The destination address of the datagram.
575 The value used to build a filter matching only part of the traffic.
577 This parameter is of type \fBenum\fR with valid values of \fBLOCAL_IN\fR (local
578 bound traffic), \fBLOCAL_OUT\fR (local sourced traffic), \fBFWD_IN\fR
579 (forwarded traffic entering the system), and \fBFWD_OUT\fR (forwarded traffic
589 The destination port of the datagram.
595 \fBdscp_detailed_stats\fR
598 A value of \fBTRUE\fR or \fBFALSE\fR that determines whether detailed
599 statistics are switched on for this \fBdscp\fR action.
601 Specify \fBTRUE\fR to switch on or \fBFALSE\fR to switch off.
610 The \fIinteger_array\fR that supplies the values that IP packets with a given
611 \fBdscp\fR value have their dscp re-marked with.
613 The existing value is used to index into the array where the new value is taken
614 from. The array is of size \fB64\fR, meaning valid indexes are \fB0\fR-\fB63\fR
615 and valid values are also \fB0\fR-\fB63\fR.
624 The \fBDS\fR field of the \fBIP\fR datagram header. This is an 8-bit value,
625 with each bit position corresponding with the same one in the header; this
626 enables matches to be done on the CU bits. If you specify this parameter, you
627 must also specify the \fBdsfield_mask\fR parameter.
633 \fB\fBdsfield_mask\fR\fR
636 The mask applied to the \fBdsfield\fR parameter to determine the bits against
637 which to match. This is an 8-bit value, with each bit position corresponding
638 with the same one in the \fBdsfield\fR parameter.
647 A value of \fBTRUE\fR or \fBFALSE\fR to enable or disable the statistic
648 collection for this action.
654 \fBgreen_action_name\fR
657 The action to be executed for packets that are deemed to be green.
666 The name of an interface recognized by the \fBSIOGLIFINDEX\fR ioctl. This
667 parameter is of type \fBifname\fR.
676 This parameter is of type \fBenum\fR and has valid values of \fBV4\fR and
679 If it is set to \fBV4\fR only then only \fBipv4\fRaddresses are requested for a
680 specified hostname. If it is set to \fBV6\fR, only \fBipv6\fR addresses are
681 returned if there are any, otherwise \fBv4\fR mapped \fBv6\fR addresses are
682 returned. If both \fBV4\fR and \fBV6\fR are specified, or if \fBip_version\fR
683 is not specified, then both \fBipv4\fR and \fBipv6\fR addresses are requested
684 for a specified hostname.
693 The maximum number of flow entries present at one time in the \fBflowacct\fR
694 actions in the memory resident table.
703 The action to be executed when the current action is complete.
705 This value can be either the name of an action defined in the configuration
706 file, or one of the two special action types: \fBdrop\fR and \fBcontinue\fR.
715 The peak burst size, for a two rate meter, or excess burst size, for a single
725 The peak rate in bits per second.
734 An integer that is used to order filters. If there are two matching filters
735 that have the same priority value, the one with the lower precedence value is
736 the one matched. This parameter should be used because the order of the filters
737 in a configuration file has no influence on their relative precedence.
746 An integer that represents the relative priority of a filter. If there are two
747 matching filters, the one with the higher priority value is the one matched.
748 Multiple filters can have the same priority.
757 The project ID of the process sending the data. This value is always \fB-1\fR
758 for received traffic.
767 The Upper Layer Protocol against which this entry is matched.
773 \fBred_action_name\fR
776 The action to be executed for packets that are determined to be red.
785 The source address of the datagram.
794 The source port of the datagram.
803 The timeout in milliseconds after which flows are written to the accounting
813 The period in milliseconds at which timed-out flows are checked for.
822 The user ID or username of the process sending the data. This value is always
823 \fB-1\fR for received traffic.
832 The window size in ms.
838 \fByellow_action_name\fR
841 The action to be executed for packets that are determined to be yellow.
850 \fBExample 1 \fRSending All Traffic From eng to the AF 1 Class of Service
853 This example sends all traffic from \fBeng\fR to the \fBAF 1\fR class of
854 service. It is documented in four separate steps:
858 The following step creates a \fBtokenmt\fR action with three outcomes:
873 yellow_action_name markAF12
874 green_action_name markAF11
883 The following step creates two \fBdscpmk\fR actions:
888 #class 1, low drop precedence.
894 dscp_detailed_stats TRUE
899 #class 1, medium drop precedence.
905 dscp_detailed_stats TRUE
916 The following step creates an accounting action:
921 #billing for transmitted class 1 traffic.
939 The following step creates an \fBipgpc\fR action:
944 #traffic from eng sent, traffic from ebay dropped.
978 \fB\fB/etc/inet/ipqosinit.conf\fR\fR
982 Contains the \fBIPQoS\fR configuration loaded at boot time. If this file
983 exists, it is read from the \fBnetwork/initial:default\fR service.
989 \fB\fB/etc/inet/ipqosconf.1.sample\fR\fR
993 Sample configuration file for an application server
999 \fB\fB/etc/inet/ipqosconf.2.sample\fR\fR
1003 Sample configuration file that meters the traffic for a specified application
1009 \fB\fB/etc/inet/ipqosconf.3.sample\fR\fR
1013 Sample configuration file that marks the ethernet headers of web traffic with a
1020 See \fBattributes\fR(5) for descriptions of the following attributes:
1028 ATTRIBUTE TYPE ATTRIBUTE VALUE
1030 Interface Stability Evolving
1036 \fBsyslog\fR(3C), \fBgetipnodebyname\fR(3SOCKET),
1037 \fBgetprotobyname\fR(3SOCKET), \fBgetservbyname\fR(3SOCKET),
1038 \fBattributes\fR(5), \fBdlcosmk\fR(7IPP), \fBdscpmk\fR(7IPP),
1039 \fBflowacct\fR(7IPP), \fBipgpc\fR(7IPP), \fBipqos\fR(7IPP),
1040 \fBtokenmt\fR(7IPP), \fBtswtclmt\fR(7IPP)
1044 \fBipqosconf\fR sends messages to \fBsyslog\fR of facility user, severity
1045 notice when any changes are made to the \fBIPQoS\fR configuration.
1048 Errors that occur during an \fBipqosconf\fR operation send an error message to
1049 the console by default. For the application of a new configuration if the
1050 \fB-s\fR option is set then these messages are sent to \fBsyslog\fR as facility
1051 user, severity error instead. If the \fB-v\fR option is present during an
1052 application then all error and change notificationmessages are sent to the
1053 console as well as their default destination.