Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Collecting LDP Statistics

LDP traffic statistics show the volume of traffic that has passed through a particular FEC on a router.

When you configure the traffic-statistics statement at the [edit protocols ldp] hierarchy level, the LDP traffic statistics are gathered periodically and written to a file. You can configure how often statistics are collected (in seconds) by using the interval option. The default collection interval is 5 minutes. You must configure an LDP statistics file; otherwise, LDP traffic statistics are not gathered. If the LSP goes down, the LDP statistics are reset.

To collect LDP traffic statistics, include the traffic-statistics statement:

traffic-statistics {file filename <files number> <size size> <world-readable | no-world-readable>;interval interval;no-penultimate-hop;}

For a list of hierarchy levels at which you can include this statement, see the statement summary section for this statement.

This section includes the following topics:

LDP Statistics Output

The following sample output is from an LDP statistics file:

FEC                  Type       Packets     Bytes    Shared
10.255.350.448/32    Transit          0         0        No
                     Ingress          0         0        No
10.255.350.450/32    Transit          0         0       Yes
                     Ingress          0         0        No
10.255.350.451/32    Transit          0         0        No
                     Ingress          0         0        No
220.220.220.1/32     Transit          0         0       Yes
                     Ingress          0         0        No
220.220.220.2/32     Transit          0         0       Yes
                     Ingress          0         0        No
220.220.220.3/32     Transit          0         0       Yes
                     Ingress          0         0        No
May 28 15:02:05, read 12 statistics in  00:00:00 seconds

The LDP statistics file includes the following columns of data:

  • Bytes—Number of bytes of data passed by the FEC since its LSP came up.
  • FEC—FEC for which LDP traffic statistics are collected.
  • Packets—Number of packets passed by the FEC since its LSP came up.
  • read—This number (which appears next to the date and time) might differ from the actual number of the statistics displayed. Some of the statistics are summarized before being displayed.
  • Shared—A Yes value indicates that several prefixes are bound to the same label (for example, when several prefixes are advertised with an egress policy). The LDP traffic statistics for this case apply to all the prefixes and should be treated as such.
  • Type—Type of traffic originating from a router or switch, either Ingress (originating from this router or switch) or Transit (forwarded through this router or switch).

Disabling LDP Statistics on the Penultimate-Hop Router

Gathering LDP traffic statistics at the penultimate-hop router or switch can consume excessive system resources, on next-hop routes in particular. This problem is exacerbated if you have configured the deaggregate statement in addition to the traffic-statistics statement. For routers or switches reaching their limit of next-hop route usage, we recommend configuring the no-penultimate-hop option for the traffic-statistics statement:

traffic-statistics {no-penultimate-hop;}

For a list of hierarchy levels at which you can configure the traffic-statistics statement, see the statement summary section for this statement.

Note: When you configure the no-penultimate-hop option, no statistics are available for the FECs that are the penultimate hop for this router or switch.

Whenever you include or remove this option from the configuration, the LDP sessions are taken down and then restarted.

The following sample output is from an LDP statistics file showing routers or switches on which the no-penultimate-hop option is configured:

FEC                 Type            Packets          Bytes       Shared
10.255.245.218/32   Transit               0              0           No
                    Ingress               4            246           No
10.255.245.221/32   Transit     statistics disabled
                    Ingress     statistics disabled
13.1.1.0/24         Transit     statistics disabled
                    Ingress     statistics disabled
13.1.3.0/24         Transit     statistics disabled
                    Ingress     statistics disabled

LDP Statistics Limitations

The following are issues related to collecting LDP statistics by configuring the traffic-statistics statement:

  • You cannot clear the LDP statistics.
  • If you shorten the specified interval, a new LDP statistics request is issued only if the statistics timer expires later than the new interval.
  • A new LDP statistics collection operation cannot start until the previous one has finished. If the interval is short or if the number of LDP statistics is large, the time gap between the two statistics collections might be longer than the interval.

When an LSP goes down, the LDP statistics are reset.

Published: 2014-10-03

Published: 2014-10-03