Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Configuring Reporting of Automatic Bandwidth Allocation Statistics

    Automatic bandwidth allocation allows an MPLS tunnel to automatically adjust its bandwidth allocation based on the volume of traffic flowing through the tunnel. You can configure the device to collect statistics related to automatic bandwidth allocation by completing the following steps:

    1. To collect statistics related to automatic bandwidth allocation, configure the auto-bandwidth option for the statistics statement at the [edit protocols mpls] hierarchy level. These settings apply to all LSPs configured on the router on which you have also configured the auto-bandwidth statement at the [edit protocols mpls label-switched-path label-switched-path-name] hierarchy level.
      statistics {auto-bandwidth;file filename <files number> <size size> <world-readable | no-world-readable>;interval seconds;no-transit-statistics;}
    2. Specify the filename for the files used to store the MPLS trace operation output using the file option. All files are placed in the directory /var/log. We recommend that you place MPLS tracing output in the file mpls-log.
    3. Specify the maximum number of trace files using the files number option. When a trace file named trace-file reaches its maximum size, it is renamed trace-file.0, then trace-file.1, and so on, until the maximum number of trace files is reached. Then the oldest trace file is overwritten.
    4. Specify the interval for calculating the average bandwidth usage by configuring a time in seconds using the interval option. You can also set the adjustment interval on a specific LSP by configuring the interval option at the [edit protocols mpls label-switch-path label-switched-path-name statistics] hierarchy level.

      Note: To prevent unnecessary resignaling of LSPs, it is best to configure an LSP adjustment interval that is at least three times longer than the MPLS automatic bandwidth statistics interval. For example, if you configure a value of 30 seconds for the MPLS automatic bandwidth statistics interval (interval statement at the [edit protocols mpls statistics] hierarchy level), you should configure a value of at least 90 seconds for the LSP adjustment interval (adjust-interval statement at the [edit protocols mpls label-switched-path label-switched-path-name auto-bandwidth] hierarchy level).

    5. To trace automatic bandwidth allocation, include the autobw-state flag for the MPLS traceoptions statement at the [edit protocols mpls] hierarchy level.

      The following configuration enables the MPLS traceoptions for automatic bandwidth allocation. The trace records are stored in a file called auto-band-trace (the filename is user configurable):

      [edit protocols mpls]
      traceoptions {file auto-band-trace size 10k files 10 world-readable;flag autobw-state;}
    6. Using the show log command, you can display the automatic bandwidth allocation statistics file generated when you configure the auto-bandwidth statement. The following shows sample log file output taken from an MPLS statistics file named auto-band-stats on a router configured with an LSP named E-D. The log file shows that LSP E-D is operating over its reserved bandwidth limit initially. Before Oct 30 17:14:57, the router triggered an automatic bandwidth adjustment (you might see two sessions for an LSP undergoing an automatic bandwidth adjustment). By Oct 29 17:16:57, the LSP has been reestablished at a higher bandwidth and is now shown using less than 100 percent of its Reserved Bw (reserved bandwidth).

      user@host> show log auto-band-stats
      E-D          (LSP ID 5, Tunnel ID 6741)          209 pkt          17094 Byte      1 pps       90 Bps Util 240.01% Reserved Bw       37 Bps
      decr nh 0x952c224, type 4, flags 0x0, n_gw 1, nhid 0 to refcount 1Oct 30 17:13:57 Total 1 sessions: 1 success, 0 fail, 0 ignored
      E-D          (LSP ID 5, Tunnel ID 6741)          241 pkt          19737 Byte      1 pps       88 Bps Util 234.67% Reserved Bw       37 Bps
      decr nh 0x952c224, type 4, flags 0x0, n_gw 1, nhid 0 to refcount 1Oct 30 17:14:27 Total 1 sessions: 1 success, 0 fail, 0 ignored
      E-D          (LSP ID 5, Tunnel ID 6741)          276 pkt          22607 Byte      1 pps       95 Bps Util 253.34% Reserved Bw       37 Bps
      decr nh 0x952c224, type 4, flags 0x0, n_gw 1, nhid 0 to refcount 1Oct 30 17:14:57 Total 1 sessions: 1 success, 0 fail, 0 ignored
      E-D          (LSP ID 5, Tunnel ID 6741)            0 pkt              0 Byte      0 pps        0 Bps Util  0.00% Reserved Bw       37 Bps
      E-D          (LSP ID 6, Tunnel ID 6741)            0 pkt              0 Byte      0 pps        0 Bps Util  0.00% Reserved Bw      101 Bps
      decr nh 0x952c224, type 4, flags 0x0, n_gw 1, nhid 0 to refcount 1decr nh 0x952c308, type 4, flags 0x0, n_gw 1, nhid 0 to refcount 1Oct 30 17:15:27 Total 2 sessions: 2 success, 0 fail, 0 ignored
      E-D          (LSP ID 5, Tunnel ID 6741)            0 pkt              0 Byte      0 pps        0 Bps Util  0.00% Reserved Bw       37 Bps
      E-D          (LSP ID 6, Tunnel ID 6741)           33 pkt           2695 Byte      1 pps       89 Bps Util 87.69% Reserved Bw      101 Bps
      decr nh 0x952c224, type 4, flags 0x0, n_gw 1, nhid 0 to refcount 1decr nh 0x952c308, type 4, flags 0x0, n_gw 1, nhid 0 to refcount 1Oct 30 17:15:57 Total 2 sessions: 2 success, 0 fail, 0 ignored
      E-D          (LSP ID 5, Tunnel ID 6741)            0 pkt              0 Byte      0 pps        0 Bps Util  0.00% Reserved Bw       37 Bps
      E-D          (LSP ID 6, Tunnel ID 6741)           65 pkt           5338 Byte      1 pps       88 Bps Util 86.70% Reserved Bw      101 Bps
      decr nh 0x952c224, type 4, flags 0x0, n_gw 1, nhid 0 to refcount 1decr nh 0x952c308, type 4, flags 0x0, n_gw 1, nhid 0 to refcount 1Oct 30 17:16:27 Total 2 sessions: 2 success, 0 fail, 0 ignored
      E-D          (LSP ID 6, Tunnel ID 6741)           97 pkt           7981 Byte      1 pps       88 Bps Util 86.70% Reserved Bw      101 Bps
      decr nh 0x952c308, type 4, flags 0x0, n_gw 1, nhid 0 to refcount 1Oct 30 17:16:57 Total 1 sessions: 1 success, 0 fail, 0 ignored
    7. Issue the show mpls lsp autobandwidth command to display current information about automatic bandwidth allocation. The following shows sample output from the show mpls lsp autobandwidth command taken at about the same time as the log file shown previously:

      user@host> show mpls lsp autobandwidth    
      Lspname               Last         Requested    Reserved     Highwater    AdjustTime LastAdjust 
                            BW           BW           BW           mark         Left (sec)                    
      E-D                   300bps      812.005bps  812bps      1.56801kbps 294 sec    Wed Oct 30 17:15:26 2013
    8. Issue the file show command to display the MPLS trace file. You need to specify the file location and file name (the file is located in /var/log/. The following shows sample trace file output is taken from an MPLS trace file named auto-band-trace.0.gz on a router configured with an LSP named E-D. The trace file shows that LSP E-D is operating over its reserved bandwidth limit initially. At Oct 30 17:15:26, the router triggers an automatic bandwidth adjustment (you might see two sessions for an LSP undergoing an automatic bandwidth adjustment). By Oct 29 17:15:57, the LSP has been reestablished at a higher bandwidth and is now shown using less than 100 percent of its Reserved Bw (reserved bandwidth).

      user@host> file show /var/log/auto-band-trace.0.gz 
      Oct 30 17:13:57 trace_on: Tracing to "/var/log/E/auto-band-trace" started
      Oct 30 17:13:57.466825 LSP E-D (id 5) new bytes arrived           2714 in 29 sec
      Oct 30 17:14:27.466713 E-D          (LSP ID 5, Tunnel ID 6741)          241 pkt          19737 Byte      1 pps       88 Bps Util 234.67% Reserved Bw       37 Bps
      Oct 30 17:14:27.466962 LSP E-D (id 5, old id 5); sampled bytes      19737 > bytes recorded      17094
      Oct 30 17:14:27.467035 LSP E-D (id 5) new bytes arrived           2643 in 29 sec
      Oct 30 17:14:57.466599 E-D          (LSP ID 5, Tunnel ID 6741)          276 pkt          22607 Byte      1 pps       95 Bps Util 253.34% Reserved Bw       37 Bps
      Oct 30 17:14:57.466758 LSP E-D (id 5, old id 5); sampled bytes      22607 > bytes recorded      19737
      Oct 30 17:14:57.466825 LSP E-D (id 5) new bytes arrived           2870 in 29 sec
      Oct 30 17:15:26.265816 Adjust Autobw: LSP E-D (id 5) curr adj bw 300bps updated with 812.005bps
      Oct 30 17:15:26.266064 mpls LSP E-D Autobw change 512.005bps >= threshold 75bps
      Oct 30 17:15:26.363372 Autobw Success: LSP E-D ()  (old id 5 new id 6) update prev active bw 300 bps with 812 bps
      Oct 30 17:15:26.363686 RPD_MPLS_PATH_BANDWIDTH_CHANGE: MPLS path  (lsp E-D) bandwidth changed, path bandwidth 812 bps
      Oct 30 17:15:27.364751 RPD_MPLS_LSP_BANDWIDTH_CHANGE: MPLS LSP E-D bandwidth changed, lsp bandwidth 812 bps
      Oct 30 17:15:27.466849 E-D          (LSP ID 5, Tunnel ID 6741)            0 pkt              0 Byte      0 pps        0 Bps Util  0.00% Reserved Bw       37 Bps
      Oct 30 17:15:27.467050 E-D          (LSP ID 6, Tunnel ID 6741)            0 pkt              0 Byte      0 pps        0 Bps Util  0.00% Reserved Bw      101 Bps
      Oct 30 17:15:57.466858 E-D          (LSP ID 5, Tunnel ID 6741)            0 pkt              0 Byte      0 pps        0 Bps Util  0.00% Reserved Bw       37 Bps
      Oct 30 17:15:57.467106 E-D          (LSP ID 6, Tunnel ID 6741)           33 pkt           2695 Byte      1 pps       89 Bps Util 87.69% Reserved Bw      101 Bps
      Oct 30 17:15:57.467201 LSP E-D (id 6, old id 5); LSP up after autobw adjustment and active for 30 sec
      Oct 30 17:15:57.467398 LSP E-D (id 6) psb bytes           2695 < bytes recorded          22607 total bytes           2695 in 30 sec
      Oct 30 17:15:57.467461 First sample of the adjust interval after automatic bw adjustment
      Oct 30 17:15:57.467594 Update curr max avg bw 0bps of LSP E-D with new bw 716.225bps
      Oct 30 17:16:27.466830 E-D          (LSP ID 5, Tunnel ID 6741)            0 pkt              0 Byte      0 pps        0 Bps Util  0.00% Reserved Bw       37 Bps
      Oct 30 17:16:27.467079 E-D          (LSP ID 6, Tunnel ID 6741)           65 pkt           5338 Byte      1 pps       88 Bps Util 86.70% Reserved Bw      101 Bps
      Oct 30 17:16:27.467171 LSP E-D (id 6, old id 6); sampled bytes       5338 > bytes recorded       2695
      Oct 30 17:16:27.467237 LSP E-D (id 6) new bytes arrived           2643 in 29 sec
      Oct 30 17:16:57.466712 E-D          (LSP ID 6, Tunnel ID 6741)           97 pkt           7981 Byte      1 pps       88 Bps Util 86.70% Reserved Bw      101 Bps
      Oct 30 17:16:57.466870 LSP E-D (id 6, old id 6); sampled bytes       7981 > bytes recorded       5338

    Published: 2014-09-26