This section describes how to configure flows that involves how to create flows and set flow properties to implement resource control.
For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.3.
# dladm show-link
# ipadm show-addr
# flowadm add-flow -l link -a attribute=value[,attribute=value] flow
Refers to the link on which you are configuring the flow.
A single attribute or combination of attributes that organizes network packets into a flow.
The direction attribute for a flow enables the classification of packets and implementing properties for flows on inbound or outbound packets. The direction attribute supports the values in for inbound only, out for outbound only, and bi for bidirectional. The default value for this attribute is bi. See Example 80, Creating a Flow With the direction Attribute.
Refers to the name that you assign to the flow.
For more information about flows and flow attributes, see the flowadm(1M) man page.
# dladm show-linkprop -p maxbw link
Refers to the datalink on which the flow is configured.
The range of values is listed under the POSSIBLE field of the command's output.
# flowadm set-flowprop -p prop=value[,...] flow
For information about the properties that you can set for flows, see Setting Properties for Flows.
# flowadm
# flowadm show-flowprop flow
This command displays maxbw and priority flow properties, plus the read-only hwflow property.
A read-only property that helps you to understand the packet classification in flows. The possible values of this property are on and off. The value of on means that the flow has been offloaded to the NIC and packet classification for the flow is conducted at the hardware level. This property cannot be used with –p option in flowadm add-flow, flowadm set-flowprop, or flowadm reset-flowprop commands.
For an example about configuring flows and setting flow properties, see Use Case: Managing Network Resources by Setting Datalink and Flow Properties.
The following example shows how to create the flows http-in and http-out by specifying the direction attribute.
# flowadm add-flow -l net4 -a transport=tcp,local_port=80,direction=in http-in # flowadm add-flow -l net4 -a transport=tcp,local_port=80,direction=out http-out # flowadm FLOW LINK PROTO LADDR LPORT RADDR RPORT DIR http-out net4 tcp -- 80 -- -- out http-in net4 tcp -- 80 -- -- in # flowadm show-flow -o flow,link,dir FLOW LINK DIR http-out net4 out http-in net4 in
The direction value of bi is incompatible with the values in or out. If you try create a flow with the same attributes, the flow creation fails.
# flowadm add-flow -l net4 -a transport=tcp,local_port=80 http-flow flowadm: add flow failed: a flow with identical attributes but with incompatible direction exists
You can create a flow with a different attribute and it will succeed.
# flowadm add-flow -l net4 -a transport=tcp,local_port=443 ssl-flow # flowadm FLOW LINK PROTO LADDR LPORT RADDR RPORT DIR http-out net4 tcp -- 80 -- -- out http-in net4 tcp -- 80 -- -- in ssl-flow net4 tcp -- 443 -- -- bi