Segment Routing v6 Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

PDF

Segment Routing v6 Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

How SRv6 traffic accounting works

Want to summarize with AI?

Log in

Explains how locator counters measure traffic across ECMP interfaces and provide the data needed to construct a network demand matrix.


Summary

The key components that are involved in the SRv6 locator counters and traffic accounting process are:

  • CE1 (Customer Edge 1): An endpoint that originates external traffic in the network topology.

  • CE2 (Customer Edge 2): An endpoint that receives both external and internal traffic.

  • PE1 (Provider Edge 1): A network device that learns reachability, imposes traffic with SRv6 locators, and performs external traffic accounting.

  • PE4 (Provider Edge 4): A network device that originates internal traffic destined for other parts of the network, typically passing through provider edge devices.

  • P21 and P22: Specific interfaces or paths on PE1 that are used for forwarding traffic, contributing to the ECMP (Equal-Cost Multi-Path) setup.

  • SRv6 Locator Counters (LOC.INT.E): The mechanism used for accounting traffic on a per-prefix and per-egress interface basis within the SRv6 domain.

  • Demand Matrix (DM): The Demand Matrix (DM) is a representation of the amount of data transmitted between every pair of routers. Each cell in the DM represents a traffic volume from one router to another. DM gives a complete view of the traffic in your network.

The SRv6 locator counters and traffic accounting process involves tracking traffic flows and quantifying data transmission. The key components work together to track external and internal traffic flows and calculate the net external traffic, providing a comprehensive view of network traffic distribution. The traffic sent and received from CE1 is considered as the external traffic. The traffic from PE4 destined to PE2 is considered as the internal traffic.

Workflow

Figure 1. Sample Topology for SRv6 Traffic Accounting

These stages describe how SRv6 locator counters and traffic accounting work.

  1. PE1 learns CE2 reachability through PE2. Consider PE1 has ECMP paths via P21 and P22 to reach PE2.

    When traffic reaches PE1, PE1 imposes traffic with the PE2 locator fcbb:bb00:2::.

  2. When traffic exits the PE1 interface (fa21) through P21, PE1 keeps the count of this traffic that is sent. Also, when traffic exits the PE1 interface (fa22) through P22, PE1 keeps the count of this traffic that is sent. The traffic is accounted irrespective of the path PE1 takes to send traffic.

    Here is the SRv6 label of the outgoing traffic for PE2:

    <fcbb:bb00:1::1, fcbb:bb00:2:f2d1::> [CUSTTraffic]

  3. When the next set of packets are received and passed through PE1, the counters are incremented on fa21or fa22 interface based on the path the traffic sent through PE2.

  4. When traffic is sent from PE4 to PE2 through PE1, PE4 imposes the traffic with the PE2 locator ID fcbb:bb00:2::. The traffic count is recorded at PE4 for this locator ID. The traffic from PE4 to PE1 is considered as internal traffic.

  5. When traffic reaches PE1, it looks for the PE2 locator ID and keeps the traffic count at PE1 when the traffic exit the fa21 interface.

  6. SRv6 traffic is calculated using the demand matrix.

    Let's understand the calculation with an example. In the topology, the amount of external traffic destined for PE2 is a combination of external and internal traffic.

    Note

    The traffic transmitted from PE1 is marked in blue. The traffic transmitted from PE4 is marked as in green.

    Figure 2. SampleTopology for Demand Matrix

    The amount of external traffic that PE2 receives is equal to the total traffic sent out from PE1 minus the received internal traffic.

    Let's consider that PE1 transmits a total of 39 gigabits per second towards PE2. PE1 receives 21 gigabits per second of internal traffic from PE4. PE1 receives 0 gigabits per second from P21 and P22.

    The formula for external traffic to PE2 is applied:

    
    External traffic to PE2 
    = (Total traffic sent out from PE1) - (Internal traffic received by PE1)
    = (sum of all Loc.int.E counters on PE1) - ( sum of the Loc.int.E counters of all neighbors of PE1)
    
    External traffic to PE2  
    = (sum of all Loc.int.E counters on PE1) - ( sum of the Loc.int.E counters of all neighbors of PE1)
    = 39 gigabits per second - (21 + 0 + 0) gigabits per second 
    = 18 gigabits per second external traffic 
    Table 1. Demand Matrix showing traffic transmitted from PE1 and PE4 to PE2

    From/To

    PE1

    PE2

    PE1

    NA

    39 - (21 + 0 +0) = 18 gigabits per second

    PE2 recieves 18 gigabits per second external traffic from PE1

    PE4

    21- (18 + 0 + 0) = 3 gigabits per second

    39 - (18 + 0 + 0) = 21 gigabits per second