OSPF Extensions for Segment Routing
Segment Routing (SR) allows a flexible definition of end-to-end paths within IGP topologies by encoding paths as sequences of topological subpaths called Segments. These segments are advertised by the link-state routing protocols (IS-IS and OSPF). Prefix segments represent an ECMP-aware shortest path to a prefix (or a node), as per the state of the IGP topology. Adjacency segments represent a hop over a specific adjacency between two nodes in the IGP. A prefix segment is typically a multi-hop path while an adjacency segment, in most cases, is a one-hop path. SR's control plane can be applied to both IPv6 and MPLS data planes, and it does not require any additional signaling (other than IGP extensions). The IPv6 data plane is out of the scope of this specification; it is not applicable to OSPFv2, which only supports the IPv4 address family. When used in MPLS networks, SR paths do not require any LDP or RSVP-TE signaling. However, SR can interoperate in the presence of LSPs established with RSVP or LDP. This article describes the OSPFv2 extensions required for Segment Routing.
Segment Routing Identifiers
Segment Routing defines various types of Segment Identifiers (SIDs)
Segment Routing requires some additional router capabilities to be advertised to other routers in the area. These SR capabilities are advertised in the Router Information Opaque LSA. The TLVs defined below are applicable to both OSPFv2 and OSPFv3.
The SID/Label Range TLV is used to advertise such SID/Label space. The SID/Label Range TLV is a top-level TLV of the Router Information opaque LSA.
OSPF also defines new Opaque LSAs to advertise the SIDs:
Prefix SID Sub-TLV (2) - Prefix-SID
- Adjacency SID
- LAN Adjacency SID
- Binding SID.
The SID/Label Sub-TLV appears in multiple TLVs or sub-TLVs. It is used to advertise the SID or label associated with a prefix or adjacency. The SID/Label Sub-TLV has the following format:
If the length is set to 3, then the 20 rightmost bits represent a label. If the length is set to 4, then the value represents a 32-bit SID.
Segment Routing Capabilities
- SR-Algorithm TLV (8)
- SID/Label Range TLV (9)
The SR-Algorithm TLV is a top-level TLV of the Router Information Opaque LSA. The SR-Algorithm TLV is optional. It SHOULD only be advertised once in the Router Information Opaque LSA. If the SR-Algorithm TLV is not advertised by the node, such a node is considered as not being Segment Routing capable.An SR Router can use various algorithms when calculating reachability to OSPF routers or prefixes in an OSPF area. Examples of these algorithms are metric-based Shortest Path First (SPF), various flavors of Constrained SPF, etc. The SR-Algorithm TLV allows a router to advertise the algorithms currently used by the router to other routers in an OSPF area.
The SID/Label Range TLV is used to advertise such SID/Label space. The SID/Label Range TLV is a top-level TLV of the Router Information opaque LSA.
OSPF also defines new Opaque LSAs to advertise the SIDs:
- OSPFv2 Extended Prefix Opaque LSA (type 7)
- OSPFv2 Extended Link Opaque LSA (type 8)
Adj-SID Sub-TLV (2)
LAN Adj-SID Sub-TLV (3)
OSPF Segment Routing Configuration
In below config example, SR is enabled for all interfaces in area0, except TenGig0/0/0/0router ospf 1
area 0
segment-routing mpls
segment-routing forwarding mpls
interface TenGigabitEthernet0/0/0/0
segment-routing forwarding disable
area 0
segment-routing mpls
segment-routing forwarding mpls
interface TenGigabitEthernet0/0/0/0
segment-routing forwarding disable
Default SRGB range is [16000-23999]. Configuring a non-default SRGB.
segment-routing
global-block 18000 19999
global-block 18000 19999
router ospf 1
segment-routing mpls
segment-routing mpls
If we take default SRGB range [16000 - 23999] i.e. size 8000, Taking a simple topology of two routers R1 - R2 with prefix-sid index 1 and prefix-sid index 2 respectively.
R1
router ospf 1
router-id 1.1.1.1
segment-routing mpls
segment-routing forwarding mpls
area 0
interface Loopback0
passive enable
prefix-sid index 1
interface GigabitEthernet0/0/0/0
network point-to-point
R2
router ospf 1
router-id 2.2.2.2
segment-routing mpls
segment-routing forwarding mpls
area 0
interface Loopback0
passive enable
prefix-sid index 2
interface GigabitEthernet0/0/0/0
network point-to-point
router ospf 1
router-id 1.1.1.1
segment-routing mpls
segment-routing forwarding mpls
area 0
interface Loopback0
passive enable
prefix-sid index 1
interface GigabitEthernet0/0/0/0
network point-to-point
R2
router ospf 1
router-id 2.2.2.2
segment-routing mpls
segment-routing forwarding mpls
area 0
interface Loopback0
passive enable
prefix-sid index 2
interface GigabitEthernet0/0/0/0
network point-to-point
If you understood the concept and like this article, kindly share the same with your friends.
0 Comments
Please do not enter any spam link in the comment box.