flowacct Records
A flowacct record contains the attributes described in the following table.
Table 37-4 Attributes of a flowacct Record
Attribute Name | Attribute Contents | Type |
---|---|---|
src-addr-address-type | Source address of the originator. address-type is either v4 for IPv4 or v6 for IPv6, as specified in the IPQoS configuration file. | Basic |
dest-addr-address-type | Destination address for the packets. address-type is either v4 for IPv4 or v6 for IPv6, as specified in the IPQoS configuration file. | Basic |
src-port | Source port from which the flow originated. | Basic |
dest-port | Destination port number to which this flow is bound. | Basic |
protocol | Protocol number for the flow. | Basic |
total-packets | Number of packets in the flow. | Basic |
total-bytes | Number of bytes in the flow. | Basic |
action-name | Name of the flowacct action that recorded this flow. | Basic |
creation-time | First time that a packet is seen for the flow by flowacct. | Extended only |
last-seen | Last time that a packet of the flow was seen. | Extended only |
diffserv-field | DSCP in the outgoing packet headers of the flow. | Extended only |
user | Either a UNIX User ID or user name, which is obtained from the application. | Extended only |
projid | Project ID, which is obtained from the application. | Extended only |
Using acctadm with the flowacct Module
You use the acctadm command to create a file in which to store the various flow records that are generated by flowacct. acctadm works in conjunction with the extended accounting facility. For technical information about acctadm, refer to the acctadm(1M) man page.
The flowacct module observes flows and fills the flow table with flow records. flowacct then evaluates its parameters and attributes in the interval that is specified by timer. When a packet is not seen for at least the last_seen plus timeout values, the packet times out. All timed-out entries are deleted from the flow table. These entries are then written to the accounting file each time the interval that is specified in the timer parameter elapses.
To invoke acctadm for use with the flowacct module, use the following syntax:
acctadm -e file-type -f filename flow |
acctadm -e | Invokes acctadm with the -e option. The -e indicates that a resource list follows. |
file-type | Specifies the attributes to be gathered. file-type must be replaced by either basic or extended. For a list of attributes in each file type, refer to Table 37-4. |
-ffile-name | Creates the filefile-name to hold the flow records. |
flow | Indicates that acctadm is to be run with IPQoS. |
IPQoS Configuration File
This section contains full details about the parts of the IPQoS configuration file. The IPQoS boot-time activated policy is stored in the file /etc/inet/ipqosinit.conf. Although you can edit this file, the best practice for a new IPQoS system is to create a configuration file with a different name. Tasks for applying and debugging an IPQoS configuration are in Chapter 34, Creating the IPQoS Configuration File (Tasks).
The syntax of the IPQoS configuration file is shown in Example 37-3. The example uses the following conventions:
computer-style type - Syntactical information that is provided to explain the parts of the configuration file. You do not type any text that appears in computer-style type.
bold type - Literal text that you must type in the IPQoS configuration file. For example, you must always begin the IPQoS configuration file with fmt_version.
italic type - Variable text that you replace with descriptive information about your configuration. For example, you must always replace action-name or module-name with information that pertains to your configuration.
Example 37-3 Syntax of the IPQoS Configuration File
file_format_version ::= fmt_version version action_clause ::= action { name action-name module module-name params-clause | "" cf-clauses } action_name ::= string module_name ::= ipgpc | dlcosmk | dscpmk | tswtclmt | tokenmt | flowacct params_clause ::= params { parameters params-stats | "" } parameters ::= prm-name-value parameters | "" prm_name_value ::= param-name param-value params_stats ::= global-stats boolean cf_clauses ::= class-clause cf-clauses | filter-clause cf-clauses | "" class_clause ::= class { name class-name next_action next-action-name class-stats | "" } class_name ::= string next_action_name ::= string class_stats ::= enable_stats boolean boolean ::= TRUE | FALSE filter_clause ::= filter { name filter-name class class-name parameters } filter_name ::= string |
The remaining text describes each major part of the IPQoS configuration file.
action Statement
You use action statements to invoke the various IPQoS modules that are described in IPQoS Architecture and the Diffserv Model.
When you create the IPQoS configuration file, you must always begin with the version number. Then, you must add the following action statement to invoke the classifier:
fmt_version 1.0 action { module ipgpc name ipgpc.classify } |
Follow the classifier action statement with a params clause or a class clause.
Use the following syntax for all other action statements:
action { name action-name module module-name params-clause | "" cf-clauses } |