Segment Routing traffic statistics

Note: This feature is currently supported on 7250 IXR Gen 2c+ and 7250 IXR Gen 3 platforms for SR-ISIS.

When implementing traffic engineering in an SR-enabled network, it is essential to have visibility into the traffic volumes on a per-SID basis. Segment Routing traffic statistics are often used in SDN applications, via Path Computation Engine (PCE) to perform better load balancing of traffic across various paths throughout the network.

Enabling statistics collection for SR-ISIS

SR Linux supports enabling ingress and egress statistics collection for both adjacency SIDs and node SIDs using the ingress-statistics command within the IS-IS segment routing context (network-instance protocols isis instance segment-routing mpls).

Enabling ingress statistics collection for SR-ISIS SIDs

In the following configuration example, the ingress statistics collection is enabled for both adjacency SIDs and node SIDs on IS-IS instance sr-isis-1.

--{ candidate shared default }--[  ]--
# /info with-context network-instance default protocols isis instance sr-isis-1 segment-routing mpls ingress-statistics
    network-instance default {
        protocols {
            isis {
                instance sr-isis-1 {
                    segment-routing {
                        mpls {
                            ingress-statistics {
                                adj-sid true
                                node-sid true
                            }
                        }
                    }
                }
            }
        }
    }

Enabling egress statistics collection for SR-ISIS SIDs

In the following configuration example, the egress statistics collection is enabled for both adjacency SIDs and node SIDs on IS-IS instance sr-isis-2.

--{ candidate shared default }--[  ]--
# /info with-context network-instance default protocols isis instance sr-isis-2 segment-routing mpls egress-statistics
    network-instance default {
        protocols {
            isis {
                instance sr-isis-2 {
                    segment-routing {
                        mpls {
                            egress-statistics {
                                adj-sid true
                                node-sid true
                            }
                        }
                    }
                }
            }
        }
    }

Display SR-ISIS traffic statistics

To display SR-ISIS traffic statistics, use the info from state network-instance protocols isis instance segment-routing mpls sid-statistics command.

--{ state }--[  ]--
# / info from state with-context network-instance default protocols isis instance 0 segment-routing mpls sid-statistics label 21001
    network-instance default {
        protocols {
            isis {
                instance 0 {
                    segment-routing {
                        mpls {
                            sid-statistics {
                                label 21001 {
                                    type adjacency
                                    prefix 10.0.0.2/32
                                    interface ethernet-1/24.1
                                    algorithm 0
                                    egress {
                                        oper-state enabled
                                        octets 14460
                                        packets 10
                                        resource-allocation success
                                    }
                                    ingress {
                                        oper-state enabled
                                        octets 14500
                                        packets 10
                                        resource-allocation success
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }

Clear SR-ISIS traffic statistics

To clear SR-ISIS traffic statistics, use the tools network-instance protocols isis instance 0 segment-routing-statistics clear command.

--{ candidate shared default }--[  ]--
# / tools network-instance default protocols isis instance 0 segment-routing-statistics clear