Go to main content

Managing Network Virtualization and Network Resources in Oracle® Solaris 11.4

Exit Print View

Updated: November 2020
 
 

Configuring Flows

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

How to Configure Flows

Before You Begin

Ensure that your role has the appropriate rights profile to perform this procedure. See Using Rights Profiles to Perform Network Configuration.

  1. (Optional) List the available links to determine the link on which you will configure flows.
    $ dladm show-link
  2. Verify that IP interfaces over the selected link are properly configured with IP addresses.
    $ ipadm show-addr
  3. 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 82, 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(8) man page.

  4. (Optional) Display the possible range of values for the link's bandwidth.
    $ dladm show-linkprop -p max-bw 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.

  5. 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.

  6. (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.
  7. (Optional) Display the property values for a specified flow.
    $ flowadm show-flowprop flow

    This command displays max-bw, priority, and hw-flow properties.

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

Example 82  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