In addition to configuring a flow that consists of one flow filter (tuple of L3/L4 attribute), you can now configure a flow that consist of multiple flow filters. The resource control properties apply only to the flow. You must define all the filters for a flow with the same combination of attributes. You use the flowadm and flowstat commands to manage and display the flow filters. Typically, flow filters are created from an application by using the flow socket APIs. Hence, the CLI support is mainly useful for observability.
To view a flow filter, use any of the following command syntaxes:
# flowadm show-filter flow-name
# flowadm show-flow -v
The following example shows how to display the filters that are added by an application.
$ nc -M flow=webserver 203.0.113.10/27 80 & $ nc -M flow=webserver 203.0.113.10/27 8080 &
Use any of the following commands to view the flow filters:
$ flowadm show-filter webserver FILTER PROTO LADDR LPORT RADDR RPORT DIR _HWFILTER webserver@2 tcp 203.0.113.65/27 38016 203.0.113.10/27 8080 bi off webserver@1 tcp 203.0.113.65/27 36172 203.0.113.10/27 80 bi off
$ flowadm show-flow -v FLOW LINK PROTO LADDR LPORT RADDR RPORT DIR webserver net4 -- -- -- -- -- -- webserver@2 net0 tcp 203.0.113.65/27 38016 203.0.113.10/27 8080 bi webserver@1 net0 tcp 203.0.113.65/27 36172 203.0.113.10/27 80 bi
You can also use the flowstat command to display the statistics of the flow filters.
For example,
$ flowstat -v FLOW IPKTS RBYTES IDROPS OPKTS OBYTES ODROPS webserver 26 1.74K 25 24 1.61K 0 webserver@2 16 1.07K 13 15 1.00K 0 webserver@1 10 674 12 9 602 0
For information about how to add or remove a flow filter, see the flowadm(8) man page. For more information about flow statistics, see the flowstat(8) man page.
You might need to create a flow without any filter, that is, without any attributes for some applications. The application adds the flow filters dynamically and you can configure SLAs for the flow.
This example consists of the creation of a filterless flow and the subsequent setup of a flow property.
$ flowadm add-flow -l net4 webserver $ flowadm FLOW LINK PROTO LADDR LPORT RADDR RPORT DIR webserver net4 -- -- -- -- bi $ flowadm set-flowprop -p max-bw=1G webserver $ flowadm show-flowprop -p max-bw FLOW PROPERTY PERM VALUE EFFECTIVE DEFAULT POSSIBLE ebserver max-bw rw 1000 1000 -- --