Manual Chapter : Managing Traffic with Bandwidth Controllers

Applies To:

Show Versions Show Versions

BIG-IP AAM

  • 12.1.4, 12.1.3, 12.1.2, 12.1.1, 12.1.0

BIG-IP APM

  • 12.1.6, 12.1.5, 12.1.4, 12.1.3, 12.1.2, 12.1.1, 12.1.0

BIG-IP Analytics

  • 12.1.6, 12.1.5, 12.1.4, 12.1.3, 12.1.2, 12.1.1, 12.1.0

BIG-IP Link Controller

  • 12.1.6, 12.1.5, 12.1.4, 12.1.3, 12.1.2, 12.1.1, 12.1.0

BIG-IP LTM

  • 12.1.6, 12.1.5, 12.1.4, 12.1.3, 12.1.2, 12.1.1, 12.1.0

BIG-IP AFM

  • 12.1.6, 12.1.5, 12.1.4, 12.1.3, 12.1.2, 12.1.1, 12.1.0

BIG-IP PEM

  • 12.1.6, 12.1.5, 12.1.4, 12.1.3, 12.1.2, 12.1.1, 12.1.0

BIG-IP DNS

  • 12.1.6, 12.1.5, 12.1.4, 12.1.3, 12.1.2, 12.1.1, 12.1.0

BIG-IP ASM

  • 12.1.6, 12.1.5, 12.1.4, 12.1.3, 12.1.2, 12.1.1, 12.1.0
Manual Chapter

Managing Traffic with Bandwidth Controllers

Overview: Bandwidth control management

Fine-grained bandwidth control is essential to service providers, large enterprises, and remote access services (RAS) solutions. Bandwidth controllers on the BIG-IP® system can scale easily, work well in a distributed environment, and are easy to configure for various networks. Depending on the type of policy you configure, you can use bandwidth controllers to apply specified rate enforcement to traffic flows or mark traffic that exceeds limits.

Bandwidth control policies can be static or dynamic. Through the user interface (browser or tmsh command-line utility), when you apply a bandwidth control policy to a virtual server, packet filter, or route domain, you can apply only one policy at a time, and that is a static policy. Using iRules®, you can combine static and dynamic bandwidth control policies up to eight policies on a connection, but only one of the eight policies can be a dynamic policy. A packet is transmitted only when all the attached policies allow it. The system as a whole supports a maximum of 1024 policies.

Important: Applying a bandwidth controller policy to a route domain affects all traffic transmitted by the BIG-IP system to VLANs in the route domain, including health monitors and DNS queries.
Note: Only static bandwidth control policies support SNMP queries.

Bandwidth controllers vs. rate shaping

Bandwidth controller is the updated version of rate shaping on the BIG-IP® system. These features are mutually exclusive. You can configure and use either rate shaping or bandwidth controllers, but not both. Bandwidth controllers include distributed control, subscriber fairness, and support for a maximum rate of 320 Gbps. Rate shaping is hierarchical and supports minimum bandwidth (committed information rate), priority, and flow fairness.

About static bandwidth control policies

A static bandwidth control policy controls the aggregate rate for a group of applications or a network path. It enforces the total amount of bandwidth that can be used, specified as the maximum rate of the resource you are managing. The rate can be the total bandwidth of the BIG-IP® device, or it might be a group of traffic flows.

Task summary for creating a static bandwidth control policy

This procedure includes the steps for assigning a static bandwidth control policy to traffic, using a virtual server. Alternatively, you can assign a static bandwidth control policy to a packet filter or a route domain.

Task list

Creating a static bandwidth control policy

You can create a static bandwidth control policy to limit the bandwidth that traffic uses on the BIG-IP® system.
  1. On the Main tab, click Acceleration > Bandwidth Controllers .
  2. Click Create.
  3. In the Name field, type a name for the bandwidth control policy.
  4. In the Maximum Rate field, type a number and select the unit of measure to indicate the total throughput allowed for the resource you are managing.
    The number must be in the range from 1 Mbps to 320 Gbps. This value is the amount of bandwidth available to all the connections going through this static policy.
  5. Click Finished.
For the bandwidth control policy to take effect, you must apply the policy to traffic, using a virtual server, packet filter, or route domain.

Adding a static bandwidth control policy to a virtual server

Adding a static bandwidth control policy to a virtual server is one way to apply the policy to traffic. Alternatively, you can add the bandwidth control policy to a packet filter or a route domain.
  1. On the Main tab, click Local Traffic > Virtual Servers .
    The Virtual Server List screen opens.
  2. Click the name of the virtual server you want to modify.
  3. From the Configuration list, select Advanced.
  4. From the Bandwidth Controller list, select a bandwidth control policy.
    Only static bandwidth control policies are available in this list.
  5. Click Update to save the changes.
The BIG-IP® system now applies rate enforcement to the traffic intercepted by this virtual server, according to the static bandwidth policy you selected. A static bandwidth policy associated with a virtual server applies only to client-initiated flows, and not to bandwidth for traffic flowing toward the client.

About dynamic bandwidth control policies

You can create dynamic bandwidth control policies to restrict bandwidth usage per subscriber or group of subscribers, per application, per network egress link, or any combination of these. A dynamic bandwidth control policy provides fairness on traffic flows, according to configurable parameters, within an upper bandwidth limit. The BIG-IP® system activates the dynamic bandwidth control policy for each user only when the user participates. When you create a dynamic bandwidth control policy, it acts as a policy in waiting, until the system detects egress traffic that matches the traffic you want to control and creates an instance of the policy. At that moment, the system applies the bandwidth control policy limits, as specified. No bandwidth control occurs until the system detects traffic and creates an instance of the policy. With this feature, an Internet service provider (ISP) can create and revise a single policy that can apply to millions of users.

The BIG-IP system can enforce multiple levels of bandwidth limits through the dynamic policy. For example, a user could be limited by the maximum rate, a per user rate, and a per category rate (such as for an application), all from the same dynamic policy. When the total of the maximum user rate for all the instances exceeds the maximum rate specified in the dynamic policy, the BIG-IP system maintains fairness among all users and spreads the limitation equally among users belonging to a dynamic policy. In addition, you can specify per instance the maximum number of packets per second, which functions as a DoS (Denial of Service) limiter without fair share allocation.

You can also configure a dynamic bandwidth control policy to mark packets that exceed the maximum per-user rate for a specified session. The WAN router typically handles the marked packets. When marking is enabled, enforcement is implicitly disabled. You configure marking by using the IP Marking (TOS/DSCP) or L2 Marking (802.1p) setting. For example, a common use of QoS marking is for Voice over IP (VoIP) traffic. VoIP is usually assigned to the Expedited Forwarding (EF) class by using the DSCP value of 46, thus prioritized according to importance and sensitivity to loss/latency. You can mark packets per policy or per category (within a policy). Category marking supersedes policy marking.

The bandwidth controller is only an enforcer. For a dynamic bandwidth control policy, you also can use a virtual server (through iRules®), Policy Enforcement Manager™, or Access Policy Manager® to identify users and apply dynamic bandwidth control policies to traffic.

About the Maximum User Rate PPS setting

When you specify the value for the Maximum User Rate PPS setting for a dynamic bandwidth control policy, you are specifying the packets per second. Unlike the Maximum Rate Per User, this setting is not applied across a BIG-IP® system. This value depends on the packet sizes (MTU) configured in your network, and you need to tune the value accordingly. Although you can specify a lower value, the lowest recommended value is 256 KBPS. For a maximum user rate lower than 256 KPBS, the packet sizes in the network would need to be smaller than 1514 bytes. The issue is that for large packet sizes and a low maximum user rate, not enough bytes would be recharged for the bucket, and most packets would be dropped. If you are configuring categories, keep in mind that the maximum user rate is shared among the categories associated with a policy.

Task summary for creating a dynamic bandwidth control policy

Before you create a dynamic bandwidth control policy, F5 recommends that you select the Source Address for the CMP Hash setting on the VLAN properties screen for the VLAN that carries the traffic you want to manage. The BIG-IP® system uses source and destination hashes to control the way incoming traffic is distributed among the instances of the Traffic Management Microkernel (TMM) service. Subscriber-based bandwidth control depends on having a unique one-to-one relationship between bandwidth control policy and subscriber. Subscribers are commonly identified using a unique IP address, and, therefore, load distribution among the instances of TMM service must use the source IP address as the key.

This screen snippet highlights the proper setting.

CMP Hash setting for dynamic bandwidth control

CMP Hash setting for dynamic bandwidth control

This procedure describes the steps for attaching a dynamic bandwidth control policy to a traffic flow, and then applying the policy to traffic, using a virtual server. For information about using Policy Enforcement Manager™ to implement the policy, refer to the F5 documentation for Policy Enforcement Manager.

Task list

Creating a dynamic bandwidth control policy

You can create a dynamic bandwidth control policy to shape the traffic to which you apply the policy. You can configure the policy to mark packets per policy or per category. You can also specify the maximum number of packets per second per instance. Adding categories to a bandwidth control policy is a separate task, which you perform after you have created and saved the policy.
  1. On the Main tab, click Acceleration > Bandwidth Controllers .
  2. Click Create.
  3. In the Name field, type a name for the bandwidth control policy.
  4. In the Maximum Rate field, type a number and select the unit of measure to indicate the total throughput allowed for all the instances created for this dynamic policy.
    The number must be in the range from 1 Mbps to 320 Gbps.
  5. From the Dynamic list, select Enabled.
    The screen displays additional settings.
  6. In the Maximum Rate Per User field, type a number and select the unit of measure to indicate the most bandwidth that each user or session associated with the bandwidth control policy can use.
    The number must be in the range from 1 Mbps to 2 Gbps.
  7. In the Maximum User Rate PPS field, type a number and select the unit of measure to specify the limit in packets per second that traffic is allowed per instance.
    This is an optional setting, which functions as a DoS (Denial of Service) limiter without fair share allocation. You must also specify the Maximum Rate Per User. The system applies whichever value is lower to the traffic flow rate. When both values are specified, both must pass for packets to go through.
  8. Enable the Measure setting, if you want to measure bandwidth on all future instances of this bandwidth control policy.
    The system measures bandwidth with the frequency you specify in the Log Period setting, and sends it to the log publisher you specify using the Log Publisher setting.
  9. From the IP Marking (TOS/DSCP) list, select Specify and type a number between 0 and 63 to assign a Type of Service (ToS) level to packets that exceed the maximum per-user rate.
    If you do not want to set a ToS level, maintain the default setting, Pass Through.
  10. From the L2 Marking (802.1p) list, select Specify and type a number between 0 and 7 to assign a Quality of Service (QoS) level to packets that exceed the maximum per-user rate.
    If you do not want to set a QoS level, maintain the default setting, Pass Through.
  11. Click Finished.
For the dynamic bandwidth control policy to take effect, you must attach the policy to a traffic flow, and then apply the policy to traffic, using a virtual server (through iRules®), Policy Enforcement Manager™, or Access Policy Manager®.

Adding categories to a dynamic bandwidth control policy

Before you can add categories, you must create a bandwidth control policy.
After you create a bandwidth control policy, you can add up to 32 categories of traffic for the policy to control. All the categories share the bandwidth specified for the bandwidth control policy, in accordance with the rate specified for each category.
  1. On the Main tab, click Acceleration > Bandwidth Controllers .
  2. Click the name of the bandwidth control policy to which you want to add categories.
  3. In the Categories area, click Add.
  4. In the Category Name field, type a descriptive name for the category.
  5. In the Max Category Rate field, type a value to indicate the most bandwidth that this category of traffic can use, and select the unit of measure from the list, or select % and type a percentage from 1 to 100.
    If you specify a rate, the number must be in the range from 500 Kbps to the rate specified for the Maximum Rate Per User setting. A percentage indicates that this category can use up to the specified percentage of the maximum per-user rate. These values are upper limits (not minimum or guaranteed), so the sum can exceed the value you specified for the Maximum Rate Per User setting.
  6. From the IP Marking (TOS/DSCP) list, select Specify and type a number between 0 and 63 to assign a Type of Service (ToS) level to packets that exceed the Max Category Rate.
    If you do not want to set a ToS level, maintain the default setting, Pass Through.
  7. From the L2 Marking (802.1p) list, select Specify and type a number between 0 and 7 to assign a Quality of Service (QoS) level to packets that exceed the Max Category Rate.
    If you do not want to set a QoS level, maintain the default setting, Pass Through.
  8. Click Finished.

Creating an iRule for a dynamic bandwidth control policy

To implement a dynamic bandwidth control policy, you can use iRules® to attach the policy to a user.
Note: For complete and detailed information iRules syntax, see the F5 Networks DevCentral web site (http://devcentral.f5.com).
  1. On the Main tab, click Local Traffic > iRules .
    The iRule List screen opens, displaying any existing iRules.
  2. Click Create.
    The New iRule screen opens.
  3. In the Name field, type a unique name for the iRule.
    The full path name of the iRule cannot exceed 255 characters.
  4. In the Definition field, type the syntax for the iRule using Tool Command Language (Tcl) syntax.
    For example, to apply the dynamic bandwidth policy dynamic_bwc_policy200 to a user session, type the following iRule, where set mycookie defines a user session. A session is a combination of client IP address and port.
    when CLIENT_ACCEPTED {
        set mycookie [IP::remote_addr]:[TCP::remote_port]
        BWC::policy attach dynamic_bwc_policy200 $mycookie
    
    }
  5. Click Finished.
    The new iRule appears in the list of iRules on the system.
You have now identified the user for a dynamic bandwidth control policy.
You must then apply the iRule to the virtual server that intercepts the traffic you want to manage.

Adding a dynamic bandwidth control policy to a virtual server

After you create a dynamic bandwidth control policy and attach it to a flow or flows using iRules®, you must apply the policy to traffic by adding the iRule to a virtual server.
  1. On the Main tab, click Local Traffic > Virtual Servers .
    The Virtual Server List screen opens.
  2. Click the name of the virtual server you want to modify.
  3. On the menu bar, click Resources.
  4. In the iRules area, click Manage.
  5. From the Available list, select the name of the iRule that you want to assign, and using the Move button, move the name to the Enabled list.
  6. Click Finished.
The BIG-IP® system now manages bandwidth for the traffic intercepted by this virtual server, according to the dynamic bandwidth policy specified in the assigned iRule.