OSPF for SR-MPLS

SR-MPLS uses an IGP to advertise topology information, prefix information, a segment routing global block (SRGB), and label information. To complete the preceding functions, the IGP extends some TLVs of protocol packets. OSPF mainly defines sub-TLVs for SID and NE SR-MPLS capabilities. Table 1 describes TLVs of the OSPF SR-MPLS extension.
Table 1 TLVs of the OSPF SR-MPLS extension

Type

Item

Function

Position

TLV

SR-Algorithm TLV

Advertises the used algorithm.

Type 10 Opaque LSA

SID/Label Range TLV

Advertises the SR-MPLS SID or MPLS label scope.

Type 10 Opaque LSA

SRMS Preference TLV

Advertises the priority of SR mapping server as which a local NE functions

Type 10 Opaque LSA

Sub-TLV

SID/Label Sub-TLV

Advertises SR-MPLS SIDs or MPLS labels.

  • SID/Label Range TLV
  • OSPFv2 Extended Prefix Opaque LSA's OSPFv2 Extended Prefix TLV and OSPF Extended Prefix Range TLV
  • OSPFv2 Extended Link Opaque LSA's OSPFv2 Extended Link TLV

Prefix SID Sub-TLV

Advertises the SR-MPLS prefix SID.

OSPFv2 Extended Prefix Opaque LSA's OSPFv2 Extended Prefix TLV and OSPF Extended Prefix Range TLV

Adj-SID Sub-TLV

Advertises SR-MPLS Adjacency SIDs on a P2P network.

OSPFv2 Extended Link Opaque LSA's OSPFv2 Extended Link TLV

LAN Adj-SID Sub-TLV

Advertises SR-MPLS Adjacency SIDs on a LAN.

OSPFv2 Extended Link Opaque LSA's OSPFv2 Extended Link TLV

SR-Algorithm TLV

NEs use different algorithms, for example, the SPF algorithm and various SPF variant algorithms, to compute paths to the other nodes or prefixes. The newly defined SR-Algorithm TLV allows an NE to advertise an algorithm in use.

Figure 1 shows the format of the SR-Algorithm TLV.
Figure 1 SR-Algorithm TLV format
Table 2 Fields in the SR-Algorithm TLV

Field Name

Length

Description

Type

16 bits

TLV type value.

Length

16 bits

Packet length.

Algorithm

8 bits

Algorithm.

SID/Label Range TLV

The SID/Label Range TLV is used to advertise multiple SIDs or labels at a time, or a SID or label range.

Figure 2 shows the format of the SID/Label Range TLV.
Figure 2 SID/Label Range TLV format
Table 3 Fields in the SID/Label Range TLV

Field Name

Length

Description

Type

16 bits

TLV type value.

Length

16 bits

Packet length.

Range Size

24 bits

SRGB range.

Reserved

8 bits

Reserved field.

Sub-TLV (variable)

Variable length

The SID/Label Sub-TLV is mainly involved. The start value in the SID or label range is included.

This field and the Range Size field jointly determine a SID or label range.

SRMS Preference TLV

The SRMS Preference TLV advertises the priority of the SR mapping server as which the local node functions. The TLV is used in Sr mapping server election. Figure 3 shows the format of the SRMS Preference TLV.
Figure 3 SRMS Preference TLV format
Table 4 Fields in the SRMS Preference TLV

Field Name

Length

Description

Type

16 bits

TLV type value.

Length

4 bytes

Packet length.

Preference

8 bits

Priority of the SR mapping server.

Reserved

8 bits

Reserved field.

SID/Label Sub-TLV

A SID/Label Sub-TLV includes a SID or an MPLS label. Figure 4 shows the format of the SID/Label Sub-TLV.
Figure 4 SID/Label Sub-TLV format
Table 5 Field in the SID/Label Sub-TLV

Field Name

Length

Description

Type

16 bits

TLV type value.

Length

16 bits

Packet length.

SID/Label (variable)

Variable length

If the Length field value is set to 3, the 20 rightmost bits indicate an MPLS label.

If the Length field value is set to 4, the field indicates a 32-bit SID.

Prefix SID Sub-TLV

The Prefix-SID sub-TLV carries IGP-Prefix-SID information in the format shown in Figure 5.
Figure 5 Prefix-SID Sub-TLV format
Table 6 Fields in the Prefix-SID Sub-TLV

Field Name

Length

Description

Type

16 bits

TLV type value.

Length

16 bits

Packet length.

Flags

8 bits

Flags field. Figure 6 shows its format.
Figure 6 Flags field
The meaning of each flag is as follows:
  • NP: no-PHP flag. If this flag is set, PHP is disabled so that the penultimate node sends a labeled packet to the egress.
  • M: Mapping server flag. If the flag is set, a SID is advertised by a mapping server.
  • E: explicit null label flag. If this flag is set, the explicit null label function is enabled. An upstream neighbor must replace an existing label with an explicit null label before forwarding a packet.
  • V: value flag. If this flag is set, a prefix SID carries a value, instead of an index. By default, the flag is not set.
  • L: local flag. If this flag is set, the value or index carried in a prefix SID is of local significance. By default, the flag is not set.

A node must compute an outgoing prefix label based on the NP and E flags in a prefix SID advertised by a next hop, regardless whether the optimal path to the prefix SID passes through the next hop.

The following behavior is related to P and E flags:
  • If the NP flag is not set, any upstream node of the prefix SID producer must strip off the prefix SID, which is similar to PHP in MPLS forwarding. The MPLS EXP bit is also cleared. In addition, if the P flag is not set, the received E flag bit is ignored.
  • If the NP flag is set, the following situations occur:
    • If the E flag is not set, any upstream node of the prefix SID producer must reserve the prefix SID on the top of the label stack. This method is used in path stitching. For example, a prefix SID producer may use this label to forward a packet to another MPLS LSP.
    • If the E flag is set, any upstream node of the prefix SID producer must replace the prefix SID label with an explicit null label. In this mode, the MPLS EXP flag is retained. If the prefix SID producer is the destination, the node can receive the original MPLS EXP field value. The MPLS EXP flag can be used in QoS services.

Reserved

8 bits

Reserved field.

MT-ID

8 bits

Multi-topology ID.

Algorithm

8 bits

Algorithm:
  • 0: Shortest Path First
  • 1: Strict Shortest Path First

SID/Index/Label (variable)

Variable length

This field contains either of the following information based on the V and L flags:
  • 4-byte label offset value, within an ID/label range. In this case, V and L flags are not set.
  • 3-byte local label: The 20 rightmost bits are a label value. In this case, the V and L flags must be set.

Adj-SID Sub-TLV

An Adj-SID Sub-TLV is optional and carries IGP Adjacency SID information. Figure 7 shows its format.
Figure 7 Adj-SID Sub-TLV format
Table 7 Field in the Adj-SID Sub-TLV

Field Name

Length

Description

Type

16 bits

TLV type value.

Length

16 bits

Packet length.

Flags

8 bits

Flags field. Figure 8 shows its format.
Figure 8 Flags field
The meaning of each flag is as follows:
  • B: backup flag. If the flag is set, an Adj-SID is used to protect another node.
  • V: Value/Index flag. If this flag is set, an Adj-SID carries a label value. If this flag is not set, an Adj-SID carries a relative index.
  • L: Local/Global flag. If this flag is set, the Adj-SID value or index is of local significance. If this flag is not set, the Adj-SID value or index is of global significance.
  • G: group flag. If this flag is set, an Adj-SID is an adjacency group.
  • P: permanent label. If this flag is set, an Adj-SID is a permanently assigned SID, which is unchanged, regardless of a device restart or interface flapping.

Reserved

8 bits

Reserved field.

MT-ID

8 bits

Multi-topology ID.

Weight

8 bits

Weight. The Adj-SID weight is used for load balancing.

SID/Index/Label (variable)

Variable length

This field contains either of the following information based on the V and L flags:
  • 3-byte local label: The 20 rightmost bits are a label value. In this case, the V and L flags must be set.
  • 4-byte label offset value, within an ID/label range. In this case, V and L flags are not set.

LAN Adj-SID Sub-TLV

In segment routing implementation, each NE advertises Adj-SIDs to all neighbors. On a broadcast, NBMA, or mixed network, the LAN-Adj-SID Sub-TLV is used to send SID or label information to non-DR devices.

Figure 9 shows the format of the LAN-Adj-SID Sub-TLV. Compared with the Adj-SID Sub-TLV, the LAN Adj-SID Sub-TLV has an additional Neighbor ID field that represents the router ID of a device that advertises the LAN Adj-SID Sub-TLV.
Figure 9 LAN-Adj-SID Sub-TLV format
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >