Previous Section  < Free Open Study >  Next Section

Automatic Bandwidth Adjustment

As you've seen, MPLS TE tunnels can be configured to reserve bandwidth. But in everything you've seen so far, reservations require manual intervention to change. What happens if the traffic patterns in your network change several times during the day? One way to handle this situation is to use an offline tool to figure out how much bandwidth to give each tunnel and to send new configurations to your routers with the new configuration information. See Chapter 9 for more on the issues involved.

Offline tunnel calculation has a decided advantage in that you can also use this offline tool to calculate the paths your TE LSPs flow over, which leads to a more efficient use of bandwidth. However, an offline tool is a lot of work. If you want to give your network a fair degree of autonomy without having to run an offline tool, consider a mechanism called auto bandwidth.

Auto bandwidth is a simple concept. You configure it on a per-LSP basis at the headend. Periodically, the headend looks at the bandwidth actually used by the auto bandwidth-configured LSPs and changes the configuration of those LSPs to reflect a more recent bandwidth requirement.

The devil, of course, is in the details.

How Auto Bandwidth Works

The general idea behind auto bandwidth is that it watches the traffic rate on a tunnel interface and periodically resizes the bandwidth on the tunnel interface to more closely align with the traffic that's actually going down the tunnel.

Table 5-22 lists several auto bandwidth variables with which you must concern yourself.

Table 5-22. Auto Bandwidth Variables
Variable Name Description Default Value
A Application frequency How often a tunnel's bandwidth is changed 24 hours (86,400 seconds)
B Tunnel bandwidth The value of tunnel mpls traffic-eng bandwidth that is configured on a tunnel 0 Kbps
C Collection frequency How often a tunnel's output rate is polled 5 minutes (300 seconds)
H Highest collected bandwidth The highest collected bandwidth in the last A seconds N/A
D Delta H–B—the difference between a tunnel's highest recorded bandwidth and its configured bandwidth N/A

When a tunnel is first configured with auto bandwidth, a timer A is started. After this timer is started, every C seconds, the output rate on that tunnel interface is collected, and D is calculated. When A expires, the tunnel is reconfigured (the value of B is modified) in accordance with D.

For example, suppose you enable auto bandwidth on an interface that has no bandwidth configured. Over A seconds, the highest bandwidth seen on that tunnel is 30 Mbps. The value of D is therefore 30 Mbps. The tunnel is resized to 30 Mbps, and the A timer starts again.

What if you enable auto bandwidth on a tunnel whose highest observed bandwidth is 30 Mbps but that is configured for 45 Mbps? In this case, as soon as A expires, D is 15 Mbps, and the tunnel is resized to 45 Mbps – 15 Mbps, or 30 Mbps.

There are a few cases in which auto bandwidth doesn't change B to be the same as H:

  • If the tunnel has been up for less than 5 minutes, don't apply all the D value to B. Instead, use the values listed in Table 5-23.If B is less than 50 kbps, change it only if D is 10 kbps or more. Otherwise, pretend that no change happened. The idea is to not constantly resignal relatively small changes in a tunnel.

  • If B is greater than 50 kbps and less than 100 kbps, change the bandwidth only if D is 10 percent or more of B.

  • If D is more than 100 kbps, apply the change no matter what percentage of B it is. This is done because even if you have tunnels large enough that a D of 100 kbps is less than 10 percent (tunnels of more than 1 Mbps), 100 kbps is still a significant-enough difference to warrant a change.

  • If you have configured minimum or maximum bandwidth values for a tunnel, obey them.

Table 5-23. Percentage of D Applied to New Bandwidth Request
Tunnel Uptime, in Minutes Percentage of D to Apply to B
5+ 100%
4 80%
3 60%
2 40%
1 20%
0 10%

Auto Bandwidth Configuration

Auto bandwidth has one globally configurable knob:


gsr3(config)#mpls traffic-eng auto-bw timers frequency ?

  <1-604800>  seconds between auto-bw

This is the collection frequency (C) referred to in Table 5-22. The default for this timer is 300 seconds, or 5 minutes. Whenever this timer expires, the output rate on all tunnel interfaces (as seen in show interface) is recorded. Nothing is actually done with this information until auto-bandwidth is enabled on a TE tunnel.

How the Interface Bandwidth Is Calculated

Auto bandwidth checks the interface output rate on a tunnel the same way you would—it looks at the output rate counter in show interfaces:


gsr3#show interfaces tunnel0

Tunnel0 is up, line protocol is up

...

  30 second output rate 2791000 bits/sec, 506 packets/sec

The output rate shown on any interface (and, for that matter, the input rate, but TE tunnels don't have an input rate) is an exponentially decaying average. It is calculated with the formula

graphics/05equ01.gif


where e is approximately 2.718, t equals 5, C is the load interval in seconds, and interval_traffic is how much traffic (the number of bits or the number of packets) has passed in the last t seconds. t is always 5; it's an internal Cisco IOS Software timer thing that you shouldn't worry about. You can't configure values of t.

This formula applies for all input and output rates on all interfaces in a router, not just TE tunnels.

To converge on the actual interface load faster, you should set the load interval on the tunnel interface to 30 seconds using the command load-interval 30. This gives you a more accurate picture of what happened in the last 30 seconds. auto-bw has its own dampening built in, so using the default 5-minute load interval timer gives you less-recent results than using 30 seconds.

On an LSP, auto bandwidth is configured with the knob tunnel mpls traffic-eng auto-bw. That's all you need to do to turn on auto bandwidth with the default timers. This command has several options, as shown in Example 5-12.

Example 5-12 auto-bw Options

gsr3(config-if)#tunnel mpls traffic-eng auto-bw ?

  collect-bw  Just collect Bandwidth info on this tunnel

  frequency   Frequency to change tunnel BW

  max-bw      Set the Maximum Bandwidth for auto-bw on this tunnel

  min-bw      Set the Minimum Bandwidth for auto-bw on this tunnel

  <cr>

collect-bw does everything except actually change the tunnel bandwidth. It collects it so that you can see what bandwidth auto-bw would change the tunnel to if it were enabled.

frequency controls A, the application frequency. frequency needs to be the same size as or larger than C, the global collection frequency. This makes sense, because you can't change bandwidth faster than you check to see if it's changed. The lower you configure this frequency, the more often you change the tunnel bandwidth.

max-bw sets the maximum bandwidth to which auto-bw can go. It's the same idea as min-bw, but in the other direction. No matter what the traffic rate down a tunnel, if you configure max-bw, auto bandwidth never sets the tunnel's bandwidth to higher than that.

min-bw sets the minimum bandwidth to which auto-bw can go. No matter what the traffic rate down a tunnel, if you configure min-bw, auto bandwidth will never set the tunnel's bandwidth to lower than that.

Auto Bandwidth Operation

Auto bandwidth, like so many other things, displays its information in show mpls traffic-eng tunnels, as demonstrated in Example 5-13.

Example 5-13 Displaying Auto Bandwidth Information

Router-1# show mpls traffic-eng tunnels

Name:tagsw4500-9_t1 (Tunnel1) Destination:10.0.0.11

  Status:

    Admin:up Oper:up Path:valid Signalling:connected

    path option 10, type dynamic

  Config Parameters:

    Bandwidth:5000 kbps (Global) Priority:7 7 Affinity:0x0/0xFFFF

    AutoRoute: disabled LockDown:disabled Loadshare:500 bw-based

    auto-bw:(86400/85477) 765 Bandwidth Requested:500

Table 5-24 dissects the meaning of the fields in the highlighted output.

Table 5-24. Understanding Auto Bandwidth Information
Number Description
86,400 The tunnel's A—application frequency.
85,477 The amount of time remaining in the current application frequency period.
765 The highest bandwidth sampled since the beginning of the application frequency period (in the last 86,400 – 85,477 = 923 seconds).
Bandwidth Requested: 500 The amount of bandwidth the tunnel currently is asking the network for. This is the value configured with tunnel mpls traffic-eng bandwidth.

One final thing to understand about auto-bw is that it actually changes your tunnel configuration. Suppose you start with a tunnel configured as shown in Example 5-14.

Example 5-14 Basic Tunnel Configuration

interface Tunnel0

  ip unnumbered Loopback0

  tunnel mode mpls traffic-eng

  tunnel destination 192.168.1.8

  tunnel mpls traffic-eng path-option 10 dynamic

  tunnel mpls traffic-eng auto-bw

If auto-bw decides that this tunnel should be resized with 750 kbps of bandwidth, the tunnel configuration changes to that shown in Example 5-15.

Example 5-15 Tunnel Reconfigured by Auto Bandwidth

interface Tunnel0

  ip unnumbered Loopback0

  tunnel mode mpls traffic-eng

  tunnel destination 192.168.1.8

  tunnel mpls traffic-eng path-option 10 dynamic

  tunnel mpls traffic-eng auto-bw

  tunnel mpls traffic-eng bandwidth 750

The configuration changes that auto bandwidth makes are like a configuration change you make by hand. The configuration is not saved, so unless you have saved it yourself, after the router is reloaded, the configured bandwidth is not there on reload.

    Previous Section  < Free Open Study >  Next Section