Configuring BGP to Gather Interprovider and Carrier-of-Carriers VPNs Statistics
You can configure BGP to gather traffic statistics for interprovider and carrier-of-carriers VPNs.
To configure BGP to gather traffic statistics for interprovider and carrier-of-carriers VPNs, include the
traffic-statisticsstatement:traffic-statistics{filefile-name<world-readable | no-world-readable>;intervalseconds;}For a list of the hierarchy levels at which you can include the
traffic-statisticsstatement, see the summary section for this statement.
NOTE: Traffic statistics for interprovider and carrier-of-carriers VPNs are available only for IPv4. IPv6 is not supported.
If you do not specify a filename, the statistics are not written to a file. However, if you have included the
traffic-statisticsstatement in the BGP configuration, the statistics are still available and can be accessed by means of theshow bgp group traffic-statisticsgroup-namecommand.To account for traffic from each customer separately, separate labels must be advertised for the same prefix to the peer routers in different groups. To enable separate traffic accounting, you need to include the
per-group-labelstatement in the configuration for each BGP group. By including this statement, statistics are collected and displayed that account for traffic sent by the peers of the specified BGP group.If you configure the statement at the
[edit protocols bgp family inet]hierarchy level, rather than configuring it for a specific BGP group, then the traffic statistics are shared with all BGP groups configured with thetraffic-statisticsstatement but not configured with theper-group-labelstatement.To account for traffic from each customer separately, include the
per-group-labelstatement in the configuration for each BGP group:per-group-label;For a list of the hierarchy levels at which you can include the
per-group-labelstatement, see the summary section for this statement.The following shows a sample of the output to the traffic statistics file:
Dec 19 10:39:54 Statistics for BGP group ext2 (Index 1) NLRI inet-labeled-unicastDec 19 10:39:54 FEC Packets Bytes EgressAS FECLabelDec 19 10:39:54 10.255.245.55 0 0 I 100160Dec 19 10:39:54 10.255.245.57 0 0 I 100112Dec 19 10:39:54 100.101.0.0 0 0 25 100080Dec 19 10:39:54 100.102.0.0 0 0 25 100080Dec 19 10:39:54 100.103.0.0 109 9592 25 100048Dec 19 10:39:54 100.104.0.0 109 9592 25 100048Dec 19 10:39:54 192.168.25.0 0 0 I 100064Dec 19 10:39:54 Dec 19 10:39:54, read statistics for 5 FECs in 00:00:00 seconds (10 queries) for BGP group ext2 (Index 1) NLRI inet-labeled-unicast