Segment Routing Group Handling:


SR GroupKey data model

Segment Routing application interacts with the Group subsystem using the below SR specific GroupKey. SR application associate a SRDefaultGroupKey or SRPolicyGroupKey for every group it creates. The SRDefaultGroupKey is just a collection of Neighbors + the single label to be pushed in all the buckets of the group. The SRPolicyGroupKey consists of collection of <PortNumber + Label Stack to be pushed on that port> where leftmost label representing the outermost label and rightmost label representing innermost label to be pushed.

 

For e.g. a default ECMP group with two buckets pushing label L1 and output to two ports P1 and P2 where neighbor N2 is connected through P1 and N3 is connected through P2. The GroupKey for such a group will be represented with a SRDefaultGroupKey {{N2, N3}, L1}. 


Default Group Handling

For every new device detected where the current controller instance is a MASTER (Either first time device connected or MASTER-SHIP changes), the SR application would initiate default group handling procedures for that device.

 

Policy Group Handler & Recovery

While creating the tunnel, ensure all the stitched groups are created before creating the Group chain in the ingress router

Similarly, while deleting the tunnel, ensure the group is deleted at ingress router before deleting any stitched groups

Group Event Handling