<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" ipr="trust200902" docName="draft-ietf-lsr-algorithm-related-adjacency-sid-08">

<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<front>
	<title abbrev="algo-related adj-sid">Algorithm Related IGP-Adjacency SID Advertisement</title>

	<author initials="Ran" surname="Chen" fullname="Ran Chen">
    <organization>ZTE Corporation</organization>
    <address>
    <postal>
    <street></street>
    <region></region>
    <country>China</country>
    </postal>
    <email>chen.ran@zte.com.cn</email>
    </address>
    </author>
	
	<author initials="Shaofu" surname="Peng" fullname="Shaofu Peng">
    <organization>ZTE Corporation</organization>
    <address>
    <postal>
    <street></street>
    <region></region>
    <country>China</country>
    </postal>
    <email>peng.shaofu@zte.com.cn</email>
    </address>
    </author>

	<author initials="Ketan" surname="Talaulikar" fullname="Ketan Talaulikar">
    <organization>Cisco Systems</organization>
    <address>
    <postal>
    <street></street>
    <region></region>
    <country>India</country>
    </postal>
    <email>ketant.ietf@gmail.com</email>
    </address>
    </author>
	
	<author initials="Peter" surname="Psenak" fullname="Peter Psenak">
    <organization>Cisco Systems</organization>
    <address>
    <postal>
    <street></street>
    <region></region>
    <country>Slovakia</country>
    </postal>
    <email>ppsenak@cisco.com</email>
    </address>
    </author>

	<date year="2025"/>  
	
	<area>Routing</area>
	<workgroup>LSR</workgroup>
	<keyword>Request for Comments</keyword>
	<keyword>RFC</keyword>
	<keyword>Internet Draft</keyword>
	<keyword>I-D</keyword>
	
	<abstract>
	<t> The SR policy architecture defines the Prefix-SID algorithm, with an algorithm identifier included in the Prefix-SID advertisement. However, the Prefix-SID algorithm does not address scenarios where multiple algorithms share the same link resources. This document proposes adding the algorithm identifier in an Adjacency-SID advertisement.
	</t>
	</abstract>
</front>

<middle>
	<section anchor="intro" 
	title="Introduction">
	<t>	
	Segment Routing (SR) architecture <xref target="RFC8402"/> defines the Prefix-SID algorithm, with an algorithm identifier included in the Prefix-SID advertisement.</t>
	
	<t> IGP Flex Algorithm <xref target="RFC9350"/> proposes a 
	solution that allows IGPs themselves to compute	constraint based 
	paths over the network, and it also specifies a way of using Segment
	Routing (SR) Prefix-SIDs and SRv6 locators to steer	packets along 
	the constraint-based paths. It specifies a set of extensions to 
	ISIS, OSPFv2 and OSPFv3 that enable a router to send TLVs that 
	identify (a) calculation-type, (b) specify a metric-type, and (c) 
	describe a set of constraints on the topology, that are to be used 
	to compute the best paths along the constrained topology. A given 
	combination of calculation-type, metric-type, and constraints is 
	known as an FAD (Flexible Algorithm Definition).
	</t>
	
	<t>
	However, an algorithm identifier is often included as part of a 
	Prefix-SID advertisement, that maybe not satisfy some scenarios 
	where multiple algorithm share the same link resource. In addition 
	to Prefix-SID, this document complement that the algorithm 
	identifier can be also included as part of an Adjacency-SID 
	advertisement for SR-MPLS, so that each Flex-algo plane 
	corresponding to different algorithm types can be allocated with a 
	dedicated segment ID related to the corresponding algorithm type.
	</t>
    </section> 

    <section title="Requirements Language">
    <t>
	The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 
	"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
	"OPTIONAL" in this document are to be interpreted as described in 
	BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and 
	only when, they appear in all capitals, as shown here.
	</t>
    </section>

	<section anchor="adj-per-algo-usecases" 
	title="Use Cases">
	<t>
     Typical application scenarios of the algorithm related SID are as follows:
		<list style='symbols'>
		<t>
        A TI-LFA backup path computed in Flex-algo 
		plane may contain Adjacency Segments and require to contain an 
		algorithm-aware Adjacency-SID, which can not only steer the 
		traffic towards the link, but also distinguish traffic between 
		different algorithms. Benefit from this, for the protected 
		Adjacency-SID which belongs to a TI-LFA path within specific 
		Flex-algo plane, the backup path of such Adjacency-SID can 
		continue to follow the algorithm specific constraints that is 
		consistent with the primary path.
		</t>
		<t>
		Help enhance PHBs (per hop 
		behavior) related to specific algorithm types on the data 
		plane. Generally, QoS policies related to the algorithm type of 
		each Flex-algo plane can be configured and installed, and the 
		packets can be forwarded based one the algorithm related SID and
		QoS policy.
		</t>
		<t>
		Help enhance OAM related to 
		specific algorithm types on the control plane and data plane, 
		such as statistics of traffic of different algorithms on the 
		same link, ping/traceroute detection (or other tools) for 
		specific algorithm.
		</t>
		</list>
	</t>
	</section>
	
	<section anchor="adj-per-algo-encode" 
	title="Adjacency Segment Identifier(SID) per Algorithm">
	<t>
	This section describe that the algorithm related SID is 
	flooded through the IGP protocol.
	</t>
	
	<section anchor="isis-adj-per-algo-encode" 
	title="ISIS Adjacency Segment Identifier per Algorithm">
	<t>
	<xref target="RFC8667"/> describes the IS-IS extensions that need to
	be introduced for Segment Routing operating on an MPLS data plane. 
	It defined Adjacency Segment Identifier (Adj-SID) sub-TLV advertised
	with TLV-22/222/23/223/141, and Adjacency Segment Identifier
	(LAN-Adj-SID) Sub-TLV advetised with TLV-22/222/23/223. Accordingly,
	this document defines two new optional Sub-TLVs, "ISIS Adjacency-SID
	per Algorithm Sub-TLV" and "ISIS LAN Adjacency-SID per Algorithm 
	Sub-TLV", which contain the algorithm type fields.
	</t>
	
	<section anchor="isis-adj-per-algo-tlv" 
	title="ISIS Adjacency-SID per Algorithm Sub-TLV">	
	<t>
	ISIS Adjacency-SID per Algorithm Sub-TLV has the following format:
	<figure align="left" anchor="isis-adj-per-algo-format" 
	title="ISIS Adjacency-SID per Algorithm Format">
    <artwork><![CDATA[    
     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     |     Weight    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |   Algorithm   |  
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   
   |                         SID/Label/Index (variable)            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   ]]></artwork>
	</figure>
	</t>
	
	<t>
	where:
	</t>	
	<t>
	Type: TBD1.
	</t>
	<t>
	Length: 6 or 7 depending on size of the SID.
	</t>
	<t>
	Flags: Refer to Adjacency Segment Identifier (Adj-SID) sub-TLV.
	</t>	
	<t>
	Weight: Refer to Adjacency Segment Identifier (Adj-SID) sub-TLV.
	</t>
	<t>
	Algorithm: The Algorithm field contains the identifier of the 
	algorithm the router uses to apply algorithm specific treatment 
	configured on the adjacency.
	</t>		
	<t>
	SID/Label/Index: Refer to Adjacency Segment Identifier (Adj-SID) 
	sub-TLV.
	</t>
	<t>
	For a P2P link, an SR-capable router MAY allocate different 
	Adjacency-SIDs for different algorithms, if this link participates 
	in the plane related to different algorithms.
	</t>
	</section>
	
	<section anchor="isis-lan-adj-per-algo-tlv" 
	title="ISIS LAN Adjacency-SID per Algorithm Sub-TLV">	
	<t>
	ISIS LAN Adjacency-SID per Algorithm Sub-TLV has the following 
	format:
	<figure align="left" anchor="isis-lan-adj-per-algo-format" 
	title="ISIS LAN Adjacency-SID per Algorithm Format">
    <artwork><![CDATA[    
    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    |    Weight     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |   Algorithm   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                  Neighbor System-ID (ID length octets)        |
   +                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                   SID/Label/Index (variable)                  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   ]]></artwork>
	</figure>
	</t>
	
	<t>
	where:
	</t>
	<t>
	Type: TBD2.
	</t>
	<t>
	Length: Variable.
	</t>
	<t>
	Flags: Refer to Adjacency Segment Identifier (LAN-Adj-SID) Sub-TLV.
	</t>	
	<t>
	Weight: Refer to Adjacency Segment Identifier (LAN-Adj-SID) Sub-TLV.
	</t>
	<t>
	Algorithm: The Algorithm field contains the identifier of the 
	algorithm the router uses to apply algorithm specific treatment 
	configured on the adjacency.
	</t>		
	<t>
	SID/Label/Index: Refer to Adjacency Segment Identifier (LAN-Adj-SID)
	Sub-TLV.
	</t>
	<t>
	For a broadcast link, an SR-capable router MAY allocate different 
	Adjacency-SIDs for different algorithms, if this link participates 
	in the plane related to different algorithms.
	</t>
	</section>
	</section>	

	<section anchor="ospf-adj-per-algo-encode" 
	title="OSPFv2 Adjacency Segment Identifier per Algorithm">
	<t>
	<xref target="RFC8665"/> describes the OSPFv2 extensions that need 
	to be introduced for Segment Routing operating on an MPLS data 
	plane. It defined Adj-SID Sub-TLV and LAN Adj-SID Sub-TLV advertised
	with Extended Link TLV defined in <xref target="RFC7684"/>. 
	Accordingly, this document defines two new optional Sub-TLVs, 
	"OSPFv2 Adjacency-SID per Algorithm Sub-TLV" and "OSPFv2 LAN 
	Adjacency-SID per Algorithm Sub-TLV", which contain the algorithm type fields.
	</t>
	
	<section anchor="ospf-adj-algo-tlv" 
	title="OSPFv2 Adjacency-SID per Algorithm Sub-TLV">	
	<t>OSPFv2 Adjacency-SID per Algorithm Sub-TLV has the following 
	format:
	<figure align="left" anchor="ospf-adj-algo-format" 
	title="OSPFv2 Adjacency-SID per Algorithm Format">
    <artwork><![CDATA[    
    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   |     MT-ID     |  Weight       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                   SID/Label/Index (variable)                  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   ]]></artwork>
	</figure>
	</t>
	
	<t>
	where:
	</t>
	<t>
	Type: TBD3
	</t>
	<t>
	Length: 7 or 8 octets, depending on the V-Flag.
	</t>
	<t>
	Flags: Refer to OSPFv2 Adj-SID Sub-TLV.
	</t>
	<t>
	Algorithm: The Algorithm field contains the identifier of the 
	algorithm the router uses to apply algorithm specific treatment 
	configured on the adjacency.
	</t>
	<t>
	MT-ID: Refer to OSPFv2 Adj-SID Sub-TLV.
	</t>
	<t>
	Weight: Refer to OSPFv2 Adj-SID Sub-TLV.
	</t>
	<t>
	SID/Index/Label: Refer to OSPFv2 Adj-SID Sub-TLV.
	</t>
	<t>
	For a P2P link, an SR-capable router MAY allocate different 
	Adjacency-SIDs for different algorithms, if this link participates 
	in the plane related to different algorithms.
	</t>
	</section>
	
	<section anchor="ospf-lan-adj-algo-tlv" 
	title="OSPFv2 LAN Adjacency-SID per Algorithm Sub-TLV">	
	<t>OSPFv2 LAN Adjacency-SID per Algorithm Sub-TLV has the following 
	format:
	<figure align="left" anchor="ospf-lan-adj-algo-format" 
	title="OSPFv2 LAN Adjacency-SID per Algorithm Format">
    <artwork><![CDATA[    
    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   |     MT-ID     |    Weight     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                        Neighbor ID                            |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                    SID/Label/Index (variable)                 |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   ]]></artwork>
	</figure>
	</t>
	
	<t>
	where:
	</t>
	<t>
	Type: TBD4
	</t>
	<t>
	Length: 11 or 12 octets, depending on the V-Flag.
	</t>
	<t>
	Flags: Refer to OSPFv2 LAN Adjacency-SID Sub-TLV.
	</t>
	<t>
	Algorithm: The Algorithm field contains the identifier of the 
	algorithm the router uses to apply algorithm specific treatment 
	configured on the adjacency.
	</t>
	<t>
	MT-ID: Refer to OSPFv2 LAN Adj-SID Sub-TLV.
	</t>
	<t>
	Weight: Refer to OSPFv2 LAN Adj-SID Sub-TLV.
	</t>
	<t>
	Neighbor ID: Refer to OSPFv2 LAN Adj-SID Sub-TLV.
	</t>
	<t>
	SID/Index/Label: Refer to OSPFv2 LAN Adj-SID Sub-TLV.
	</t>	
	<t>
	For a broadcast link, an SR-capable router MAY allocate different 
	Adjacency-SIDs for different algorithms, if this link participates 
	in the plane related to different algorithms.
	</t>
	</section>
	</section>

	<section anchor="ospfv3-adj-per-algo-encode" 
	title="OSPFv3 Adjacency Segment Identifier per Algorithm">
	<t>
	<xref target="RFC8666"/> describes the OSPFv3 extensions that need 
	to be introduced for Segment Routing operating on an MPLS data 
	plane. It defined Adj-SID Sub-TLV and LAN Adj-SID Sub-TLV advertised
	with Router-Link TLV as defined in <xref target="RFC8362"/>. 
	Accordingly, this document defines two new optional Sub-TLVs, 
	"OSPFv3 Adjacency-SID per Algorithm Sub-TLV" and "OSPFv3 LAN 
	Adjacency-SID per Algorithm Sub-TLV", which contain the algorithm type fields.
	</t>
	
	<section anchor="ospfv3-adj-algo-tlv" 
	title="OSPFv3 Adjacency-SID per Algorithm Sub-TLV">	
	<t>OSPFv3 Adjacency-SID per Algorithm Sub-TLV has the following 
	format:
	<figure align="left" anchor="ospfv3-adj-algo-format" 
	title="OSPFv3 Adjacency-SID per Algorithm Format">
    <artwork><![CDATA[    
    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     |     Weight    |   Algorithm   |   Reserved    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                   SID/Label/Index (variable)                  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   ]]></artwork>
	</figure>
	</t>
	<t>
	where:
	</t>
	<t>
	Type: TBD5
	</t>
	<t>
	Length: 7 or 8 octets, depending on the V-Flag.
	</t>
	<t>
	Flags: Refer to OSPFv3 Adj-SID Sub-TLV.
	</t>
	<t>
	Weight: Refer to OSPFv3 Adj-SID Sub-TLV.
	</t>
	<t>
	Algorithm: The Algorithm field contains the identifier of the 
	algorithm the router uses to apply algorithm specific treatment 
	configured on the adjacency.
	</t>
	<t>
	Reserved: SHOULD be set to 0 on transmission and MUST be ignored on 
	reception.
	</t>
	<t>
	SID/Index/Label: Refer to OSPFv3 Adj-SID Sub-TLV.
	</t>	
	<t>
	For a P2P link, an SR-capable router MAY allocate different 
	Adjacency-SIDs for different algorithms, if this link participates 
	in the plane related to different algorithms.
	</t>
	</section>
	
	<section anchor="ospfv3-lan-adj-algo-tlv" 
	title="OSPFv3 LAN Adjacency-SID per Algorithm Sub-TLV">	
	<t>OSPFv3 LAN Adjacency-SID per Algorithm Sub-TLV has the following 
	format:
	<figure align="left" anchor="ospfv3-lan-adj-algo-format" 
	title="OSPFv3 LAN Adjacency-SID per Algorithm Format">
    <artwork><![CDATA[    
    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     |     Weight    |   Algorithm   |   Reserved    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                           Neighbor ID                         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                    SID/Label/Index (variable)                 |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   ]]></artwork>
	</figure>
	</t>
	
	<t>
	where:
	</t>
	<t>
	Type: TBD6
	</t>
	<t>
	Length: 11 or 12 octets, depending on the V-Flag.
	</t>
	<t>
	Flags: Refer to OSPFv3 LAN Adj-SID Sub-TLV.
	</t>
	<t>
	Weight: Refer to OSPFv3 LAN Adj-SID Sub-TLV.
	</t>
	<t>
	Algorithm: The Algorithm field contains the identifier of the 
	algorithm the router uses to apply algorithm specific treatment 
	configured on the adjacency.
	</t>
	<t>
	Reserved: SHOULD be set to 0 on transmission and MUST be ignored on 
	reception.
	</t>
	<t>
	Neighbor ID: Refer to OSPFv3 LAN Adj-SID Sub-TLV.
	</t>
	<t>
	SID/Index/Label: Refer to OSPFv3 LAN Adj-SID Sub-TLV.
	</t>	
	<t>
	For a broadcast link, an SR-capable router MAY allocate different 
	Adjacency-SIDs for different algorithms, if this link participates 
	in the plane related to different algorithms.
	</t>
	</section>
	</section>	
    </section>	
	
	<section anchor="proc" 
	title="Procedures">
	<t>The method introduced in this document enables the traffic of 
	different flex-algo plane to be distinguished when they are routed 
	on the same link, and can be applied with different local treatment 
	(such as providing different repair paths, traffic statistics, QoS 
	policies, etc) per algorithm.
	</t>
	

	<t>
	A node may, according to each flex-algo plane (corresponding to the 
	specific algorithm types) which it participated in, allocate segment 
	identifiers corresponding to each algorithm types, and these 
	segment identifiers need to be flooded through IGP. As defined in 
	<xref target="adj-per-algo-encode"/>, algorithm field must be 
	encoded in the flooded packet.
	</t>
		
	<t>
    Depending on implementation, SIDs allocation is generally triggered 
	by configuration. For algorithm specific Adjacency-SID, one of the 
	difficulties is that during this configuration phase it is not 
	straightforward for a link to be included in an Flex-algo plane, as 
	this can only be determined after all nodes in the network have 
	negotiated the FAD. Note that Node-SID per algorithm may also face 
	similar difficulties (considering the abnormal situation where nodes
	have to stop participating in the flex-algo plane after FAD 
	negotiation, referring to section 5.3 of <xref target="RFC9350"/>). 
	</t>
	
	<t>
	Developers can flexibly refer to any of the following implementation
	choices.
	</t>
		<list style='symbols'>
		<t>
		One choice is that as long as an IGP instance with an algorithm 
		enabled for a level/area is configured on the node, the node may
		allocate Adjacency-SIDs for that algorithm statically for all 
		links joined to that level/area. Similar way may be also applied
		to node-SID per algorithm. That is, algorithm specific SID can 
		be allocated regardless of the felx-algo participation and 
		wining FAD. If the router stops participating, or the link is 
		excluded from the flex-algo, the advertised algorithm specific 
		SID does not cause any issue, but is just not used.
		</t>
	
		<t>
		Another choice is to allocate and withdraw algorithm specific 
		Adjacency-SID dynamically according to the result of FAD 
		negotiation, i.e., algorithm specific Adjacency-SID is allocated
		and advertised only for those links that have joined the 
		Flex-algo plane. Similar choice may be also applied to node-SID 
		per algorithm. This choice is RECOMMENDED.
		</t>
		</list>
	
	<t>
	The RECOMMENDED implementation choice also make sense for other type
	of states per algorithm. A node may, according to each flex-algo 
	plane (corresponding to the specific algorithm types) which it 
	participated in, config local treatments (such as repair paths, 
	traffic statistics counters, QoS policies, etc) corresponding to 
	each algorithm types and apply them to the links that participated 
	in the corresponding flex-algo plane. In this case, the node may 
	dynamically create or delete these local treatments according to the
	result of FAD negotiation. 
	</t>
	
	<t>
	The (LAN) Adjacency-SID per Algorithm Sub-TLV MUST NOT be used to 
	advertise algorithm 0 specific SIDs.
	</t>
	
	<t>
	Note that the advertisement specification defined in 
	<xref target="adj-per-algo-encode"/> does not have any requirements 
	for	the SID allocation rules. Some particular advertisement method 
	based on particular allocation rules are not within the scope of 
	this document.
	</t>

	<t>
	Once the node originates an algorithm specific Adjacency-SID and 
	sends it to the network, the coresponding local SID entry (i.e., an 
	MPLS label forwarding entry) must be installed on the fowarding 
	plane. The local SID entry, combined with local treatments (such as 
	QoS polices), are used to continue to forward data packets in the 
	context of the specific algorithm. 
	</t>
	
	<t>
	A node may receive different algo-SIDs (corresponding to different 
	algorithm types with the related flex-algo plane) originated from 
	other nodes and flooded by IGP. As defined in 
	<xref target="adj-per-algo-encode"/>, the algorithm field can be 
	gotten from the flooded packet to indicate algorithm specific SIDs. 
	Then, algo-SIDs, with other SIDs, are maintained in the link state 
	database.
	</t>	
	
	<t>
	If the received algorithm is not within the range (128,255), the 
	related (LAN) Adjacency-SID per Algorithm Sub-TLV MUST be ingored.
	</t>
		
	<t>
	When a node receives a forwarding data packet whose active segment 
	is an algorithm specific Adjacency-SID and matches the coresponding 
	local SID entry, the node forwards the data packet to the 
	corresponding outgoing port and applies algorithm related local 
	treatments (such as QoS policies) to the packet. The local 
	treatments may also be applied for the case of algorithm specific 
	Node-SID.
	</t>
	
	<section anchor="examples" 
	title="Examples of Algorithm Specific Adjacency-SID">	
	<t>
	The following figure shows an example of algorithm specific 
	Adjacency-SID.
	<figure align="center" anchor="fa-enhance" 
	title="Flex-algo LFA Path with Algorithm Specific Adjacency-SID">
    <artwork><![CDATA[    
        [S1]--------[D]--------[S2]
         |           |          |
         |           |          |
         |           |          |
        [A]---------[B]--------[C]
    ]]></artwork>
	</figure>
	
	Suppose that node S1, A, B, D and their inter-connected links 
	belongs to FA-id 128 plane, and S2, B, C, D and their 
	inter-connected links belongs to FA-id 129 plane. The IGP metric of 
	link B-D is 100, and all other links have IGP metric 1. Both FA-id 
	128 and 129 use IGP default metric type for path calculation. In 
	FA-id 128 plane, from S1 to destination D, the primary path is S1-D,
	and the TI-LFA backup path is segment list {node(B), 
	adjacency(B-D)}. Similarly, In FA-id 129 plane, from S2 to 
	destination D, the primary path is S2-D, and the TI-LFA backup path 
	is segment list {node(B), adjacency(B-D)}. The above TI-LFA path of 
	FA-id 128 plane can be translated to {node-SID(B)@FA-id128, 
	adjacency-SID(B-D)@FA-id128}, and TI-LFA path of FA-id 129 plane 
	will be translated to {node-SID(B)@FA-id129, 
	adjacency-SID(B-D)@FA-id129}. So that node B can distinguish the 
	flows of FA-id 128 and FA-id 129 based on different 
	adjacency-SID(B-D) and their related label forwarding entries, and 
	take different treatments of them when they are forwarded to the 
	same outgoing link B-D.
	</t>	
	</section>
	</section>
	
	<section anchor="deployments" 
	title="Deployment Considerations">
	<t>
	When multiple flex-algos are deployed in the network and they share 
	the same link, multiple algorithm specific Adjacency-SIDs may need 
	to be allocated on such a link, to distinguish the traffic of 
	different algorithms and provide possible different treatment.
	</t>
	
	<t>
	Even if a link is only used by a single flex-algo, because the link 
	always belongs to algorithm 0 by default, both the traditional 
	Adjacency-SID (termd as adj-sid@algo-0) and the algorithm specific 
	Adjacency-SID (termd as adj-sid@algo-x) may need to be allocated on 
	that link, so that the potentional repair paths of the two 
	Adjacency-SIDs can be distinguished.
	</t>
	
	<t>
	If the topology of multiple flex-algo planes, and physical topology,
	are isomorphic, that is, they contain the same nodes and same 
	inter-connected links, but due to the differences between these 
	FADs (such as different metric types), different repair paths will 
	also be calculated on the same topology. Therefore, multiple 
	algorithm specific Adjacency-SIDs may still need to be provided on 
	the same link.
	</t>
	
	<t>
	It is not recommended to bind a link to algorithm 1 (Strict SPF) and
	allocate adj-sid@algo-1. Such Adjacency-SID is no useful.
	</t>
	
	<t>
	The operator may configure the policy on the node to turn off the 
	algorithm specific processing capability for each algorithm, and the
	node will not allocate algorithm specific Adjacency-SIDs on the 
	links those joined to the flex-algo plane, this is a local behavior.
	As mentioned before, the algorithm specific processing capability 
	can be further subdivided into repair path per algorithm, statistics
	per algorithm, QoS policy per algorithm, etc. Assuming that a node 
	wants to support the capability of repair path per algorithm, in 
	this case, for an individual link, it is also controlled by the 
	adjacency backup capability. When adjacency backup is disabled, it 
	will let the capablitiy of repair path per algorithm be also 
	invalid, so the link does not need to allocate algorithm specific 
	Adjacency-SIDs.
	</t>
	
	<t>
	In any case, when instantiate a segment list (such as a TI-LFA path)
	within a specific flex-algo plane, for each Adjacency Segment of 
	that list, if it has a corresponding algorithm specific 
	Adjacency-SID, the algorithm specific Adjacency-SID MUST be used to 
	construct SID list; if it has not, traditional Adjacency-SID can be 
	used.
	</t>	
	</section>
	
	<section anchor="iana-consider" 
	title="IANA Considerations">
	<section anchor="iana-isis" 
	title="IANA ISIS Considerations">
	<t>
	This document makes the following registrations in the "Sub-TLVs for
	TLV 22, 23, 25, 141, 222, and 223" registry.
	<figure align="left">
    <artwork><![CDATA[    
   +------+--------------------+----+----+----+-----+-----+-----+
   | Type | Description        | 22 | 23 | 25 | 141 | 222 | 223 |
   +======+====================+====+====+====+=====+=====+=====+
   |      | Adjacency-SID per  |    |    |    |     |     |     |
   | TBD1 | Algorithm          | y  | y  | n  |  y  |  y  |  y  |
   +------+--------------------+----+----+----+-----+-----+-----+
   |      | LAN Adjacency-SID  |    |    |    |     |     |     |
   | TBD2 | per Algorithm      | y  | y  | n  |  y  |  y  |  y  |
   +------+--------------------+----+----+----+-----+-----+-----+
   ]]></artwork>
	</figure>		
	</t>	
	</section>
	
	<section anchor="iana-ospfv2" 
	title="IANA OSPFv2 Considerations">
	<t>
	This document makes the following registrations in the OSPFv2 
	Extended Link TLV Sub-TLVs Registry.
	<figure align="left">
    <artwork><![CDATA[    
   +-------+------------------------------------+---------------+
   | Value | Description                        | Reference     |
   +=======+====================================+===============+
   | TBD3  | OSPFv2 Adjacency-SID               | This document |
   |       | per Algorithm Sub-TLV              |               |
   +-------+------------------------------------+---------------+
   | TBD4  | OSPFv2 LAN Adjacency-SID           | This document |
   |       | per Algorithm Sub-TLV              |               |
   +-------+------------------------------------+---------------+
   ]]></artwork>
	</figure>		
	</t>	
	</section>	
	
	<section anchor="iana-ospfv3" 
	title="IANA OSPFv3 Considerations">
	<t>This document makes the following registrations in the "OSPFv3 
	Extended-LSA Sub-TLVs" Registry.
	<figure align="left">
    <artwork><![CDATA[    
   +-------+------------------------------------+---------------+
   | Value | Description                        | Reference     |
   +=======+====================================+===============+
   | TBD5  | OSPFv3 Adjacency-SID               | This document |
   |       | per Algorithm Sub-TLV              |               |
   +-------+------------------------------------+---------------+
   | TBD6  | OSPFv3 LAN Adjacency-SID           | This document |
   |       | per Algorithm Sub-TLV              |               |
   +-------+------------------------------------+---------------+
   ]]></artwork>
	</figure>		
	</t>	
	</section>		
	
	</section>
     
    <section anchor="security" 
	title="Security Considerations">
    <t>
	There are no new security issues introduced by the extensions in 
	this document. Refer to <xref target="RFC8665"/>, 
	<xref target="RFC8666"/>, <xref target="RFC8667"/> for other 
	security considerations.
	</t>
    </section>
     
    <section title="Acknowledgements">
    <t>We would like to thank Aijun Wang, Robert Raszuk, Gyan Mishra, 
	Jie Dong and Xuesong Geng for their reviews and discussions to the 
	content of this document.
	</t>  
    </section>
	
	<section title="Contributors">
    <t>
	The following people gave a substantial contribution to the content 
	of this document.
	</t>  
    <figure align="left">
    <artwork><![CDATA[
Les Ginsberg
Cisco Systems, Inc.
United States of America
Email: ginsberg@cisco.com
    ]]></artwork>
    </figure>
    </section>

</middle>
  
<back>
    <references title="Normative References">
	<?rfc include="reference.RFC.2119"?>
	<?rfc include="reference.RFC.7684"?>
	<?rfc include="reference.RFC.8174"?>
	<?rfc include="reference.RFC.8362"?>
	<?rfc include="reference.RFC.8402"?>
	<?rfc include="reference.RFC.8665"?>
	<?rfc include="reference.RFC.8666"?>
	<?rfc include="reference.RFC.8667"?>
	<?rfc include="reference.RFC.9350"?>
	</references>
   
    <!--
    <references title="Informative References">

    </references>
	-->
	
</back>
</rfc>
