- Read Me First
- Introduction to Segment Routing
- Segment Routing With IS-IS v4 Node SID
- IS-IS Link-protection Topology Independent Loop Free Alternate Fast Reroute
- Segment Routing Traffic Engineering With IS-IS
- Segment Routing With OSPFv2 Node SID
- OSPFv2 Link-protection Topology Independent Loop Free Alternate Fast Reroute
- Segment Routing Traffic Engineering With OSPF
- BGP Dynamic Segment Routing Traffic Engineering
- Segment Routing On Demand Next Hop for L3/L3VPN
- Routing Information Base Support
- SR-TE On Demand LSP
- Segment Routing MPLS OAM Support
- Using Seamless BFD and SSPF with Segment Routing
- Dynamic PCC
- ISIS - SR: uLoop Avoidance
- BGP - SR: BGP Prefix SID Redistribution
- Information About Segment Routing With OSPFv2 Node SID
- How to Configure Segment Routing With OSPFv2 Node SID
- Configuring Segment Routing With OSPF
- Configuring Segment Routing on OSPF Network
- Configuring Prefix-SID for OSPF
- Configuring Prefix Attribute N-flag-clear
- Configuring Explicit Null Attribute With OSPF
- Configuring Segment Routing Label Distribution Protocol Preference With OSPF
- Configuring OSPF SRMS
- Configuring OSPF SRMS Client
- Additional References for Segment Routing With OSPFv2 Node SID
- Feature Information for Segment Routing With OSPFv2 Node SID
Segment Routing With
OSPFv2 Node SID
This chapter describes how Segment Routing works with OSPFv2 node SID.
- Information About Segment Routing With OSPFv2 Node SID
- How to Configure Segment Routing With OSPFv2 Node SID
- Additional References for Segment Routing With OSPFv2 Node SID
- Feature Information for Segment Routing With OSPFv2 Node SID
Information About Segment Routing With OSPFv2 Node SID
Segment routing configuration under the IGPs is allowed only if the SR state is either SR_DISABLED or SR_ENABLED. The SR_ENABLED state indicates that there is at least a valid SRGB range reserved. You can enable segment routing for IGPs under the router configuration sub mode, through commands. However, IGP segment routing are enabled only after the global SR is configured.
The SR_ENABLED is a necessary state for any protocol to enable SR, however, it is not a sufficient for enabling SR for a protocol instance. The reason being that the OSPF still does not have any information about segment routing global block (SRGB) information. When the request to receive information about the SRGB is processed successfully, the OSPF SR operational state is enabled.
Segment Routing requires each router to advertise its segment routing data-plane capability and the range of MPLS label values that are used for segment routing in the case where global SIDs are allocated. Data-plane capabilities and label ranges are advertised using the SR-capabilities sub-TLV inserted into the OSPF Router Information Opaque LSA.
OSPF SR-capabilities sub TLV includes all reserved SRGB ranges. However, the Cisco implementation supports only one SRGB range.
- Prefix-SID Received in Label Switched Path From Remote Routers
- Segment Routing Adjacency SID Advertisement
- Segment Routing Mapping Server
- SRGB Range Changes
- MPLS Forwarding on an Interface
- Conflict Handling of SID Entries
Prefix-SID Received in Label Switched Path From Remote Routers
OSPF sends the prefix SIDs associated with the connected prefix using the Extended Prefix Sub TLV in its opaque Extended prefix LSA. Prefix SIDs received in a LSA which have got reachability are downloaded to the routing information base (RIB) in the same way as BGP downloads per prefix VPN labels, only if the following conditions are met:
-
Segment routing is enabled for the topology and address-family.
-
Prefix-SID is valid.
-
The local label binding to MFI is successful.
Note | For SIDs that do not fit in the specified SID range, labels are not used when updating the RIB. For the cases, where SID fits in the SID range, but does not fit the next-hop neighbor SID range, remote label associated with that path is not installed. |
Segment Routing Adjacency SID Advertisement
Effective with Cisco IOS-XE Release 3.17, OSPF supports the advertisement of segment routing adjacency SID. An Adjacency Segment Identifier (Adj-SID) represents a router adjacency in Segment Routing.
A segment routing-capable router may allocate an Adj-SID for each of its adjacencies and an Adj-SID sub-TLV is defined to carry this SID in the Extended Opaque Link LSA.
OSPF allocates the adjacency SID for each OSPF neighbor if the OSPF adjacency which are in two way or in FULL state. OSPF allocates the adjacency SID only if the Segment Routing is enabled. The label for adjacency SID is dynamically allocated by the system. This eliminates the chances of misconfiguration, as this has got only the local significance.
Multiple Adjacency-SIDs
Effective with Cisco IOS-XE Release 16.3, multiple adjacency-SIDs are supported. For each OSPF adjacency, OSPF allots to Adj SIDs, unprotected and protected Adj-SIDs which are carried in the extended link LSAs. The protected adjacency SID (or back up Adj-SID) is allocated and advertised only when FRR is enabled on the router and also on the interface where SR is enabled on the system. When FRR or SR is disabled, the protected Adj-SID is released.
The persistence of protected adj-SID in forwarding plane is supported. When the primary link is down, OSPF delays the release of its backup Adj-SID until the delay timer (30 sec) expires. This allows the forwarding plane to continue to forward the traffic through the backup path until the router is converged.
The allocated and advertised backup Adj-SIDs can be displayed in the output of show ip ospf neighbor detail and show ip ospf segment-routing protected-adjacencies command.
Segment Routing Mapping Server
Segment Routing Mapping Server (SRMS) allows configuration and maintenance of the Prefix-SID mapping policy entries. Effective with Cisco IOS-XE Release 3.17, the IGPs use the active policy of the SRMS to determine the SID values when programming the forwarding plane.
The SRMS provides prefixes to SID/Label mapping policy for the network. IGPs, on the other hand, are responsible for advertising prefixes to SID/Label mapping policy through the Prefix-SID/Label Binding TLV.
Active policy information and changes are notified to the IGPs, which use active policy information to update forwarding information.
Connected Prefix SIDs
When a router installs a prefix with a SID that is different than what it advertises to the LSP, for example, if more than one protocol or more than one IGP instance is announcing the same prefix with different SIDs to the SRMS, the SRMS resolves the conflict and announces the winning prefix and SID that may not be the same as the local instance. In that case, the IGP always advertises what it learns from its source LSP although it still tries to install the SID which may be different than what it learns in its LSP. This is done to prevent the IGP from redistributing the SIDs from another protocol or another protocol instance.
SRGB Range Changes
When OSPF segment routing is configured, OSPF must request an interaction with the SRGB before OSPF SR operational state can be enabled. If no SRGB range is created, OSPF will not be enabled.
When an SRGB change event occurs, OSPF makes the corresponding changes in its sub-block entries. OSPF also advertises the newly created or extended SRGB range in SR-capabilities sub-TLV and updates the prefix-sid sub TLV advertisement.
MPLS Forwarding on an Interface
MPLS forwarding must be enabled before segment routing can use an interface. OSPF is responsible for enabling MPLS forwarding on an interface.
When segment routing is enabled for a OSPF topology, or OSPF segment routing operational state is enabled, it enables MPLS for any interface on which the OSPF topology is active. Similarly, when segment routing is disabled for a OSPF topology, it disables the MPLS forwarding on all interfaces for that topology.
Conflict Handling of SID Entries
When there is a conflict between the SID entries and the associated prefix entries use any of the following methods to resolve the conflict:
- When the system receives two SID entries for the same prefix, then the prefix received by higher router ID is treated as the SID corresponding to the prefix. The prefix is installed with the SID entry which was advertised by the higher router ID.
-
When the system receives two SID entries one by OSPF protocol and the other by IS-IS protocol, then the SID entry received by OSPF protocol is treated as valid SID. The prefix is installed with the SID entry which was received by OSPF protocol.
-
When two prefixes are advertised with the same SID entry, then the prefix which is advertised by the higher router ID is installed with the SID entry and the other prefix is installed without any SID entry.
In an ideal situation, each prefix should have unique SID entries assigned.
How to Configure Segment Routing With OSPFv2 Node SID
Perform the following steps to configure segment routing with OSPFv2 node SID.
- Configuring Segment Routing With OSPF
- Configuring Segment Routing on OSPF Network
- Configuring Prefix-SID for OSPF
- Configuring Prefix Attribute N-flag-clear
- Configuring Explicit Null Attribute With OSPF
- Configuring Segment Routing Label Distribution Protocol Preference With OSPF
- Configuring OSPF SRMS
- Configuring OSPF SRMS Client
Configuring Segment Routing With OSPF
Before configuring OSPF to support segment routing you must first configure the segment routing feature in global configuration mode.
1.
enable
2.
configure
terminal
3. segment-routing mpls
4. connected-prefix-sid-map
5. address-family ipv4
6. 1.1.1.1/32 index 100 range 1
7. exit-address-family
DETAILED STEPS
Configuring Segment Routing on OSPF Network
Before you configure segment routing on OSPF network, OSPF must be enabled on your network.
1.
router ospf 10
2.
router-id<id>
3.
segment-routing mpls
4.
segment-routing area
<area id>
mpls
5.
show ip ospf 10 segment-routing
DETAILED STEPS
Configuring Prefix-SID for OSPF
This task explains how to configure prefix segment identifier (SID) index under each interface.
Segment routing must be enabled on the corresponding address family.
1. enable
2. configure terminal
3.
segment-routing mpls
4.
connected-prefix-sid-map
5.
address-family ipv4
6. 1.1.1.1/32 index 100 range 1
7. exit
DETAILED STEPS
Configuring Prefix Attribute N-flag-clear
OSPF advertises prefix SIDs via Extended Prefix TLV in its opaque LSAs. It carries flags for the prefix and one of them is N flag (Node) indicating that any traffic sent along to the prefix is destined to the router originating the LSA. This flag typically marks host routes of router's loopback.
1.
enable
2.
configure
terminal
3. interface loopback3
4. ip ospf prefix-attributes n-flag-clear
DETAILED STEPS
Configuring Explicit Null Attribute With OSPF
To disable penultimate-hop-popping (PHP) and add explicit-Null label, explicit-null option needs to be specified. Once the option is given, OSPF sets the E flag in the Extended prefix-SID TLV in its LSAs.
By default, a flag called E-flag (Explicit-Null flag) is set to 0 by OSPF when advertising a Prefix SID which is associated with a loopback address. If you wish to set this flag add explicit configuration.
1.
enable
2.
configure
terminal
3. segment-routing mpls
4. set-attributes
5.
address-family ipv4
6.
explicit-null
7.
exit-address-family
DETAILED STEPS
Configuring Segment Routing Label Distribution Protocol Preference With OSPF
1.
enable
2.
configure
terminal
3. segment-routing mpls
4. set-attributes
5.
address-family ipv4
6.
sr-label-preferred
7.
exit-address-family
DETAILED STEPS
Configuring OSPF SRMS
The following command enables the OSPF SRMS and allows OSPF to advertise local mapping entries. OSPF does not send remote entries to the SRMS library. However, OSPF uses the SRMS active policy, which is computed based only on the locally configured mapping entries.
[no] segment-routing prefix-sid-map advertise-local
Configuring OSPF SRMS Client
By default, the OSPF SRMS client mode is enabled. OSPF always sends remote prefix-sid-mapping entries received through LSAs, to SRMS. The SRMS active policy is calculated based on both, local and remote mapping entries.
The following command disables the prefix-sid-mapping client functionality and it is configured on the receiver side.
segment-routing prefix-sid-map receive [disable]
Additional References for Segment Routing With OSPFv2 Node SID
Related Documents
Related Topic |
Document Title |
---|---|
Cisco IOS commands |
Cisco IOS Master Command List, All Releases http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/mcl/allreleasemcl/all-book.html |
IP Routing ISIS commands |
Cisco IOS IP Routing ISIS commands http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/mcl/allreleasemcl/all-book.html |
Feature Information for Segment Routing With OSPFv2 Node SID
Feature Name |
Releases |
Feature Information |
---|---|---|
Segment Routing With OSPF |
Cisco IOS XE Release 3.16S Cisco IOS XE Fuji 16.7.1 |
The Segment Routing OSPFv2 node SID feature provides support for segment routing on OSPF networks. The following commands were introduced or modified: connected-prefix-sid-map, show ip ospf 10 segment-routing, sr-label-preferred, ip ospf prefix-attributes n-flag-clear . In Cisco IOS XE Fuji 16.7.1, this feature is supported on Cisco 4000 Series Integrated Service Routers. |