Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ././../../../../../../usr/man/man8/flowadm.8
Real path: /usr/share/man/man8/flowadm.8
Zurück
'\" te .\" Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. .TH flowadm 8 "27 Nov 2017" "Oracle Solaris 11.4" "System Administration Commands" .SH NAME flowadm \- administer bandwidth resource control and priority for a connection, protocols, services, containers, and virtual machines .SH SYNOPSIS .LP .nf \fBflowadm\fR .fi .LP .nf \fBflowadm show-flow\fR [\fB-P\fR] [[\fB-p\fR] \fB-o\fR \fIfield\fR[,...]] [-v] [{\fB-l\fR \fIlink\fR | \fIflow\fR}] .fi .LP .nf flowadm match-flow [-P] [[-p] -o field[,...]] [-v] [-l link] -a attr=value[,...] .fi .LP .nf \fBflowadm add-flow\fR [\fB-t\fR] [\fB-R\fR \fIroot-dir\fR] \fB-l\fR \fIlink\fR \fB-a\fR \fIattr\fR=\fIvalue\fR[,...] [\fB-p\fR \fIprop\fR=\fIvalue\fR[,...]] \fIflow\fR \fBflowadm remove-flow\fR [\fB-t\fR] [\fB-R\fR \fIroot-dir\fR] {\fB-l\fR \fIlink\fR | \fIflow\fR} .fi .LP .nf flowadm show-filter [-P] [[-p] -o <field>,...] [{-l <link> | <flow>}] flowadm match-filter [-P] [[-p] -o <field>,...] [-l <link>] -a <attr>=<value>[,...] flowadm add-filter -t -a <attr>=<value>[,...] <flow> flowadm remove-filter [-t] {<filter> | -a <attr>=<value>[,...] <flow>} .fi .LP .nf \fBflowadm set-flowprop\fR [\fB-t\fR] [\fB-R\fR \fIroot-dir\fR] \fB-p\fR \fIprop\fR=\fIvalue\fR[,...] \fIflow\fR \fBflowadm reset-flowprop\fR [\fB-t\fR] [\fB-R\fR \fIroot-dir\fR] [\fB-p\fR \fIprop\fR[,...]] \fIflow\fR \fBflowadm show-flowprop\fR [\fB-P\fR] [[\fB-c\fR] \fB-o\fR \fIfield\fR[,...]] [\fB-l\fR \fIlink\fR] [\fB-p\fR \fIprop\fR[,...]] [\fIflow\fR] .fi .LP .nf \fBflowadm help\fR [\fIsubcommand-name\fR] .fi .SH DESCRIPTION .sp .LP The \fBflowadm\fR command is used to create, modify, remove, and show networking bandwidth, priority, and associated resources for a type of traffic on a particular link. .sp .LP The \fBflowadm\fR command allows users to manage networking bandwidth resources for a transport, service, or a subnet. The service can be specified as a combination of all or some of the attributes: transport, local port, remote port, local IP address, and remote IP address. The subnet is specified by its IP address and subnet mask. The command can be used on any type of data link, including physical links, virtual NICs, and link aggregations. The \fBflowadm\fR command can not be used on data links that are managed by Open vSwitch. For more information, see \fBdladm\fR(8) man page. .sp .LP A flow is defined as a set of attributes based on Layer 3 and Layer 4 headers, which can be used to identify a protocol, service, a single connection, or a virtual machine. .sp .LP A flow filter is defined as a tuple of L3/L4 attributes. A flow can consist of multiple flow filters, stats, and optional resource control properties. All the tuples must have the same signature (combination of attributes). .sp .LP There are restrictions on valid flow names. The flow names cannot be longer than 95 characters, and they must consist of only alphanumeric (a-z, A-Z, 0-9), underscore ('_'), period ('.'), and hyphen ('-') and must begin with alphabetic characters. .sp .LP The \fBflowadm\fR command can be used to identify a flow without imposing any bandwidth resource control. This would result in better observability for the flow when used along with \fBflowstat\fR(8). .sp .LP Flows can be created, modified, and removed in all of global, non-global, and kernel zones. A zone administrator can create a flow only in their zone, global or non-global. However, a flow created in the global zone can migrate to a non-global zone, as described in the following paragraph. An administrator can modify or remove a flow only from within the zone, global or non-global, in which the flow was created. From the global zone, one can view all flows on a system, within the global and any non-global zones. From a non-global zone, one can view only those flows in that zone. .sp .LP After an administrator creates a flow in the global zone, the data link associated with that flow can be assigned to a non-global zone. In such a case, the associated flow is also assigned to the same non-global zone. When this non-global zone is halted, the data link and its associated flow return to the global zone. .sp .LP Different zone names distinguish flows of the same name. For example, one can have three flows named \fBfastpak\fR, if each \fBfastpak\fR is in a different zone. For example, \fBzone1\fR/\fBfastpak\fR, \fBzone2\fR/\fBfastpak\fR, and \fBzone3\fR/\fBfastpak\fR are all valid zone names. .sp .LP \fBflowadm\fR is implemented as a set of subcommands with corresponding options. Options are described in the context of each subcommand. If \fBflowadm\fR is invoked with no subcommand, then all of the flows configured on the system will be displayed. See \fBEXAMPLES\fR below for more information. .SH SUB-COMMANDS .sp .LP The following subcommands are supported: .sp .ne 2 .mk .na \fB\fBflowadm show-flow\fR [\fB-P\fR] [[\fB-p\fR] \fB-o\fR \fIfield\fR[,...]] [{\fB-l\fR \fIlink\fR | \fIflow\fR}]\fR .ad .br .sp .6 .RS 4n Show flow configuration information either for all flows, all flows on a link, or for the specified flow. Output is in ranking order, that is the first flow in the output is searched first for a given packet and so on. .sp .ne 2 .mk .na \fB\fB-o\fR \fIfield\fR[,...]\fR .ad .br .sp .6 .RS 4n A case-insensitive, comma-separated list of output fields to display. The field name must be one of the fields listed below, or a special value \fBall\fR, to display all fields. For each flow found, the following fields can be displayed: .sp .ne 2 .mk .na \fB\fBflow\fR\fR .ad .br .sp .6 .RS 4n The name of the flow. .RE .sp .ne 2 .mk .na \fB\fBlink\fR\fR .ad .br .sp .6 .RS 4n The name of the link the flow is on. .RE .sp .ne 2 .mk .na \fB\fBproto\fR\fR .ad .br .sp .6 .RS 4n The name of the transport layer protocol to be used. .RE .sp .ne 2 .mk .na \fB\fBladdr\fR\fR .ad .br .sp .6 .RS 4n Local IP address of the flow. If not specified, it will be shown as '--'. .RE .sp .ne 2 .mk .na \fB\fBlport\fR\fR .ad .br .sp .6 .RS 4n Local port of service for flow. .RE .sp .ne 2 .mk .na \fB\fBraddr\fR\fR .ad .br .sp .6 .RS 4n Remote IP address of the flow. If not specified, it will be shown as '--'. .RE .sp .ne 2 .mk .na \fB\fBrport\fR\fR .ad .br .sp .6 .RS 4n Remote port of service for flow. .RE .sp .ne 2 .mk .na \fB\fBdir\fR\fR .ad .br .sp .6 .RS 4n Flow direction. Values are \fBin\fR for inbound only, \fBout\fR for outbound only, or \fBbi\fR for bidirectional. .RE .sp .ne 2 .mk .na \fB\fBdsfield\fR\fR .ad .br .sp .6 .RS 4n Differentiated services value for flow and mask used with DSFLD value to state the bits of interest in the differentiated services field of the IP header. This field is not shown in the default \fBflowadm\fR output, but can be displayed with: .sp .in +2 .nf flowadm show-flow -o all or flowadm show-flow -o flow,dsfld .fi .in -2 .sp .RE .sp .ne 2 .mk .na \fB\fBipaddr\fR\fR .ad .br .sp .6 .RS 4n IP address of the flow. This can be either local or remote depending on how the flow was defined. This field is deprecated and exists only for backward compatibility. Therefore it will not be shown by default, unless specified with \fB-o\fR option. The users are encouraged to use \fBladdr\fR and \fBraddr\fR instead. .RE .sp .ne 2 .mk .na \fB\fBpid\fR\fR .ad .br .sp .6 .RS 4n Specifies the PID of the process that created this flow. This field is meaningful only for the system generated flows and will show '--' for user generated flows. .sp A system generated flow has the prefix "<id>.sys.sock" and is a temporary flow that gets created by applications that call \fBsetsockopt()\fR with the \fBSO_FLOW_SLA\fR option. .RE .RE .sp .ne 2 .mk .na \fB\fB-p\fR, \fB--parseable\fR\fR .ad .br .sp .6 .RS 4n Display using a stable machine-parseable format. .RE .sp .ne 2 .mk .na \fB\fB-P\fR, \fB--persistent\fR\fR .ad .br .sp .6 .RS 4n Display persistent flow property information. .RE .sp .ne 2 .mk .na \fB\fB-l\fR \fIlink\fR, \fB--link\fR=\fIlink\fR | \fIflow\fR\fR .ad .br .sp .6 .RS 4n Display information for all flows on the named link or information for the named flow. .RE .sp .ne 2 .mk .na \fB\fB-v\fR\fR .ad .br .sp .6 .RS 4n Display output for the flow and all its flow filters. Not compatible with the \fB-p\fR option. .RE .RE .sp .ne 2 .mk .na \fB\fBflowadm match-flow\fR [\fB-P\fR] [[\fB-p\fR] \fB-o\fR \fIfield\fR[,...]] [\fB-l\fR \fIlink\fR] \fB-a\fR \fIattr\fR=\fIvalue\fR[,...]\fR .ad .br .sp .6 .RS 4n Find a flow(s) that is a potential match for the specified list of flow attributes among the existing flows on the system. In case multiple flows are returned, they are shown in the order they are looked up for flow classification of a packet. .sp .ne 2 .mk .na \fB\fB-p\fR, \fB--parseable\fR\fR .ad .br .sp .6 .RS 4n Display using a stable machine-parseable format. .RE .sp .ne 2 .mk .na \fB\fB-P\fR, \fB--persistent\fR\fR .ad .br .sp .6 .RS 4n Display persistent flow property information. .RE .sp .ne 2 .mk .na \fB\fB-o\fR \fIfield\fR[,...]\fR .ad .br .sp .6 .RS 4n See \fB-o\fR field description for show-flow subcommand above. .RE .sp .ne 2 .mk .na \fB\fB-l\fR \fIlink\fR, \fB--link\fR=\fIlink\fR\fR .ad .br .sp .6 .RS 4n Limit the match to flows on the specified link. If no link is specified, flows on all the links are used. .RE .sp .ne 2 .mk .na \fB\fB-a\fR \fIattr\fR=\fIvalue\fR[,...], -\fB-attr\fR=\fIvalue\fR\fR .ad .br .sp .6 .RS 4n A comma-separated list of attributes that is used as the key for the lookup for a matching flow(s). .RE .sp .ne 2 .mk .na \fB\fB-v\fR\fR .ad .br .sp .6 .RS 4n Displays output for the matching flow and all its matching flow filters. Not compatible with the \fB-p\fR option. .RE .RE .sp .ne 2 .mk .na \fB\fBflowadm add-flow\fR [\fB-t\fR] [\fB-R\fR \fIroot-dir\fR] \fB-l\fR \fIlink\fR \fB-a\fR \fIattr\fR=\fIvalue\fR[,...] \fB-p\fR \fIprop\fR=\fIvalue\fR[,...] \fIflow\fR\fR .ad .br .sp .6 .RS 4n Adds a flow to the system. The flow is identified by its flow attributes and properties. .sp As part of identifying a particular flow, its bandwidth resource and priority can be limited. .sp .ne 2 .mk .na \fB\fB-t\fR, \fB--temporary\fR\fR .ad .br .sp .6 .RS 4n The changes are temporary and will not persist across reboots. Persistence is the default. .RE .sp .ne 2 .mk .na \fB\fB-R\fR \fIroot-dir\fR, \fB--root-dir\fR=\fIroot-dir\fR\fR .ad .br .sp .6 .RS 4n Specifies an alternate root directory where \fBflowadm\fR should apply persistent creation. .RE .sp .ne 2 .mk .na \fB\fB-l\fR \fIlink\fR, \fB--link\fR=\fIlink\fR\fR .ad .br .sp .6 .RS 4n Specify the link to which the flow will be added. .RE .sp .ne 2 .mk .na \fB\fB-a\fR \fIattr\fR=\fIvalue\fR[,...], \fB--attr\fR=\fIvalue\fR\fR .ad .br .sp .6 .RS 4n A comma-separated list of attributes to be set to the specified values. .RE .sp .ne 2 .mk .na \fB\fB-p\fR \fIprop\fR=\fIvalue\fR[,...], \fB--prop\fR=\fIvalue\fR[,...]\fR .ad .br .sp .6 .RS 4n A comma-separated list of properties to be set to the specified values. .RE .RE .sp .ne 2 .mk .na \fB\fBflowadm remove-flow\fR [\fB-t\fR] [\fB-R\fR \fIroot-dir\fR] {\fB-l\fR \fIlink\fR | \fIflow\fR}\fR .ad .br .sp .6 .RS 4n Remove an existing flow identified by its link or name. .sp .ne 2 .mk .na \fB\fB-t\fR, \fB--temporary\fR\fR .ad .br .sp .6 .RS 4n The changes are temporary and will not persist across reboots. Persistence is the default. .RE .sp .ne 2 .mk .na \fB\fB-R\fR \fIroot-dir\fR, \fB--root-dir\fR=\fIroot-dir\fR\fR .ad .br .sp .6 .RS 4n Specifies an alternate root directory where \fBflowadm\fR should apply persistent removal. .RE .sp .ne 2 .mk .na \fB\fB-l\fR \fIlink\fR | \fIflow\fR, \fB--link\fR=\fIlink\fR | \fIflow\fR\fR .ad .br .sp .6 .RS 4n If a link is specified, remove all flows from that link. If a single flow is specified, remove only that flow. .RE .RE .sp .ne 2 .mk .na \fB\fBflowadm show-filter\fR [\fB-P\fR] [[\fB-p\fR] \fB-o\fR <\fIfield\fR>,...] [{\fB-l\fR <\fIlink\fR> | <\fIflow\fR>}]\fR .ad .br .sp .6 .RS 4n Show flow filter information either for all flows, all flows on a link, or for the specified flow. The output is in ranking order, that is, the first flow filter in the output is searched first for a given packet and so on. .sp .ne 2 .mk .na \fB\fB-o\fR \fIfield\fR[,...]\fR .ad .br .sp .6 .RS 4n See the section for \fBshow-flow\fR. .RE .sp .ne 2 .mk .na \fB\fB-p\fR, \fB--parseable\fR\fR .ad .br .sp .6 .RS 4n Display using a stable machine-parseable format. .RE .sp .ne 2 .mk .na \fB\fB-l\fR \fIlink\fR, \fB--link\fR=\fIlink\fR | \fIflow\fR\fR .ad .br .sp .6 .RS 4n Display information for all flow filters on the named link or the named flow. .RE .RE .sp .ne 2 .mk .na \fB\fBflowadm match-filter\fR [\fB-P\fR] [[\fB-p\fR] \fB-o\fR <\fIfield\fR>,...] [\fB-l\fR <\fIlink\fR>]\fR .ad .br .sp .6 .RS 4n Find a filter(s) that is a potential match for the specified list of flow attributes among the existing flows on the system. In case multiple flow filters are returned, they are shown in the order they are looked up for flow classification of a packet. .sp .ne 2 .mk .na \fB\fB-p\fR, \fB--parseable\fR\fR .ad .br .sp .6 .RS 4n Display using a stable machine-parseable format. .RE .sp .ne 2 .mk .na \fB\fB-P\fR, \fB--persistent\fR\fR .ad .br .sp .6 .RS 4n Display persistent flow property information. .RE .sp .ne 2 .mk .na \fB\fB-o\fR \fIfield\fR[,...]\fR .ad .br .sp .6 .RS 4n See the \fB-o\fR \fIfield\fR description for the \fBshow-flow\fR subcommand above. .RE .sp .ne 2 .mk .na \fB\fB-l\fR \fIlink\fR, \fB--link\fR=\fIlink\fR\fR .ad .br .sp .6 .RS 4n Limit the match to flows on the specified link. If no link is specified, flows on all the links are used. .RE .sp .ne 2 .mk .na \fB\fB-a\fR attr=value[,...], \fB--attr\fR=value\fR .ad .br .sp .6 .RS 4n A comma-separated list of attributes that is used as the key for the lookup for a matching filter(s). .RE .RE .sp .ne 2 .mk .na \fB\fBflowadm add-filter\fR \fB-t\fR \fB-a\fR <\fIattr\fR>=<\fIvalue\fR>[,...] <\fIflow\fR>\fR .ad .br .sp .6 .RS 4n Add a filter to the specified flow. All the filters for a flow must have the same signature. Currently, only temporary flow filters can be added, and the \fB-t\fR option is required. .sp .ne 2 .mk .na \fB\fB-a\fR \fIattr\fR=\fIvalue\fR[,...], \fB--attr\fR=\fIvalue\fR\fR .ad .br .sp .6 .RS 4n A comma-separated list of attributes to be set to the specified values. .RE .RE .sp .ne 2 .mk .na \fB\fBflowadm remove-filter\fR {<\fIfilter\fR> | \fB-a\fR <\fIattr\fR>=<\fIvalue\fR>[,...] <\fIflow\fR>}\fR .ad .br .sp .6 .RS 4n Remove the filter from the specified flow. A filter can be removed by specifying either the filter name or its attributes and the flow name. .sp Note that the name of a filter is generated by the system, and its format is a private interface. The only guarantee is that the filter name from \fBshow-filter\fR output will work with \fBremove-filter\fR. .sp .ne 2 .mk .na \fB\fB-a\fR attr=value[,...], \fB--attr\fR=value\fR .ad .br .sp .6 .RS 4n A comma-separated list of attributes to be set to the specified values. .RE .RE .sp .ne 2 .mk .na \fB\fBflowadm set-flowprop\fR [\fB-t\fR] [\fB-R\fR \fIroot-dir\fR] \fB-p\fR \fIprop\fR=\fIvalue\fR[,...] \fIflow\fR\fR .ad .br .sp .6 .RS 4n Set values of one or more properties on the flow specified by name. The complete list of properties can be retrieved using the \fBshow-flow\fR subcommand. .sp .ne 2 .mk .na \fB\fB-t\fR, \fB--temporary\fR\fR .ad .br .sp .6 .RS 4n The changes are temporary and will not persist across reboots. Persistence is the default. .RE .sp .ne 2 .mk .na \fB\fB-R\fR \fIroot-dir\fR, \fB--root-dir\fR=\fIroot-dir\fR\fR .ad .br .sp .6 .RS 4n Specifies an alternate root directory where \fBflowadm\fR should apply persistent setting of properties. .RE .sp .ne 2 .mk .na \fB\fB-p\fR \fIprop\fR=\fIvalue\fR[,...], \fB--prop\fR=\fIvalue\fR[,...]\fR .ad .br .sp .6 .RS 4n A comma-separated list of properties to be set to the specified values. .RE .RE .sp .ne 2 .mk .na \fB\fBflowadm reset-flowprop\fR [\fB-t\fR] [\fB-R\fR \fIroot-dir\fR] [\fB-p\fR \fIprop\fR=\fIvalue\fR[,...]] \fIflow\fR\fR .ad .br .sp .6 .RS 4n Resets one or more properties to their default values on the specified flow. If no properties are specified, all properties are reset. See the \fBshow-flowprop\fR subcommand for a description of properties, which includes their default values. .sp .ne 2 .mk .na \fB\fB-t\fR, \fB--temporary\fR\fR .ad .br .sp .6 .RS 4n Specifies that the resets are temporary. Temporary resets last until the next reboot. .RE .sp .ne 2 .mk .na \fB\fB-R\fR \fIroot-dir\fR, \fB--root-dir\fR=\fIroot-dir\fR\fR .ad .br .sp .6 .RS 4n Specifies an alternate root directory where \fBflowadm\fR should apply persistent setting of properties. .RE .sp .ne 2 .mk .na \fB\fB-p\fR \fIprop\fR[,...]\fR .ad .br .sp .6 .RS 4n A comma-separated list of properties to be reset. .RE .RE .sp .ne 2 .mk .na \fB\fBflowadm show-flowprop\fR [\fB-cP\fR] [\fB-l\fR \fIlink\fR] [\fB-p\fR \fIprop\fR[,...]] [\fIflow\fR]\fR .ad .br .sp .6 .RS 4n Show the current or persistent values of one or more properties, either for all flows, flows on a specified link, or for the specified flow. .sp By default, current values are shown. If no properties are specified, all available flow properties are displayed. For each property, the following fields are displayed: .sp .sp .ne 2 .mk .na \fB\fBFLOW\fR\fR .ad .br .sp .6 .RS 4n The name of the flow. .RE .sp .ne 2 .mk .na \fB\fBPROPERTY\fR\fR .ad .br .sp .6 .RS 4n The name of the property. .RE .sp .ne 2 .mk .na \fB\fBPERM\fR\fR .ad .br .sp .6 .RS 4n The permission of the property. 'r-' for read-only property and 'rw' for the property that can be both read and written. .RE .sp .ne 2 .mk .na \fB\fBVALUE\fR\fR .ad .br .sp .6 .RS 4n The current (or persistent) property value. The value is shown as \fB--\fR (double hyphen), if it is not set, and \fB?\fR (question mark), if the value is unknown. Persistent values that are not set or have been reset will be shown as \fB--\fR and will use the system \fBDEFAULT\fR value (if any). .RE .sp .ne 2 .mk .na \fB\fBEFFECTIVE\fR\fR .ad .br .sp .6 .RS 4n Effective value of property set by the system. The value is shown as -- (double hyphen), if it is not set, and ? (question mark), if the value is unknown. .RE .sp .ne 2 .mk .na \fB\fBDEFAULT\fR\fR .ad .br .sp .6 .RS 4n The default value of the property. If the property has no default value, \fB--\fR (double hyphen), is shown. .RE .sp .ne 2 .mk .na \fB\fBPOSSIBLE\fR\fR .ad .br .sp .6 .RS 4n A comma-separated list of the values the property can have. If the values span a numeric range, the minimum and maximum values might be shown as shorthand. If the possible values are unknown or unbounded, \fB--\fR (double hyphen), is shown. .RE Flow properties are documented in the "Flow Properties" section, below. .sp .ne 2 .mk .na \fB\fB-c\fR, \fB--parseable\fR\fR .ad .br .sp .6 .RS 4n Display using a stable machine-parseable format. .RE .sp .ne 2 .mk .na \fB\fB-P\fR, \fB--persistent\fR\fR .ad .br .sp .6 .RS 4n Display persistent flow property information. .RE .sp .ne 2 .mk .na \fB\fB-p\fR \fIprop\fR[,...], \fB--prop\fR=\fIprop\fR[,...]\fR .ad .br .sp .6 .RS 4n A comma-separated list of properties to show. .RE .RE .sp .ne 2 .mk .na \fB\fBflowadm help\fR [\fIsubcommand-name\fR]\fR .ad .br .sp .6 .RS 4n Displays all the supported \fBflowadm\fR subcommands or usage for the given subcommand. If you display help for a specific subcommand, the command syntax is displayed, along with an example. Using \fBflowadm help\fR without any argument displays all the subcommands. .RE .SS "Flow Attributes" .sp .LP The flow operand that identifies a flow in a \fBflowadm\fR command is a comma-separated list of one or more keyword, value pairs from the list below. .sp .ne 2 .mk .na \fB\fBlocal_ip\fR[\fB/\fR\fIprefix_len\fR]\fR .ad .br .sp .6 .RS 4n Identifies a network flow by the local IP address. \fIvalue\fR must be a IPv4 address in dotted-decimal notation or an IPv6 address in colon-separated notation. \fIprefix_len\fR is optional. .sp If \fIprefix_len\fR is specified, it describes the netmask for a subnet address, following the same notation convention of \fBifconfig\fR(8) and \fBroute\fR(8) addresses. If unspecified, the given IP address will be considered as a host address for which the default prefix length for a IPv4 address is \fB/32\fR and for IPv6 is \fB/128\fR. .RE .sp .ne 2 .mk .na \fB\fBremote_ip\fR[\fB/\fR\fIprefix_len\fR]\fR .ad .br .sp .6 .RS 4n Identifies a network flow by the remote IP address. The syntax is the same as \fBlocal_ip\fR attributes .RE .sp .ne 2 .mk .na \fB\fBtransport\fR={\fBtcp\fR|\fBudp\fR|\fBsctp\fR|\fBicmp\fR|\fBicmpv6\fR}\fR .ad .br .sp .6 .RS 4n Identifies a layer 4 protocol to be used. It is typically used in combination with \fBlocal_port\fR or \fBremote_port\fR to identify the local or remote service that needs special attention. .RE .sp .ne 2 .mk .na \fB\fBlocal_port\fR\fR .ad .br .sp .6 .RS 4n Identifies a service specified by the local port. .RE .sp .ne 2 .mk .na \fB\fBremote_port\fR\fR .ad .br .sp .6 .RS 4n Identifies a service specified by the remote port. .RE .sp .ne 2 .mk .na \fB\fBdirection\fR={\fBin\fR|\fBout\fR|\fBbi\fR}\fR .ad .br .sp .6 .RS 4n Identifies the flow direction as inbound only, or outbound only, or bidirectional. A flow is treated as bidirectional if the attributes are not specified. .RE .sp .ne 2 .mk .na \fB\fBdsfield\fR[\fB:\fR\fIdsfield_mask\fR]\fR .ad .br .sp .6 .RS 4n Identifies the 8-bit differentiated services field (as defined in RFC 2474). .sp The optional \fIdsfield_mask\fR is used to state the bits of interest in the differentiated services field when comparing with the \fBdsfield\fR value. A \fB0\fR in a bit position indicates that the bit value needs to be ignored and a \fB1\fR indicates otherwise. The mask can range from \fB0x01\fR to \fB0xff\fR. If \fIdsfield_mask\fR is not specified, the default mask \fB0xff\fR is used. Both the \fBdsfield\fR value and mask must be in hexadecimal. .RE .sp .LP All combinations of attributes are allowed. This removes the limitation in earlier releases, where only some combinations were allowed. .sp .LP Flows with different combinations of attributes can be created on a link. This removes the limitation in earlier releases, where all the flows on a given link must have the same combination of flow attributes. Note that when flows with different combinations of attributes are created, they can be either mutually exclusive or they can be overlapping (non exclusive). .sp .LP In the latter case, the flows are ranked using the number of attributes specified when creating the flow. Flows with the same number of attributes are ranked based on a system default policy. The \fBflowadm show-flow\fR command's output, lists the set of flows on a given link in the ranking order, that is, the first flow in the output is searched first for a given packet and so on. .sp .LP Note that overlapping of the flows does not imply any nested flows. Each flow is independent and the flow properties like \fBmaxbw\fR and the flow statistics are always limited in scope to one flow. For example, packets classified to a TCP socket level flow with 5 attributes are not further classified to a TCP transport flow with 1 attribute. .SS "Restrictions" .sp .LP There are individual flow restrictions and flow restrictions per zone. .SS "Individual Flow Restrictions" .sp .LP An attribute can be listed only once for each flow. For example, the following command is not valid: .sp .in +2 .nf # \fBflowadm add-flow -l vnic1 -a local_port=80,local_port=8080 httpflow \fR .fi .in -2 .sp .sp .LP \fBtransport\fR and \fBlocal_port\fR or \fBtransport\fR and \fBremote_port\fR: .sp .LP TCP, UDP, or SCTP flows can be specified with a local address, local_port, remote_address and/or remote_port. An ICMP or ICMPv6 flow that specifies a port is not allowed. .sp .LP The following commands are valid: .sp .in +2 .nf # \fBflowadm add-flow -l e1000g0 -a transport=udp udpflow\fR # \fBflowadm add-flow -l e1000g0 -a transport=tcp,local_port=80 \e udp80flow\fR .fi .in -2 .sp .sp .LP The following commands is not valid: .sp .in +2 .nf # \fBflowadm add-flow -l e1000g0 -a transport=icmpv6,remote_port=16 \e flow16\fR .fi .in -2 .sp .SS "Flow Restrictions Per Zone" .sp .LP Within a zone, no two flows can have the same name. After adding a flow with the link specified, the link will not be required for display, modification, or deletion of the flow. .SS "Flow Properties" .sp .LP The following flow properties are supported. Note that the ability to set a given property to a given value depends on the driver and hardware. .sp .ne 2 .mk .na \fB\fBmaxbw\fR\fR .ad .br .sp .6 .RS 4n Sets the full duplex bandwidth for the flow. The bandwidth is specified as an integer with one of the scale suffixes(\fBK\fR, \fBM\fR, or \fBG\fR for Kbps, Mbps, and Gbps). If no units are specified, the input value will be read as Mbps. The default is no bandwidth limit. .RE .sp .ne 2 .mk .na \fB\fBpriority\fR\fR .ad .br .sp .6 .RS 4n Sets the priority of the flow. Priority values can take one of 'high', 'medium' and 'low'. The default value of priority is 'medium'. .sp Setting the token to 'high' on a flow has the effect that packets classified to that flow are processed ahead of packets from normal flows on the same link. Also, the flow is offloaded to the NIC if the NIC has the flow offload capability. A high priority flow may offer a better latency depending on the availability of system resources. .RE .sp .ne 2 .mk .na \fB\fBbw-share\fR\fR .ad .br .sp .6 .RS 4n Bandwidth share for a flow is the minimum share of the bandwidth the flow will get when there is competition from other flows on the same data link. Note that the bandwidth is allocated among all the active flows. The amount of allocation is proportional to their share. For example, .sp .sp .in +2 .nf # \fBflowadm set-flowprop -p bw-share=40 flow1\fR # \fBflowadm set-flowprop -p bw-share=10 flow2\fR .fi .in -2 .sp Assuming a 1Gbps link, and assuming these two flows, \fBflow1\fR and \fBflow2\fR are the only flows, \fBflow1\fR can have up to 800 Mbps (1Gbps * 40/(40+10)) and \fBflow2\fR can have up to 200 Mbps (1Gbps * 10/(40+10)). .sp The above example assumes both the flows have traffic to consume their share of the bandwidth. However, if \fBflow1\fR consumes only 100Mbps, then \fBflow2\fR can go up to 900 Mbps. The goal with bandwidth shares is no wasted bandwidth when there is a flow that can use the bandwidth while assuring the allocated share when there is competition from other flows. .sp This property is currently supported only on certain NICs. \fBdladm show-linkprop -H -p bw-share\fR command can be used to determine if \fBbw-share\fR property is supported on a given link. The value can range from \fB1\fR to \fB100\fR. The value is a relative share value and does not indicate a percentage of the bandwidth. The effective value is printed as a percentage of the physical link bandwidth. This is the minimum percentage of the bandwidth assured to the flow when there is competition. The effective value can keep changing depending on the other flows on the link. .sp The other flows can be ring-group VNICs, VF-VNIC which has dedicated ring-group hardware resources. For example, datalink has exclusive ring-group \fBvnic1\fR, hardware flows \fBtcpflow1\fR and \fBudpflow1\fR. .sp .in +2 .nf #\fBdladm show-linkprop -pbw-share vnic1\fR LINK PROPERTY PERM VALUE EFFECTIVE DEFAULT POSSIBLE vnic1 bw-share rw 10 33.33% -- 1-100 #\fBflowadm show-flowprop -pbw-share\fR FLOW PROPERTY PERM VALUE EFFECTIVE DEFAULT POSSIBLE tcpflow1 bw-share rw 10 33.33% -- 1-100 udpflow1 bw-share rw 10 33.33% -- 1-100 .fi .in -2 .sp .RE .sp .ne 2 .mk .na \fB\fBdscp\fR\fR .ad .br .sp .6 .RS 4n Sets the specified DSCP value on all outgoing IP packets for the flow. The valid values are 0 to 63. The value must be specified in decimal. For IPV4, set the six DSCP bits in the DSCP field and for IPv6 set the 6 DSCP bits in the traffic class field. The two ECN bits are untouched. This conforms to RFC 2474. .sp Note that any IP_TOS value set by an application using \fBsetsockopt\fR(3C) is overwritten if the '\fBdscp\fR' property is set on the flow and the packet is classified to that flow. .RE .sp .ne 2 .mk .na \fB\fBhw-flow\fR\fR .ad .br .sp .6 .RS 4n Show/specify whether the flow is offloaded to the underlying NIC. The valid values are '\fBauto\fR', '\fBon\fR', and '\fBoff\fR' with default being '\fBauto\fR'. The possible value field shows '\fBon\fR' if the NIC is capable of offloading, and the value '\fBauto\fR' means the system decides. The effective value field shows the current value for the NIC offload. The value '\fBon\fR' means the flow will either be offloaded or \fBflowadm\fR will fail and the value '\fBoff\fR' means the flow will not be offloaded. .sp The \fBhw-flow\fR property can be specified at any time including the flow creation time. It is highly recommended to leave the \fBhw-flow\fR value to '\fBauto\fR' (the default) instead of setting it to '\fBon\fR'. Setting the \fBhw-flow\fR property to '\fBon\fR' will cause failures in some cases like VNIC migration or VNIC fail over on an DLMP aggregation if the destination port does not support flow offload. Note that setting to \fBhw-flow=off\fR is fine in all cases. .sp For underlying link which support exclusive ring-group resources, \fBhw-flow\fR means request underlying link allocate dedicated hardware ring-group resources for the flow. .sp With dedicated ring-group, flow classification can be done by the underlying hardware. This will improve the data path performance and save CPU utilization for flows. In addition to improve resource isolation, flows with dedicated ring-group will benefit from hardware SLA enforcement. .sp \fBpriority\fR and \fBrank\fR are applicable only to shared ring-group flows, so these two properties will not be shown for hardware ring-group flows. .sp Examples: .sp .sp .in +2 .nf #\fBdladm show-linkprop -pring-group net5\fR LINK PROPERTY PERM VALUE EFFECTIVE DEFAULT POSSIBLE net5 ring-group r- exclusive exclusive -- -- .fi .in -2 .sp Certain underlying link can only support specific flow attributes to get hardware network flow. See underlying link driver man page for more details. .sp For example, i40e driver only support the following flow attributes. .sp .in +2 .nf # \fBflowadm add-flow -lnet3 -a transport=udp,local_ip=19.0.0.2,local_port=8888 -phw-flow=on udpflow1\fR # \fBflowadm add-flow -lnet3 -a transport=tcp,local_ip=19.0.0.2,local_port=5000, remote_ip=19.0.0.1,remote_port=5001 -phw-flow=on tcpflow1\fR .fi .in -2 .sp .RE .sp .ne 2 .mk .na \fB\fBrank\fR\fR .ad .br .sp .6 .RS 4n Specify the rank for a flow. Valid values for a \fBrank\fR are 1 to 65535. .sp There is no requirement to set the rank property on all the flows. A flow with the rank property specified is always ahead in lookup order than a flow with no rank specified. .sp A flow with a low rank value is ahead in lookup order than a flow with a high rank value. It is legal to have two flows with the same rank. In this case, any tie is broken by following the default system policy. .RE .SH EXAMPLES .LP \fBExample 1\fR Displaying Flow Configuration .sp .LP The following command invokes flowadm with no arguments, thereby displaying all flows in the system. .sp .in +2 .nf # \fBflowadm\fR FLOW LINK PROTO LADDR LPORT RADDR RPORT DIR tcpflow net0 tcp -- -- -- -- bi udpflow net0 udp -- -- -- -- bi .fi .in -2 .sp .LP \fBExample 2\fR Creating a Policy Around a Mission-Critical Port .sp .LP The command below creates a policy around inbound HTTPS traffic on an HTTPS server so that HTTPS obtains dedicated NIC hardware and kernel TCP/IP resources. The name specified, \fBhttps-1\fR, can be used later to modify or delete the policy. .sp .in +2 .nf # \fBflowadm add-flow -l net0 -a transport=TCP,local_port=443 https-1\fR # \fBflowadm show-flow -l net0\fR FLOW LINK PROTO LADDR LPORT RADDR RPORT DIR https-1 net0 tcp -- 443 -- -- bi .fi .in -2 .sp .LP \fBExample 3\fR Modifying an Existing Policy to Add Bandwidth Resource Control .sp .LP The following command modifies the \fBhttps-1\fR policy from the preceding example. The command adds bandwidth control. .sp .in +2 .nf # \fBflowadm set-flowprop -p maxbw=500M https-1\fR # \fBflowadm show-flow https-1\fR FLOW LINK PROTO LADDR LPORT RADDR RPORT DIR https-1 net0 tcp -- 443 -- -- bi .fi .in -2 .sp .sp .in +2 .nf # \fBflowadm show-flowprop https-1\fR FLOW PROPERTY PERM VALUE DEFAULT POSSIBLE https-1 maxbw rw 500 -- -- https-1 priority rw medium medium low,medium,high https-1 dscp rw -- -- 0-63 https-1 rank rw -- -- 1-65535 https-1 hw-flow r- off -- on,off .fi .in -2 .sp .LP \fBExample 4\fR Limiting the UDP Bandwidth Usage .sp .LP The following command creates a policy for UDP protocol so that it cannot consume more than 100Mbps of available bandwidth. The flow is named \fBlimit-udp-1\fR. .sp .in +2 .nf # flowadm add-flow -l net0 -a transport=UDP -p maxbw=100M \e limit-udp-1 .fi .in -2 .sp .LP \fBExample 5\fR Setting Policy to a Flow Defined by Local Address/Port .sp .LP The following command creates a policy for a TCP flow whose local ip port is \fI192.168.200.102:443\fR. That is, we want to give special treatment to HTTPS packets such that it is delivered with high priority and maximum bandwidth of 800 Mbps. .sp .in +2 .nf # \fBflowadm add-flow -l net0 -a transport=tcp,\e local_ip=192.168.200.102,local_port=443 \e -p priority=high,maxbw=800M my-https\fR .fi .in -2 .sp .sp .in +2 .nf # \fBflowadm show-flow\fR FLOW LINK PROTO LADDR LPORT RADDR RPORT DIR my-https net0 tcp 192.168.200.102 443 -- -- bi .fi .in -2 .sp .sp .in +2 .nf # \fBflowadm show-flowprop\fR FLOW PROPERTY PERM VALUE DEFAULT POSSIBLE my-https maxbw rw 800 -- -- my-https priority rw high medium low,medium,high my-https dscp rw -- -- 0-63 my-https rank rw -- -- 1-65535 my-https hw-flow r- off -- on,off .fi .in -2 .sp .LP \fBExample 6\fR Setting Policy to a Flow Defined by Local/Remote Address/Port .sp .LP The following command creates a policy for a TCP flow whose local ip port is \fI192.168.200.102:443\fR and remote ip port is \fI192.168.200.104:12785\fR. That is, we want to give special treatment to HTTPS packets that are communicating with specific remote ip port. Any packets that belong to this flow will be delivered with high priority. At the same time this flow cannot consume more that 800 Mbps of available bandwidth. .sp .in +2 .nf # \fBflowadm add-flow -l net0 -a transport=tcp,\e local_ip=192.168.200.102,local_port=443,\e remote_ip=192.168.200.104,remote_port=12785 \e -p priority=high,maxbw=800M my-flow\fR .fi .in -2 .sp .sp .in +2 .nf # \fBflowadm show-flow\fR FLOW LINK PROTO LADDR LPORT RADDR RPORT DIR my-flow net0 tcp 192.168.200.102 443 192.168.200.104 12785 bi .fi .in -2 .sp .sp .in +2 .nf # \fBflowadm show-flowprop\fR FLOW PROPERTY PERM VALUE DEFAULT POSSIBLE my-flow maxbw rw 800 -- -- my-flow priority rw high medium low,medium,high my-flow dscp rw -- -- 0-63 my-flow rank rw -- -- 1-65535 my-flow hw-flow r- off -- on,off .fi .in -2 .sp .LP \fBExample 7\fR Setting Policy, Making Use of \fBdsfield\fR Attribute .sp .LP The following command sets a policy for EF PHB (DSCP value of 101110 from RFC 2598) with a bandwidth of 500 Mbps. The \fBdsfield\fR value for this flow will be \fB0x2e\fR (101110) with the \fBdsfield_mask \fR being \fB0xfc\fR (because we want to ignore the 2 least significant bits). .sp .in +2 .nf # \fBflowadm add-flow -l net0 -a dsfield=0x2e:0xfc -p maxbw=500M efphb-flow\fR .fi .in -2 .sp .LP \fBExample 8\fR Viewing Flows in Multiple Zones .sp .LP The following command shows two flows of the same name. The first flow is in the global zone, the second is in the zone \fBzone1\fR. The command is invoked from the global zone, enabling you to view all flows on the system. .sp .in +2 .nf # \fBflowadm\fR FLOW LINK PROTO LADDR LPORT RADDR RPORT DIR tcpflow net0 tcp -- -- -- -- bi zone1/tcpflow zone1/net0 tcp -- -- -- -- bi .fi .in -2 .sp .LP \fBExample 9\fR Getting the Processes That Created a System Flow .sp .LP The following command shows how to get the pid and the process name, given a system flow. .sp .in +2 .nf # \fBflowadm\fR FLOW LINK PROTO LADDR LPORT RADDR RPORT DIR 1.sys.sock net5 tcp 10.1.5.100 51204 10.1.5.101 22 bi .fi .in -2 .sp .sp .in +2 .nf # \fBps `flowadm show-flow -p -o pid 5.sys.sock`\fR PID TT S TIME COMMAND 1581 pts/1 T 0:00 ssh 10.1.5.101 .fi .in -2 .sp .sp .LP The following command shows how to find any flows created by a pid. .sp .in +2 .nf # \fBflowadm show-flow -p -o pid,flow | grep 1581\fR 1581:1.sys.sock .fi .in -2 .sp .LP \fBExample 10\fR Setting bandwidth limit on an outbound only flow .sp .LP The following command shows how to create an outbound flow and set some bandwidth limit on it. .sp .in +2 .nf # \fBflowadm add-flow -l net4 -a remote_ip=10.1.5.101,direction=out backup\fR # \fBflowadm set-flowprop -p maxbw=500M backup\fR .fi .in -2 .sp .SH EXIT STATUS .sp .ne 2 .mk .na \fB\fB0\fR\fR .ad .br .sp .6 .RS 4n All actions were performed successfully. .RE .sp .ne 2 .mk .na \fB\fB>0\fR\fR .ad .br .sp .6 .RS 4n An error occurred. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(7) for descriptions of the following attributes: .sp .TS tab( ) box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Availability system/network _ Interface Stability Committed .TE .sp .SH SEE ALSO .sp .LP \fBifconfig\fR(8), \fBattributes\fR(7), \fBacctadm\fR(8), \fBdladm\fR(8), \fBflowstat\fR(8), \fBifconfig\fR(8), \fBprstat\fR(8), \fBroute\fR(8) .SH NOTES .sp .LP The \fBshow-usage\fR subcommand, present in previous releases of \fBflowadm\fR, has been replaced by the \fBflowstat\fR(8) \fB-h\fR command.