Go to main content

Managing Network Virtualization and Network Resources in Oracle® Solaris 11.3

Exit Print View

Updated: April 2018
 
 

Configuring Flows

This section describes how to configure flows that involves how to create flows and set flow properties to implement resource control.

How to Configure Flows

  1. Become an administrator.

    For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.3.

  2. (Optional) List the available links to determine the link on which you will configure flows.
    # dladm show-link
  3. Verify that IP interfaces over the selected link are properly configured with IP addresses.
    # ipadm show-addr
  4. Create flows according to the attribute you have determined for each flow.
    # flowadm add-flow -l link -a attribute=value[,attribute=value] flow
    link

    Refers to the link on which you are configuring the flow.

    attribute

    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.

    flow

    Refers to the name that you assign to the flow.

    For more information about flows and flow attributes, see the flowadm(1M) man page.

  5. (Optional) Display the possible range of values for the link's bandwidth.
    # dladm show-linkprop -p maxbw link
    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.

  6. Implement resource controls on the flows by setting the appropriate flow properties.
    # flowadm set-flowprop -p prop=value[,...] flow

    For information about the properties that you can set for flows, see Setting Properties for Flows.

  7. (Optional) Display the flows that you have created over the datalink.
    # flowadm

    Note -  The flowadm command, if used without any subcommand, provides the same information as the flowadm show-flow command.
  8. (Optional) Display the property values for a specified flow.
    # flowadm show-flowprop flow

    This command displays maxbw and priority flow properties, plus the read-only hwflow property.

    hwflow

    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.


    Note -  Currently, only the flows that are defined by specifying all the transport protocols, local or remote IP address, and local or remote port can be assigned the on value for hwflow. Also, not all NICs support the hwflow property.

    For an example about configuring flows and setting flow properties, see Use Case: Managing Network Resources by Setting Datalink and Flow Properties.

Example 80  Creating a Flow With the direction Attribute

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