To implement the X-AF routing technique described in this document, OSPFv2 will advertise the Node IPv6 Local Address sub-TLV and OSPFv3 will advertise the Node IPv4 Local Address sub-TLV, possibly in addition to advertising other IP addresses as documented by [RFC 5786
Multiple instances of OSPFv3 are needed if it is used for both IPv4 and IPv6 [RFC 5838
]. The operation in this section is described with OSPFv2 as the protocol used for IPv4; that is the most common case. The case of OSPFv3 being used for IPv4 follows the same procedure as what is indicated for OSPFv2 below.
On a node that implements X-AF routing, each OSPF instance advertises, using the Node Local Address sub-TLV, all X-AF IPv6 (for OSPFv2 instance) or IPv4 (for OSPFv3) addresses local to the router that can be used by the Constrained Shortest Path First (CSPF) to calculate MPLS TE LSPs:
The OSPF instance MUST advertise the IP address listed in the Router Address TLV [RFC 3630] [RFC 5329] of the X-AF instance maintaining the TE database.
The OSPF instance SHOULD include additional local addresses advertised by the X-AF OSPF instance in its Node Local Address sub-TLVs.
An implementation MAY advertise other local X-AF addresses.
When TE information is advertised in an OSPF instance, both natively (i.e., as per RFC [RFC 3630
] or [RFC 5329
]) and as X-AF Node Attribute TLV, it is left to local configuration to determine which TE database is used to compute routes for the OSPF instance.
On Area Border Routers (ABRs), each advertised X-AF IP address MUST
be advertised into, at most, one area. If OSPFv2 and OSPFv3 ABRs coincide (i.e., the areas for all OSPFv2 and OSPFv3 interfaces are the same), then the X-AF addresses MUST
be advertised into the same area in both instances. This allows other ABRs connected to the same set of areas to know with which area to associate computed MPLS TE tunnels.
During the X-AF routing calculation, X-AF IP addresses are used to map locally created LSPs to tail-end routers in the LSDB. The mapping algorithm can be described as:
Walk the list of all MPLS TE tunnels for which the computing router is a head end. For each MPLS TE tunnel T:
If T's destination address is from the same address family as the OSPF instance associated with the LSDB, then the extensions defined in this document do not apply.
Otherwise, it is a X-AF MPLS TE tunnel. Note the tunnel's destination IP address.
Walk the X-AF IP addresses in the LSDBs of all connected areas. If a matching IP address is found, advertised by router R in area A, then mark the tunnel T as belonging to area A and terminating on tail-end router R. Assign the intra-area SPF cost to reach router R within area A as the IGP cost of tunnel T.
After completing this calculation, each TE tunnel is associated with an area and tail-end router in terms of the routing LSDB of the computing OSPF instance and has a cost.
The algorithm described above is to be used only if the Node Local Address sub-TLV includes X-AF information.
Note that, for clarity of description, the mapping algorithm is specified as a single calculation. Implementations may choose to support equivalent mapping functionality without implementing the algorithm as described.
As an example, consider a router in a dual-stack network using OSPFv2 and OSPFv3 for IPv4 and IPv6 routing, respectively. Suppose the OSPFv2 instance is used to propagate MPLS TE information and the router is configured to accept TE LSPs terminating at local addresses 198.51.100.1 and 198.51.100.2. The router advertises in OSPFv2 the IPv4 address 198.51.100.1 in the Router Address TLV, the additional local IPv4 address 198.51.100.2 in the Node IPv4 Local Address sub-TLV, and other TE TLVs as required by [RFC 3630
]. If the OSPFv3 instance in the network is enabled for X-AF TE routing (that is, to use MPLS TE LSPs computed by OSPFv2 for IPv6 routing), then the OSPFv3 instance of the router will advertise the Node IPv4 Local Address sub-TLV listing the local IPv4 addresses 198.51.100.1 and 198.51.100.2. Other routers in the OSPFv3 network will use this information to reliably identify this router as the egress LSR for MPLS TE LSPs terminating at either 198.51.100.1 or 198.51.100.2.