In the last section we talked about Flex Algo or flexible algorithm and its application in the segment routing. In this section we will discuss the implementation details of segment routing ODN with Flex Algo.

Just to have a quick review, Flex Algo allows us to run IGP with different algorithms and with different constraints for different customers. For example, we run IGP for GOLD customers with the least delay as the best path and with the constraint of ignoring all unreliable links, and at the same time run IGP for SILVER customers with the highest bandwidth as the best path and without any constraints.

How Flex Algo helps in Segment Routing Traffic Engineering?  you can send each customer’s traffic on their own best path with just one label, since that path is the best path in their own algorithm.

Another application of Flex Algo was to create a multiplane network. for example one plane for GOLD customers and one plane for SILVER customers in a way that each plane has it’s own protection without forwarding traffic to another network-plane. this is, what I am going to implement in this section but without protection.

Segment Routing ODN with Flex Algo topology

This is the topology in which we are going to implement Flex Algo. We have two PE routers, PE1 with loopback address 1.1.1.1 and PE2 with loopback address 2.2.2.2. we have two paths between PE1 and PE2, one through P1 and P2 and the other through P3 and P4. We will put these two path in two different planes, Flex Algo 128 and Flex Algo 129.

Segment Routing ODN with Flex Algo Topology
Segment Routing ODN with Flex Algo Topology

I’ve added two customers on the network, RAYKA and Company1, connected to PE routers. A loopback interface is implemented for each customer in PE2. 192.168.1.0/24 for RAYKA who is a GOLD customer and 192.168.2.0/24 for Company1 who is a SILVER customer.

The network is divided into two planes. Flex Algo 128 is implemented in the first plane, which includes routers PE1, P1, P2 and PE2. Flex Algo 129 is implemented on another plane, which include routers, PE1, P3, P4 and PE2. As you noticed, both Flex Algo 128 and Flex Algo 129 are implemented in PE routers, but P routers only participate in one Flex Algo.

In this topology I did not consider any protection nodes and protection links just to simplify the topology.

Our goal is to write an ODN policy in the PE1 router so that the GOLD customer’s traffic is only forwarded to the network-plane with Flex Algo 128 and the SILVER customer’s traffic to the network-plane with Flex Algo 129.

Flex Algo Configuration Example

Now let’s check the configuration details of Flex Algo. The configuration of PE1, PE2 and P1 is displayed here.

Segment Routing ODN with Flex Algo
Segment Routing ODN with Flex Algo

First, let’s check the configuration of PE2 that RAYKA and Company1 are connected to. implementation of ISIS, Segment routing and MPLS traffic engineering are displayed here. What is different is the configuration of Flex Algo. I have configured Flex Algo 128 and Flex Algo 129 in PE2. For each Flex Algo a different Prefix-SID is advertised. Prefix-SID 16002 for normal ISIS. Prefix-SID of 16802 for Flex Algo 128 and Prefix-SID 16902 for Flex Algo 129.

PE2 advertise customer networks with their color according to SLA. Networks from RAYKA customer are advertised with color 10 and networks from Company1 are advertised with color 20.

we have configured two vrfs RAYKA and Company1 with rt 1: 1 and 1: 2. A loopback interface is configured for each vrf. A route policy is configured in such a way that routes from vrf with RD 1:1 are advertised with color 10 and routes from vrf with RD 1:2 are advertised with color 20.

RD 1:1 is configured for RAYKA and RD 1:2 is configured for Company1. In this way, the PE1 router will receives the routes with their corresponding color.

Now let’s check the configuration of the PE1 router. The same configuration as the PE2 router exists in the PE1 router. ISIS, segment routing and MPLS traffic engineering are also configured in the PE1 router. Like PE2, Flex Algo 128 and Flex Algo 129 are also configured in PE1. A different prefix-SID is configured for each Flex Algo.

Two vrfs, RAYKA and Company1 and BGP with address-family vpnv4 is configured in PE1 router.

What is different in PE1, is that we have also configured ODN policy for segment routing. It is ODN policy, because destination of policies are not configured. Any traffic belonging to route with color 10 will be forwarded on the best IGP path in Flex Algo 128. And any traffic belonging to route with color 20 will be forwarded on the best IGP path in Flex Algo 129.  

So we expect that any traffic belonging to GOLD customers will be forwarded through P1 and P2 routers. And  any traffic belonging to SILVER customers will be forwarded through P3 and P4 routers.

Now let’s check the configuration of the P1 router. ISIS, segment routing and MPLS traffic engineering are configured in P1 router. The only difference is that only Flex Algo 128 is configured in the P1 router. In P1 and P2 we only activate Flex Algo 128 and in P3 and P4 we only activate Flex Algo 129.

Flex Algo Monitoring & Troubleshooting

Now let’s look at the result of our configuration.

First, we can use the “show mpls forwarding” command to ensure that a different prefix-SID is advertised for each Fex Algo by ISIS.

RP/0/RP0/CPU0:PE1(config-sr-te-color-dyn)#do show mpls forwarding 
Tue Sep 14 10:12:52.783 UTC
Local  Outgoing    Prefix             Outgoing     Next Hop        Bytes       
Label  Label       or ID              Interface                    Switched    
------ ----------- ------------------ ------------ --------------- ------------
16002  16002       SR Pfx (idx 2)     Gi0/0/0/0    10.1.11.11      82839       
16011  Pop         SR Pfx (idx 11)    Gi0/0/0/0    10.1.11.11      0           
16012  16012       SR Pfx (idx 12)    Gi0/0/0/0    10.1.11.11      0           
16013  Pop         SR Pfx (idx 13)    Gi0/0/0/1    10.1.13.13      0           
16014  16014       SR Pfx (idx 14)    Gi0/0/0/1    10.1.13.13      0           
16802  16802       SR Pfx (idx 802)   Gi0/0/0/0    10.1.11.11      0           
16811  Pop         SR Pfx (idx 811)   Gi0/0/0/0    10.1.11.11      0           
16812  16812       SR Pfx (idx 812)   Gi0/0/0/0    10.1.11.11      0           
16902  16902       SR Pfx (idx 902)   Gi0/0/0/1    10.1.13.13      0           
16913  Pop         SR Pfx (idx 913)   Gi0/0/0/1    10.1.13.13      0           
16914  16914       SR Pfx (idx 914)   Gi0/0/0/1    10.1.13.13      0           
24000  Pop         SR Adj (idx 1)     Gi0/0/0/0    10.1.11.11      0           
24001  Pop         SR Adj (idx 3)     Gi0/0/0/0    10.1.11.11      0           
24002  Pop         SR Adj (idx 1)     Gi0/0/0/1    10.1.13.13      0           
24003  Pop         SR Adj (idx 3)     Gi0/0/0/1    10.1.13.13      0           
24005  16902       SR TE: 2 [TE-INT]  Gi0/0/0/1    10.1.13.13      0           
24006  Pop         No ID              srte_c_10_ep point2point     0           
24007  Pop         No ID              srte_c_20_ep point2point     0           
24008  16802       SR TE: 1 [TE-INT]  Gi0/0/0/0    10.1.11.11      0     

As you can see, prefix SID 16002 for our normal ISIS, 16802 for Flex Algo 128 through G0/0/0/0 and 16902 for Flex Algo 129 and through G0/0/0/1 is announced by the PE2 router.

With the command “show bgp vpnv4 unicast”, as you can see, routes from RAYKA and Company1 are advertised with the appropriate color. 192.168.1.0/24 with color 10 related to RAYKA and 192.18.2.0/24 with color 20 related to Company1 are learned in the PE1 router.

RP/0/RP0/CPU0:PE1(config-sr-te-color-dyn)#do sh bgp vpnv4 unicast 
Tue Sep 14 10:08:26.743 UTC
BGP router identifier 1.1.1.1, local AS number 1
BGP generic scan interval 60 secs
Non-stop routing is enabled
BGP table state: Active
Table ID: 0x0   RD version: 0
BGP main routing table version 15
BGP NSR Initial initsync version 1 (Reached)
BGP NSR/ISSU Sync-Group versions 0/0
BGP scan interval 60 secs

Status codes: s suppressed, d damped, h history, * valid, > best
              i - internal, r RIB-failure, S stale, N Nexthop-discard
Origin codes: i - IGP, e - EGP, ? - incomplete
   Network            Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 1:1 (default for vrf RAYKA)
*>i192.168.1.0/24     2.2.2.2 C:10             0    100      0 ?
Route Distinguisher: 1:2 (default for vrf COMPANY1)
*>i192.168.2.0/24     2.2.2.2 C:20             0    100      0 ?

Processed 2 prefixes, 2 paths

Let us now check the result of our ODN policies in the PE1 router with the command “show segment-routing traffic-eng policy”.

RP/0/RP0/CPU0:PE1(config-sr-te-color-dyn)#do sh segment-routing traffic-eng policy
Tue Sep 14 10:08:54.710 UTC

SR-TE policy database
---------------------

Color: 10, End-point: 2.2.2.2
  Name: srte_c_10_ep_2.2.2.2
  Status:
    Admin: up  Operational: up for 12:05:53 (since Sep 13 22:03:01.266)
  Candidate-paths:
    Preference: 200 (BGP ODN) (active)
      Requested BSID: dynamic
      Constraints:
        Prefix-SID Algorithm: 128
      Dynamic (valid)
        Metric Type: IGP,   Path Accumulated Metric: 19 
          16802 [Prefix-SID: 2.2.2.2, Algorithm: 128]
    Preference: 100 (BGP ODN)
      Requested BSID: dynamic
      PCC info:
        Symbolic name: bgp_c_10_ep_2.2.2.2_discr_100
        PLSP-ID: 1
      Constraints:
        Prefix-SID Algorithm: 128
      Dynamic (pce) (invalid)
      Last error: No path
        Metric Type: NONE,   Path Accumulated Metric: 0 
  Attributes:
    Binding SID: 24006
    Forward Class: Not Configured
    Steering BGP disabled: no
    IPv6 caps enable: yes

Color: 20, End-point: 2.2.2.2
  Name: srte_c_20_ep_2.2.2.2
  Status:
    Admin: up  Operational: up for 12:05:53 (since Sep 13 22:03:01.266)
  Candidate-paths:
    Preference: 200 (BGP ODN) (active)
      Requested BSID: dynamic
      Constraints:
        Prefix-SID Algorithm: 129
      Dynamic (valid)
        Metric Type: IGP,   Path Accumulated Metric: 0 
          16902 [Prefix-SID: 2.2.2.2, Algorithm: 129]
    Preference: 100 (BGP ODN)
      Last error: Constraint cannot be enforced: flex-algorithm
      Requested BSID: dynamic
      PCC info:
        Symbolic name: bgp_c_20_ep_2.2.2.2_discr_100
        PLSP-ID: 2
      Constraints:
        Prefix-SID Algorithm: 129
      Dynamic (pce) (invalid)
        Metric Type: NONE,   Path Accumulated Metric: 0 
  Attributes:
    Binding SID: 24007
    Forward Class: Not Configured
    Steering BGP disabled: no
    IPv6 caps enable: yes

RP/0/RP0/CPU0:PE1(config-sr-te-color-dyn)#

As you can see, two dynamic policies are created. One for the color 10 routes and for the destination 2.2.2.2 and the other for the color 20 routes with the destination 2.2.2.2. both polices are up. the first policy, forward traffic in Flex Algo 128 and the second policy, will forward traffic in Flex Algo 129.  

The binding-SID assigned to the first policy is 24006 and binding-SID assigned to the second policy is 24007.

With the commands “traceroute sr-mpls nil-fec policy binding-sid 24006” and “traceroute sr-mpls nil-fec policy binding-sid 24007”, we can ensure that GOLD traffic is forwarded via P1 and P2 and SILVER traffic forwarded via P3 and P4 routers.

RP/0/RP0/CPU0:PE1#traceroute sr-mpls nil-fec policy name srte_c_10_ep_2.2.2.2
Tue Sep 14 10:18:52.985 UTC

Tracing MPLS Label Switched Path with Nil FEC for SR-TE Policy srte_c_10_ep_2.2.2.2, timeout is 2 seconds

Codes: '!' - success, 'Q' - request not sent, '.' - timeout,
  'L' - labeled output interface, 'B' - unlabeled output interface, 
  'D' - DS Map mismatch, 'F' - no FEC mapping, 'f' - FEC mismatch,
  'M' - malformed request, 'm' - unsupported tlvs, 'N' - no rx label, 
  'P' - no rx intf label prot, 'p' - premature termination of LSP, 
  'R' - transit router, 'I' - unknown upstream index,
  'X' - unknown return code, 'x' - return code 0

Type escape sequence to abort.

  0 10.1.11.1 MRU 1500 [Labels: 16802/explicit-null Exp: 0/0]
L 1 10.1.11.11 MRU 1500 [Labels: 16802/explicit-null Exp: 0/0] 489 ms
L 2 10.11.12.12 MRU 1500 [Labels: implicit-null/explicit-null Exp: 0/0] 258 ms
! 3 10.2.12.2 249 ms
RP/0/RP0/CPU0:PE1#
RP/0/RP0/CPU0:PE1#traceroute sr-mpls nil-fec policy name srte_c_20_ep_2.2.2.2
Tue Sep 14 10:19:16.585 UTC

Tracing MPLS Label Switched Path with Nil FEC for SR-TE Policy srte_c_20_ep_2.2.2.2, timeout is 2 seconds

Codes: '!' - success, 'Q' - request not sent, '.' - timeout,
  'L' - labeled output interface, 'B' - unlabeled output interface, 
  'D' - DS Map mismatch, 'F' - no FEC mapping, 'f' - FEC mismatch,
  'M' - malformed request, 'm' - unsupported tlvs, 'N' - no rx label, 
  'P' - no rx intf label prot, 'p' - premature termination of LSP, 
  'R' - transit router, 'I' - unknown upstream index,
  'X' - unknown return code, 'x' - return code 0

Type escape sequence to abort.

  0 10.1.13.1 MRU 1500 [Labels: 16902/explicit-null Exp: 0/0]
L 1 10.1.13.13 MRU 1500 [Labels: 16902/explicit-null Exp: 0/0] 1013 ms
L 2 10.13.14.14 MRU 1500 [Labels: implicit-null/explicit-null Exp: 0/0] 948 ms
! 3 10.2.14.2 208 ms
RP/0/RP0/CPU0:PE1#

Segment Routing ODN

Refrences:

cisco dcloud Flex Algo Scenario
segmen-routing website

Back to: Segment Routing > Segment Routng Flex Algo

Leave a Reply

Your email address will not be published. Required fields are marked *


Post comment