Wednesday, April 22, 2020

Segment Routing Control Plane - ISIS


Segment Routing Deployment - Control and Data Plane gives fair understanding of how to deploy segment routing by using IS-IS on Cisco XR based platforms. In this post, I will be focusing how the segment routing control plane gets established by using IS-IS protocol.

Remember below mentioned points before moving ahead:

1. Every router must know what type of Data Plane capability to use like capable of processing SR-MPLS-encapsulated IPv4 packets on all interfaces or SR-MPLS-encapsulated IPv6 packets on all interfaces [SR-Capability TLV]
2. Every router must know what the SID-Index of the destination route is [Extended IP Reachability TLV]
3. Every router must know about the SRGB block to be used [SR-Capability TLV]
4. Every router must know what the SRLB (Segment Routing Local Block – Mainly Used For Adj-Sids, This is local to router and can be sent to PCE or can be used statically on headed router for Segment Routing Traffic Engineering Use Case) [SR-Capability TLV]

All the above four functions/tasks are taken care by ISIS Router-Capability TLV(242) and Extended IP Reachability TLV – (135,235)

1. Router-Capability TLV(242)
As per RFC 8667, section 3; Router Capability TLV (242) carries below mentioned different Sub-TLV. Router Capability TLV, helps to exchange the SRGB information along with type of data plane used.
a. SR-Capabilities Sub-TLV – This is type 2 sub-TLV. It contains the information of the SRGB Range, SID/Label value and capability of processing SR-MPLS-encapsulated IPv4 packets or IPv6 (Flags).

The SR-Capabilities sub-TLV has the following format:

       

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |   Type        |     Length    |    Flags      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                     Range                     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   //                SID/Label Sub-TLV (variable)                 //
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


Example of the advertisement of SRGB ranges by SR capable nodes(routers).
SR-Capable Node Advertises: Range: 100, SID value: 100
Receiving routers build the SRGB as follows: [100,199]. Index 0 means label 100, Index 1 means label 101, Index 99 means label 100.

b. SR-Algorithm Sub-TLV – This is type 19 sub-TLV. SR-Algorithm sub-TLV is optional. A router receiving multiple SR-Algorithm sub-TLVs from the same originator SHOULD select the first advertisement in the lowest-numbered LSP. This sub-TLV is used to calculate reachability to other nodes or to prefixes attached to the nodes. It has 2 values 0 and 1. 0 means SPF algo based on link metric and 1 means strict SPF algo based on link metric but algo 1 requires all the nodes in the path honor the SPF decision and will not bypass by any local policy.

The SR-Algorithm sub-TLV has the following format:
       

     0                   1                   2                   3
     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |   Type        |     Length    |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    | Algorithm 1   |  Algorithm 2  | Algorithm ... |  Algorithm n  |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

c. SR Local Block Sub-TLV: This is type 22 sub-TLV and it contains the range of labels reserved for local SIDs.
d. SRMS Preference Sub-TLV: This is type 24 sub-TLV. This is associated with Segment Routing Mapping Server advertisements from source. This is optional sub-TLV.

2. Extended IP Reachability TLV – (135,235)
As per RFC 8667 section 2.1, IS-IS sub-TLV is defined: the Prefix Segment Identifier (Prefix-SID) sub-TLV type 3. The Prefix-SID sub-TLV carries the Segment Routing IGP-Prefix-SID as defined in [RFC8402]. The 'Prefix-SID' MUST be unique within a given IGP domain.

The Prefix-SID sub-TLV has the following format:
       
0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |   Type        |     Length    |     Flags     |   Algorithm   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         SID/Index/Label (variable)            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


Below is the list of important flags used in Prefix-SID. Flags are nothing but a boolean value.
1. N-Flag – This is node sid or not
2. P-Flag – No-PHP flag, if it set in that case penultimate hop router will not do the PHP
3. E-Flag – No Explicit Null
4. V-Flag – Prefix SID carries absolute value
5. L-Flag – Prefix SID carries index
6. R-Flag – Re-advertisements

People who read this post also read :



No comments: