You can increase network efficiency by managing how different systems on the network use resources, such as bandwidth. By allocating resource use, you can prioritize systems that perform critical functions in the use of these resources over other systems.
You manage resources by configuring _flows_. A flow and its _attributes_ identify the type of traffic that traverses a specific connection in the network. You create the flow to regulate its use of system resources. Resources are represented as _properties_ of a flow. By specifying values for _flow properties_, you define how those resources are allocated and used.
h5. Before You Begin
Obtain the following information about your network setup:
* The systems that comprise your network and their respective functions
* A ranking of these systems based on which systems will have priority use of resources over others
* How much of the specific resource to allocate to the different systems in the network
h5. Sample Network Configuration
The procedure that follows shows how to configure the efficient use of bandwidth in the network. The procedure is based on the network setup that is shown in the following figure.
!interface-based_rsrcCntrl.gif!
From the figure, the following information is most relevant to the procedure:
* The network has four servers, a proxy server that connects to three internal servers: an application server, a database server, and a backup server.
* The proxy server has two NICs whose IP interfaces have customized names: {{DMZ0}} and {{internal0}}.
* {{DMZ0}} is an "external-looking" interface that connects the network to the Internet.
* {{internal0}} is an "internal-looking" interface that channels traffic between the wider LAN, as well as between the Internet and the three internal servers in the {{10.0.12.0}} subnet.
h5. Steps
Suppose that, after determining the resource needs of the internal servers, you set the following policy:
* Both application and database servers require more bandwidth than the backup server.
* Both application and database servers have higher priority in bandwidth use over the backup server.
To implement this policy, you would perform the following steps:
# {include:root_step}
# *Check the system's link status.*
{code}
# dladm show-link
LINK CLASS MTU STATE OVER
DMZ0 phys 1500 up nge0
internal0 phys 1500 up nge1
{code}
{{DMZ0}} and {{internal0}} have been configured over their associated physical NICs {{nge0}} and {{nge1}}. In turn, IP interfaces are plumbed over the links, as indicated by the links' "up" status.
# *Verify that IP addresses have been assigned to the IP interfaces.*
{code}
ifconfig -a
lo0: flags=201000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
DMZ0: flags=201000843<UP,BROADCAST,RUNNING, MULTICAST,IPv4,CoS> mtu 1500 index 2
inet 10.10.6.5 netmask ff000000 broadcast 10.255.255.255
ether 0:14:4f:94:d0:60
internal0: flags=201000849<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 2
inet 10.10.12.42 netmask ffffff00 broadcast 10.10.10.255
ether 0:10:20:30:40:aa
{code}
# *On {{internal0}}, create flows to isolate traffic that is destined for each internal server.*
To create flows, use the following syntax:
{code}
# flowadm add-flow -l <link> -a [<attribute>=<value>,...] <flow-name>
{code}
where
<_link_> refers to the link for which you are creating a flow.
<_attribute_> refers to an attribute of the flow.
<_value_> is the value of the attribute that you specified.
<_flow-name_> refers to the name of the flow that you created.
Thus, to create flows for the three internal servers, you would issue the following commands:
{code}
# flowadm add-flow -l internal0 -a local_ip=10.10.12.45 app-flow
# flowadm add-flow -l internal0 -a local_ip=10.10.12.46 db-flow
# flowadm add-flow -l internal0 -a local_ip=10.10.12.47 backup-flow
{code}
The flows are named {{app-flow}}, {{db-flow}}, and {{backup-flow}} and are defined by the attribute {{local_ip}}. The unique IP address of each flow separates the flows from each other.
# *Display the flow configurations in the system.*
{code}
# flowadm show-flow
FLOW LINK IPADDR PROTO PORT DSFLD
backup-flow internal0 LCL:10.10.12.47/32 -- -- --
db-flow internal0 LCL:10.10.12.46/32 -- -- --
app-flow internal0 LCL:10.10.12.45/32 -- -- --
{code}
# *Assign values to specific flow properties.*
_Flow properties_ represent resources, such as _maxbw_ for bandwidth and _priority_ for the order of precedence a flow has over other flows. To implement the policy that you defined at the beginning of the procedure, you configure these properties as follows:
{code}
# flowadm setprop -p maxbw=100,priority=high app-flow
# flowadm setprop -p maxbw=100,priority=high db-flow
# flowadm setprop -p maxbw=10,priority=low backup-flow
{code}
In this configuration, processes in the application and database servers have higher priority in bandwidth use because of their functions in the network.
You manage resources by configuring _flows_. A flow and its _attributes_ identify the type of traffic that traverses a specific connection in the network. You create the flow to regulate its use of system resources. Resources are represented as _properties_ of a flow. By specifying values for _flow properties_, you define how those resources are allocated and used.
h5. Before You Begin
Obtain the following information about your network setup:
* The systems that comprise your network and their respective functions
* A ranking of these systems based on which systems will have priority use of resources over others
* How much of the specific resource to allocate to the different systems in the network
h5. Sample Network Configuration
The procedure that follows shows how to configure the efficient use of bandwidth in the network. The procedure is based on the network setup that is shown in the following figure.
!interface-based_rsrcCntrl.gif!
From the figure, the following information is most relevant to the procedure:
* The network has four servers, a proxy server that connects to three internal servers: an application server, a database server, and a backup server.
* The proxy server has two NICs whose IP interfaces have customized names: {{DMZ0}} and {{internal0}}.
* {{DMZ0}} is an "external-looking" interface that connects the network to the Internet.
* {{internal0}} is an "internal-looking" interface that channels traffic between the wider LAN, as well as between the Internet and the three internal servers in the {{10.0.12.0}} subnet.
h5. Steps
Suppose that, after determining the resource needs of the internal servers, you set the following policy:
* Both application and database servers require more bandwidth than the backup server.
* Both application and database servers have higher priority in bandwidth use over the backup server.
To implement this policy, you would perform the following steps:
# {include:root_step}
# *Check the system's link status.*
{code}
# dladm show-link
LINK CLASS MTU STATE OVER
DMZ0 phys 1500 up nge0
internal0 phys 1500 up nge1
{code}
{{DMZ0}} and {{internal0}} have been configured over their associated physical NICs {{nge0}} and {{nge1}}. In turn, IP interfaces are plumbed over the links, as indicated by the links' "up" status.
# *Verify that IP addresses have been assigned to the IP interfaces.*
{code}
ifconfig -a
lo0: flags=201000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
DMZ0: flags=201000843<UP,BROADCAST,RUNNING, MULTICAST,IPv4,CoS> mtu 1500 index 2
inet 10.10.6.5 netmask ff000000 broadcast 10.255.255.255
ether 0:14:4f:94:d0:60
internal0: flags=201000849<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 2
inet 10.10.12.42 netmask ffffff00 broadcast 10.10.10.255
ether 0:10:20:30:40:aa
{code}
# *On {{internal0}}, create flows to isolate traffic that is destined for each internal server.*
To create flows, use the following syntax:
{code}
# flowadm add-flow -l <link> -a [<attribute>=<value>,...] <flow-name>
{code}
where
<_link_> refers to the link for which you are creating a flow.
<_attribute_> refers to an attribute of the flow.
<_value_> is the value of the attribute that you specified.
<_flow-name_> refers to the name of the flow that you created.
Thus, to create flows for the three internal servers, you would issue the following commands:
{code}
# flowadm add-flow -l internal0 -a local_ip=10.10.12.45 app-flow
# flowadm add-flow -l internal0 -a local_ip=10.10.12.46 db-flow
# flowadm add-flow -l internal0 -a local_ip=10.10.12.47 backup-flow
{code}
The flows are named {{app-flow}}, {{db-flow}}, and {{backup-flow}} and are defined by the attribute {{local_ip}}. The unique IP address of each flow separates the flows from each other.
# *Display the flow configurations in the system.*
{code}
# flowadm show-flow
FLOW LINK IPADDR PROTO PORT DSFLD
backup-flow internal0 LCL:10.10.12.47/32 -- -- --
db-flow internal0 LCL:10.10.12.46/32 -- -- --
app-flow internal0 LCL:10.10.12.45/32 -- -- --
{code}
# *Assign values to specific flow properties.*
_Flow properties_ represent resources, such as _maxbw_ for bandwidth and _priority_ for the order of precedence a flow has over other flows. To implement the policy that you defined at the beginning of the procedure, you configure these properties as follows:
{code}
# flowadm setprop -p maxbw=100,priority=high app-flow
# flowadm setprop -p maxbw=100,priority=high db-flow
# flowadm setprop -p maxbw=10,priority=low backup-flow
{code}
In this configuration, processes in the application and database servers have higher priority in bandwidth use because of their functions in the network.