|Skip Navigation Links|
|Exit Print View|
|Oracle Solaris Administration: Network Interfaces and Network Virtualization Oracle Solaris 11 Express 11/10|
Flows consist of network packets that are organized according to an attribute. Flows enable you to further allocate network resources. For an overview of flows, see Network Resource Management by Using Flows.
To use flows for managing resources, you perform the following general steps:
Create the flow by basing it on a specific attribute as listed in Network Resource Management by Using Flows.
Customize the flow's use of resources by setting properties that pertain to network resources. Currently, only the bandwidth and priority for processing packets can be set.
Flows can be created on the physical network as well as the virtual network. To configure flows, you use the flowadm command. For detailed technical information, refer to the flowadm(1M) man page.
# dladm show-link
# ipadm show-addr
# flowadm add-flow -l link -a attribute=value[,attribute=value] flow
Refers to one of the following classifications by which you can organize network packets into a flow:
Transport protocol (UDP, TCP, or SCTP)
Port number for an application (for example port 21 for FTP)
DS field attribute, which is used for quality of service in IPv6 packets only. For more information about the DS field, refer to DS Codepoint in System Administration Guide: IP Services.
Refers to the name that you assign to the particular flow.
For more details about flows and flow attributes, see the flowadm(1M) man page.
# flowadm set-flowprop -p property=value[,property=value,...] flow
You can specify the following flow properties that control resources:
The maximum amount of the link's bandwidth that packets identified with this flow can use. The value you set must be within the allowed range of values for the link's bandwidth. To display the possible range of values for a link's bandwidth, check the POSSIBLE field in the output that is generated by the following command:
# dladm show-linkprop -p maxbw link
The priority given to packets in this flow. The possible values are high, medium, and low. The default value is medium.
Note - Currently, only a flow's bandwidth and priority can be customized.
# flowadm show-flow -l link
# flowadm show-flowprop flow
Example 19-8 Managing Resources by Setting Link and Flow Properties
This example combines the steps for allocating network resources to both datalinks and flows. The example is based on the configuration shown in the following figure.
The figure shows two physical hosts that are connected to each other.
Host1 has the following configuration:
It has one non-global zone that functions as a router zone. Two interfaces are assigned to the zone: external0 connects to the Internet while internal0 connects to the internal network including the second host.
The IP interfaces have been renamed to use customized names. Although not required, using customized names on links and interfaces provides advantages when you administer the network. See Assigning Names to Datalinks.
A flow is configured over internal0 to isolate UDP traffic and implement control over how UDP packets use resources. For information about configuring flows, see Managing Resources on Flows.
Host2 has the following configuration:
It has three non-global zones and their respective VNICs. The VNICs are configured over an nxge card that supports dynamic ring allocation. For more information about ring allocation, see Transmit and Receive Rings.
Each zone's network processing load is different. For the purposes of this example, the load for zone1 is heavy, the load for zone2 is medium, and the load for zone3 is light. Resources are assigned to these zones according to their loads.
A separate VNIC is configured as a sofware-based client. For an overview of MAC clients, see MAC Clients and Ring Allocation.
The tasks in this example involve the following:
Creating a flow and configuring flow controls – A flow is created over internal0 to create separate resource controls over UDP packets that are received by Host2.
Configuring network resource properties for the VNICs on Host2 – Based on the processing load on each zone, each zone's VNIC is configured with a set of dedicated rings. A separate VNIC is also configured without dedicated rings as an example of a software-based client.
Note that the example does not include any procedure for zone configuration. To configure zones, refer to Chapter 17, Planning and Configuring Non-Global Zones (Tasks), in System Administration Guide: Oracle Solaris Zones, Oracle Solaris 10 Containers, and Resource Management.
First, view information about links and IP interfaces on Host1.
# dladm show-phys LINK MEDIA STATE SPEED DUPLEX DEVICE internal0 Ethernet up 1000 full nge1 e1000g0 n unknown 0 half e1000g0 e1000g1 n unknown 0 half e1000g1 external0 Ethernet up 1000 full nge0 # dladm show-link LINK CLASS MTU STATE BRIDGE OVER internal0 phys 1500 up -- nge1 e1000g0 phys 1500 unknown -- -- e1000g1 phys 1500 unknown -- -- external0 phys 1500 up -- nge0 # ipadm show-addr ADDROBJ TYPE STATE ADDR lo0/4 static ok 127.0.0.1/8 external0 static ok 10.10.6.5/24 internal0 static ok 10.10.12.42/24
Next, create a flow over internal0 to isolate UDP traffic to Host2. Then, implement resource controls on the flow.
# flowadm add-flow -l external0 -a transport=udp udpflow # flowadm set-flowprop -p maxbw=80,priority=low udpflow
Then, check the information about the created flow.
flowadm show-flow FLOW LINK IPADDR PROTO PORT DFSLD udpflow internal0 -- udp -- -- # flowadm show-flowprop SECURE OUTPUT FOR THIS
On Host2, configure VNICs over nxge0 for each zone. Implement resource controls on each VNIC. Then, assign the VNICs to their respective zones.
# dladm create-vnic -l nxge0 vnic0 # dladm create-vnic -l nxge0 vnic1 # dladm create-vnic -l nxge0 vnic2 # dladm set-prop -p rxrings=4,txrings=4,priority=high vnic0 # dladm set-prop -p rxrings=2,txrings=2,priority=high vnic1 # dladm set-prop -p rxrings=1,txrings=1,priority=low vnic2 # zone1>zonecfg>net> set physical=vnic0 # zone2>zonecfg>net> set physical=vnic1 # zone3>zonecfg>net> set physical=vnic2
Suppose that pool1, a set of CPUs in Host2, was previously configured for use by zone1. Bind that pool of CPUs to also manage network processes for zone1 as follows:
# dladm set-prop -p pool=pool01 vnic0
Finally, create a software-based client that shares rings with nxge0, the primary interface.
dladm create-vnic -p rxrings=sw,txrings=sw -l nxge0 vnic3