Skip Navigation Links | |
Exit Print View | |
Using Virtual Networks in Oracle Solaris 11.1 Oracle Solaris 11.1 Information Library |
1. Network Virtualization and Resource Management in Oracle Solaris
2. Creating and Administering Virtual Networks in Oracle Solaris
3. Managing Network Resources in Oracle Solaris
Working With Clients, Transmit Rings, and Receive Rings
MAC Clients and Ring Allocation
Datalink Properties for Ring Allocation
Commands for Working With Receive and Transmit Rings
Obtaining and Interpreting Ring Information
Displaying Ring Allocation Capabilities of a Datalink
Displaying Ring Use and Ring Assignments on a Datalink
How to Configure Clients and Allocate Rings
How to Configure a CPU Pool for a Datalink
How to Allocate CPUs to a Link
4. Monitoring Network Traffic and Resource Usage in Oracle Solaris
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.
Using flows for managing resources involves the following general steps:
Creating the flow by basing it on a specific attribute as listed in Network Resource Management by Using Flows.
Customizing the flow's use of resources by setting properties that pertain to network resources. Currently, only the bandwidth for processing packets can be set.
# 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.
Refers to one of the following classifications by which you can organize network packets into a flow:
IP address
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 Managing IP Quality of Service in Oracle Solaris 11.1.
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.
# dladm show-linkprop -p maxbw link
where link is the datalink on which the flow is configured.
The range of values is listed on the POSSIBLE field.
# flowadm set-flowprop -p maxbw=value flow
The value you set must be within the allowed range of values for the link's bandwidth.
Note - Currently, only a flow's bandwidth can be customized.
# flowadm
Note - The flowadm command, if used without any subcommand, provides the same information as the flowadm show-flow command.
# flowadm show-flowprop flow
Example 3-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: net0 connects to the Internet and net1 connects to the internal network including the second host.
udpflow is a flow configured over net0 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 net0 whose card supports dynamic ring allocation. For more information about ring allocation, see Working With Clients, Transmit Rings, 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 moderate, and the load for zone3 is light. Resources are assigned to these zones according to their loads.
A separate VNIC is configured as a software-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 net1 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 for 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 procedures for zone configuration. To configure zones, refer to Chapter 17, Planning and Configuring Non-Global Zones (Tasks), in Oracle Solaris 11.1 Administration: Oracle Solaris Zones, Oracle Solaris 10 Zones, and Resource Management.
First, view information about links and IP interfaces on Host1.
# ipadm NAME CLASS/TYPE STATE UNDER ADDR lo0 loopback ok -- -- lo0/v4 static ok -- 127.0.0.1/8 net0 ip ok -- -- net0/v4 static ok -- 10.10.6.5/24 net1 ip failed ipmp0 -- net1/v4 static ok -- 10.10.12.42/24
Next, create a flow over net1 to isolate UDP traffic to Host2. Then, implement resource controls on the flow.
# flowadm add-flow -l net1 -a transport=udp udpflow # flowadm set-flowprop -p maxbw=80 udpflow
Then, check the information about the created flow.
flowadm FLOW LINK IPADDR PROTO LPORT RPORT DFSLD udpflow net1 -- udp -- -- -- # flowadm show-flowprop FLOW PROPERTY VALUE DEFAULT POSSIBLE udpflow maxbw 80 -- --
On Host2, configure VNICs over net0 for each zone. Implement resource controls on each VNIC. Then, assign the VNICs to their respective zones.
# dladm create-vnic -l net0 vnic0 # dladm create-vnic -l net0 vnic1 # dladm create-vnic -l net0 vnic2 # dladm set-prop -p rxrings=4,txrings=4 vnic0 # dladm set-prop -p rxrings=2,txrings=2 vnic1 # dladm set-prop -p rxrings=1,txrings=1 vnic2 # zonecfg -z zone1 # zonecfg:zone1> add net # zonecfg:zone1:net> set physical=vnic0 # zonecfg:zone1:net> end # zonecfg:zone1> commit # zonecfg:zone1> exit # zoneadm -z zone1 reboot # zonecfg -z zone2 # zonecfg:zone2> add net # zonecfg:zone2:net> set physical=vnic1 # zonecfg:zone2:net> end # zonecfg:zone2> commit # zonecfg:zone2> exit # zoneadm -z zone2 reboot # # zonecfg -z zone3 # zonecfg:zone3> add net # zonecfg:zone3:net> set physical=vnic2 # zonecfg:zone3:net> end # zonecfg:zone3> commit # zonecfg:zone3> exit # zoneadm -z zone3 reboot #
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=pool1 vnic0
Finally, create a software-based client that shares rings with net0, the primary interface.
# dladm create-vnic -p rxrings=sw,txrings=sw -l net0 vnic3