Global routing configuration

Summary

This chapter describes some configuration options that impact Traffic Engineering operations and performance.

SPF timers

Traffic Dictator has 3 SPF timers:

router general
   spf delay 200
   spf holddown 5000
   spf rapid-runs 3

1. SPF delay (possible values: 50-8000 ms, default value: 200 ms). When a network topology changes, Policy Engine will wait for spf_delay miliseconds before attempting to recalculate policies.

2. SPF holddown (possible values: 2000-20000 ms, default value: 5000 ms). When exceeded the number of spf_rapid_runs within the spf_holddown*3 period, Policy Engine will wait for spf_holddown miliseconds before attempting to recalculate policies.

3. SPF rapid runs (possible values: 1-10, default value: 3). Number of times Policy Engine will run SPF without waiting for spf_holddown.

If the network is unstable, Policy Engine will run out of SPF rapid runs and will wait for spf_holddown time before calculating policies. If the network is stable and there has been no SPF recalculations for spf_holddown*3 period, SPF rapid runs will be restored.

Policy reoptimization timer

While reoptimization in Segment Routing is not as important as in RSVP-TE, it still can be useful in a scenario where many policies of different priorities compete for limited bandwidth and higher priority policies kick out lower priority policies. If a higher priority policy is later deleted or shutdown, but there is no topology change, a lower priority policy can get stuck in failed state or with a suboptimal path. Therefore, Traffic Dictator will recalculate all policies every hour by default:

router general
   reoptimization interval 3600

Allowed values are from 60 to 604800 seconds (1 week).

It is also possible to request reoptimization manually:

TD1#clear traffic-eng *
Requested manual reoptimization of all policies

TD1#show logg recent
--
2024-06-05 17:52:33,100 TD1 INFO: Policy-server: Requesting manual reoptimization of all policies
2024-06-05 17:52:33,457 TD1 INFO: Policy-engine: Calculated 20 successful policies, 0 failed policies in 14 miliseconds, SPF cache hits 275

Note the mention of SPF cache – it is an optimization for faster policy calculation. The nature of Segment Routing is that after calculating CSPF, Policy Engine must compare constrained path with default path to figure out the segment list. With a large topology and large number of policies, it might have to run exact same SPF calculation many thousands of times. SPF caching helps to optimize this process.

SR-TE distinguisher

SR-TE distinguisher is a mandatory part of BGP SR-TE NLRI. It serves similar purpose to Route Distinguisher in MPLS VPN and EVPN.

Consider a topology:

A big advantage of BGP SR-TE over BGP-LU and PCEP is that there is no need to setup a separate session between each router and controller. Instead, we can use the existing BGP infrastructure with route reflectors to distribute SR-TE policies. When a policy is configured with “install indirect srte”, Traffic Dictator will attach route target equal to policy headend to each SR-TE NLRI; so that the route reflector will send the policy to the relevant headend router.

If multiple controllers are used for redundancy, indirect install becomes a problem because if one controller dies, a network outage can happen while the network reconverges. To avoid this, you can configure redundant controllers with different SRTE distinguishers so the route reflector will treat policies from each controller as different NLRI, and advertise both policies to each headend.

TD1#conf
TD1(config)#router general 
TD1(config-router-general)#srte distinguisher 2

This achieves an optimal balance between configuration simplicity and redundancy.

Verify Traffic Engineering options

TD1#show traffic-eng summary
General routing config:

    SPF delay:                     200
    SPF holddown:                  5000
    SPF rapid runs:                3
    Global SR-TE distinguisher:    1
    Reoptimization interval:       3600

Traffic-engineering statistics:

    Total number of policies:      20
    Policies with valid config:    20
    Policies admin down:           0
    Active policies:               0
    Policies recalculated:         1 times
    SPF caches hit count:          0
    Last reoptimization:           September 05, 2024 16:48:27
    Reoptimization count:          0

Last recalculation statistics:

    Recalculation completed at:    2024-09-05 16:48:27.874
    Number of updated policies:    0
    Recalculation took:            0 miliseconds

When advertising SR-TE policies, Traffic Dictator will use the global SR-TE distinguisher configured here as the first octet, and the remaining 3 octets will be auto-generated from the policy number (starting from 0). This ensures each policy has a unique distinguisher and there will be no conflicts when multiple headends have policies with the same endpoint and color.