<?xml version="1.0" encoding="utf-8"?>
<rfc
  xmlns:xi="http://www.w3.org/2001/XInclude"
  category="std"
  docName="draft-li-idr-ipv6-bgp-identifier-00"
  ipr="trust200902"
  obsoletes=""
  updates="4271"
  sortRefs="true"
  submissionType="IETF"
  xml:lang="en"
  version="3">
  <front>
    <title abbrev="BGP Capability for IPv6 BGP Identifier">BGP Capability for IPv6 BGP 
    Identifier</title>
    <seriesInfo name="Internet-Draft" value="draft-li-idr-ipv6-bgp-identifier-00" />
    <author fullname="Zhenqiang Li" initials="Z" role="editor" surname="Li">
      <organization>China Mobile</organization>
      <address>
        <postal>
          <country>CN</country>
        </postal>
        <email>lizhenqiang@chinamobile.com</email>
      </address>
    </author>
    <author fullname="Guangchen Song" initials="G" role="editor" surname="Song">
      <organization>China Mobile</organization>
      <address>
        <postal>
          <country>CN</country>
        </postal>
        <email>songguangchenjc@chinamobile.com</email>
      </address>
    </author>

    <date year="2026" />
    <area>Routing</area>
    <workgroup>Inter-Domain Routing</workgroup>
    <keyword>BGP</keyword>
    <keyword>BGP Identifier</keyword>
    <keyword>Capability</keyword>
    <abstract>
      <t>This document defines a new BGP Capability that enables an IPv6 BGP 
      Speaker to use its global unicast IPv6 address as its BGP Identifier. This mechanism 
      simplifies configuration in IPv6-only networks by leveraging the 
      inherent uniqueness of IPv6 addresses, while maintaining full backward 
      compatibility with existing BGP implementations.
	  </t>
      
    </abstract>
  </front>
  <middle>
    <section numbered="true" toc="default">
      <name>Introduction</name>
      <t>A router that runs the Border Gateway Protocol (BGP) <xref target="RFC4271" /> is referred to as 
      a BGP Speaker, and each BGP Speaker is uniquely identified by a BGP 
      Identifier (BGP ID). The BGP ID is a critical parameter in the BGP protocol, 
      used for establishing peering sessions, resolving connection collisions, 
      and participating in best-path selection.
      </t>
      
      <t><xref target="RFC4271" /> specifies that the BGP ID is a 4-byte unsigned integer 
      and should be configured as a valid IPv4 address assigned to one of the BGP 
      Speaker's interfaces. However, in IPv6-only network environments, devices are 
      typically not configured with any IPv4 addresses, making it impossible to fulfill 
      this requirement and thereby preventing BGP from operating correctly.
      </t>
      
      <t><xref target="RFC6286" /> addresses this limitation by allowing the BGP ID 
      to be any 4-byte unsigned integer, independent of interface addresses. 
      Nevertheless, in IPv6-only deployments, operators must still manually assign 
      a unique 4-byte BGP ID to each BGP Speaker and ensure that all BGP IDs within 
      the same Autonomous System (AS) are distinct. This imposes additional operational 
      complexity, particularly in large-scale or automated network scenarios.
      </t>
      
      <t><xref target="RFC5492" /> defines an Optional Parameter called Capabilities, 
      which facilitates the introduction of new capabilities into the 
      Border Gateway Protocol (BGP) by providing a graceful capability advertisement 
      mechanism—eliminating the need to terminate BGP peering sessions 
      when new capabilities are introduced.
      </t>
      
      <t>This document proposes an operationally friendly solution for IPv6-only 
      networks: allowing a BGP Speaker to use one of its own global unicast IPv6 
      addresses as its BGP Identifier, referred to as the IPv6 BGP ID. To this end, 
      a new BGP Capability is defined. 
      </t>
      
      <t>The solution proposed in this document fully preserves compatibility with 
      existing BGP implementations. The IPv6 BGP ID is used only between BGP Speakers 
      that establish a BGP session over IPv6 and mutually support the new capability. 
      Peers that do not support this capability will ignore the new option and continue 
      to operate using the traditional 4-byte BGP Identifier as specified in 
      <xref target="RFC4271" /> and <xref target="RFC6286" />.
      </t>
      

      <section numbered="true" toc="default">
        <name>Requirements Language</name>
        <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>
    
    
    <section numbered="true" toc="default">
      <name>IPv6 BGP Identifier</name>
      <t>This document defines a new BGP capability, the IPv6 BGP Identifier 
      (IPv6 BGP ID). An IPv6 BGP Speaker advertises its support for the IPv6 BGP ID 
      to its peer by including this capability in the Optional Parameters of 
      the BGP OPEN message. 
      </t>
      
      <t><xref target="RFC4271" /> specifies the format of the OPEN message as follows:</t>
      <figure>
        <name>OPEN message</name>
        <artwork align="center"><![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
+-+-+-+-+-+-+-+-+-+
|     Version     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       My Autonomous System      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             Hold Time           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       BGP Identifier                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  opt Parm Len   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                Optional Parameters(variable)                  |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
           ]]></artwork>
      </figure>
      
      <t>The Optional Parameters field, as shown below, contains a list of optional parameters.</t>
      <figure>
        <name>Optional Parameters</name>
        <artwork align="center"><![CDATA[                                                                         
 0                   1          
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+...
|    Parm. Type   |  Parm. Length |  Parameter Value (variable)
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+...
           ]]></artwork>
      </figure>
      
      <t><xref target="RFC5492" /> defines the Capabilities Optional Parameter with Parameter Type 2. This parameter contains one or more triples &lt;Capability Code, Capability Length, Capability Value&gt;, where each triple is encoded as shown below:</t>
      <figure>
        <name>Capabilities Optional Parameter</name>
        <artwork align="center"><![CDATA[                                                                         
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    Capability Code (1 octet)    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   Capability Length (1 octet)   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   Capability Value (variable)   |
～                                ～
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
           ]]></artwork>
      </figure>
           
      <t>The IPv6 BGP Identifier defined in this document is encapsulated in one triple of the Capabilities Optional Parameter, as shown below.</t>
      
	  <ul empty="true">
		  <li>Capability Code：</li>	
		  <li>1 octet. The specific value will be assigned by IANA and is used to indicate that this capability option represents the IPv6 BGP Identifier capability.</li>
			
		  <li>Capability Length: </li>
		  <li>1 octet. It has a value of 16, indicating that the Capability Value is 16 bytes (the IPv6 BGP Identifier).</li>
			
		  <li>Capability Value: </li>
		  <li>16 octets. This field contains the global unicast IPv6 address of the BGP Speaker that is used as its BGP Identifier.</li>
 	  </ul>

	  <t>In an OPEN message carrying the IPv6 BGP Identifier, the BGP Identifier field MUST be set to all zeros to indicate that the actual BGP Identifier is carried within the Capabilities Optional Parameter. </t>
    </section>
    
    
    <section numbered="true" toc="default">
      <name>Open Message Processing</name>    
      <section numbered="true" toc="default">
      	<name>Constructing the OPEN Message</name>
      	<t>A BGP Speaker that supports the IPv6 BGP Identifier MUST set the BGP Identifier 
      	field in the OPEN message to zero and include the IPv6 BGP Identifier 
      	defined in this document as a capability option, where the Capability Value 
      	is a global unicast IPv6 address of the BGP Speaker.</t> 
		<t>One and only one IPv6 BGP Identifier SHOULD be carried in the OPEN message.</t>
      </section>
      
      <section numbered="true" toc="default">
      	<name>Receiving the OPEN Message</name>
      	<t>A BGP Speaker that supports the IPv6 BGP Identifier capability MUST examine 
      	the BGP Identifier field in the received OPEN message.</t>
      	
      	<t>If this field is not set to zero, the speaker MUST process the OPEN message 
      	as if the peer does not support the IPv6 BGP Identifier capability. In this case, 
      	any instance of the IPv6 BGP Identifier capability carried in the Capabilities 
      	Optional Parameter MUST be ignored.</t>
      	
      	<t>If the BGP Identifier field is zero, the speaker MUST inspect the Capabilities 
      	Optional Parameter for the presence of the IPv6 BGP Identifier capability defined 
      	in this document. If the capability is absent, the speaker MUST send a 
      	NOTIFICATION message with Error Code 2 (OPEN Message Error) and Error Subcode 3 
      	(Bad BGP Identifier).</t>
      	
      	<t>If the capability is present but the Capability Value does not represent a 
      	valid global unicast IPv6 address, the speaker MUST also send a NOTIFICATION 
      	message with Error Code 2 (OPEN Message Error) and Error Subcode 3 (Bad BGP 
      	Identifier).</t>
      	
      	<t>If the IPv6 BGP Identifier capability is present in the OPEN message and 
      	its Capability Value is a valid global unicast IPv6 address, the BGP speaker 
      	proceeds to evaluate potential connection collision in accordance with 
      	Section 6.8 of <xref target="RFC4271" />, with the following modification:</t>
      	
     	<t>For the purpose of collision resolution, the IPv6 BGP Identifier carried in 
     	the capability (not the 4-byte BGP Identifier field in the OPEN message, 
     	which is zero) is used as the BGP Identifier of the peer. The local system MUST 
     	compare its own IPv6 BGP Identifier with that of the remote peer. 
     	Each IPv6 BGP Identifier SHALL be interpreted as a 128-bit unsigned integer 
     	in host byte order. The connection initiated by the BGP speaker with the 
     	numerically larger IPv6 BGP Identifier MUST be retained.</t>
     	
		<t>If the OPEN message contains more than one IPv6 BGP Identifier, it MUST be treated as malformed. The speaker MUST send a NOTIFICATION 
      	message with Error Code 2 (OPEN Message Error) and Error Subcode 3 (Bad BGP Identifier) to its peer.</t>

     	<t>The format of the NOTIFICATION message follows the definition in Section 4.5 
     	of RFC <xref target="RFC4271" />.</t>
     	
      </section>
    </section>
      
      <section numbered="true" toc="default">
      	<name>AGGREGATOR Attribute Processing</name>
		<t>Since the BGP Identifier is also used in the AGGREGATOR path attribute of the BGP protocol, this document extends that attribute accordingly. </t>
      	<t>A BGP Speaker that supports the IPv6 BGP Identifier SHALL include its AS number and IP address in the attribute, and the included IP address SHOULD be identical 
      	to the speaker's IPv6 BGP Identifier.</t>	
      </section>
      
      <section numbered="true" toc="default">
      	<name>Route Decision Process</name>
      	<t>For a BGP speaker that supports the IPv6 BGP Identifier, the same route decision process defined in <xref target="RFC4271" /> applies, with the following extension to step f of the Phase 2 tie‑breaking procedure specified in Section 9.1.2.2 of <xref target="RFC4271" />.</t> 

		<t >f) Remove from consideration all routes other than the route that was advertised by the BGP speaker with the lowest BGP Identifier value.</t>
		<t >If routes are advertised by both IPv4 BGP Speakers and IPv6 BGP Speakers, the routes from IPv6 BGP Speakers are preferred.</t>
		<t >If routes are advertised by multiple IPv6 BGP Speakers, the routes from the Speaker with the numerically smallest IPv6 BGP Identifier are preferred.</t>

      </section>
 

    <section anchor="IANA">
      <!-- All drafts are required to have an IANA considerations section. See RFC 8126 for a
      guide.-->
      <name>IANA Considerations</name>
      <t>IANA is requested to assign new code points from the "BGP Capability Codes" 
      registry for the following capability defined in this document:</t>
	  <table align="center">
		<name>New BGP Capability for IPv6 BGP ID</name>
        <thead>
        <!-- [REPLACE/DELETE] a table header is optional -->
          <tr>
			<th align="left" colspan="1" rowspan="1">Code Point</th>
            <th align="left" colspan="1" rowspan="1">Description</th>
            <th align="left" colspan="1" rowspan="1">Reference</th>
		  </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left" colspan="1" rowspan="1">TBD</td>
            <td align="left" colspan="1" rowspan="1">IPv6 BGP ID</td>
            <td align="left" colspan="1" rowspan="1">This document</td>
          </tr>
        </tbody>
      </table>
    </section>
    <section anchor="Security">
      <!-- All drafts are required to have a security considerations section. See RFC 3552 for a
      guide. -->
      <name>Security Considerations</name>
      <t>This extension to BGP does not introduce new security considerations. BGP security considerations are discussed in <xref target="RFC4271" />.</t>
    </section>
  </middle>
 
 <back>
    <references>   
        <name>Normative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml" />
		<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4271.xml" />
		<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5492.xml" />
		<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6286.xml" />
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml" />
         <!--?rfc include='reference.I-D.ietf-idr-flowspec-redirect-ip'?-->
		<!-- The recommended and simplest way to include a well known reference -->
    </references>
	
    <section anchor="Acknowledgements" numbered="false">
      <name>Acknowledgements</name>
      <t>The authors would like to acknowledge the supports from Cheng Chang, Bo Liu.</t>
    </section>
  </back>
</rfc>
