Courseiva
NetworkinghardMultiple ChoiceObjective-mapped

How to Configure SR-MPLS with OSPF Prefix-SIDs

A service provider is deploying segment routing (SR) with MPLS data plane. The network uses OSPF as the IGP. Which configuration is required to enable SR-MPLS and ensure that routers advertise prefix-SIDs for their loopback interfaces?

Quick Answer

The correct answer is to configure 'segment-routing mpls' globally and assign a prefix-SID to the loopback interface under OSPF. This works because SR-MPLS with OSPF requires the IGP to distribute label information via prefix-SIDs, replacing the need for LDP; the global command enables the segment routing control plane, while the 'prefix-sid' command under the OSPF process attaches a specific label index to the loopback, which OSPF then advertises in its Link-State Advertisements using the OSPF extensions for segment routing. On the Cisco SPCOR 350-501 exam, this question tests your understanding of the fundamental SR-MPLS deployment prerequisite—many candidates mistakenly enable SR only under OSPF or forget the global command, so remember that SR must be turned on at the router level first. A common trap is thinking OSPF alone can advertise SIDs without the global 'segment-routing mpls' activation. Memory tip: think "Global first, then OSPF prefix-SID" to avoid the trap of enabling SR only under the routing protocol.

⚠ Common exam trap

Cisco often tests the distinction between enabling segment routing globally versus configuring the SRGB; candidates mistakenly think that setting the SRGB alone enables SR-MPLS, but the 'segment-routing mpls' command is the actual enabler.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Configure 'segment-routing mpls' globally and assign a prefix-SID to the loopback interface under OSPF.

To enable SR-MPLS with OSPF, you must globally enable segment routing with the 'segment-routing mpls' command, and then assign a prefix-SID to the loopback interface under the OSPF process using the 'prefix-sid' command. This ensures that routers advertise the prefix-SID for their loopback via OSPF extensions, which is the fundamental requirement for SR-MPLS operation without LDP.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Configure 'mpls ip' on all interfaces and 'router ospf 1 mpls ldp auto-config'.

    Why it's wrong here

    This enables LDP, not segment routing.

  • Configure 'label mode per-prefix' under the OSPF process and assign a label to the loopback.

    Why it's wrong here

    This is LDP label allocation, not SR.

  • Configure 'segment-routing global-block 16000 23999' globally and enable 'mpls ip' on all interfaces.

    Why it's wrong here

    The global-block defines the SRGB but does not enable SR; 'mpls ip' enables LDP, not SR.

  • Configure 'segment-routing mpls' globally and assign a prefix-SID to the loopback interface under OSPF.

    Why this is correct

    This enables SR-MPLS and advertises a prefix-SID for the loopback.

Visual reference

R1 R2 R3 R4 10 100 10 100 OSPF picks R1→R2→R4 (cost 20) over R1→R3→R4 (cost 200)

About these practice questions

This 350-501 question is part of Courseiva's 971-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on 350-501

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. An engineer is deploying Segment Routing in an MPLS network. To ensure that routers can forward packets based on SR-MPLS labels without requiring LDP, which requirement must be met?

hard
  • A.IS-IS or OSPF must have the SR extension enabled.
  • B.MPLS LDP must be enabled on all interfaces.
  • C.All routers must run BGP-LU.
  • D.The IGP must have the overload bit set.

Why A: Segment Routing (SR) can operate without LDP by encoding the forwarding path as a list of MPLS labels derived from the IGP. For routers to allocate and advertise these SR-MPLS labels, the IGP (IS-IS or OSPF) must have the Segment Routing extension enabled. This allows the IGP to distribute prefix-SIDs (labels) that routers use to forward packets, eliminating the need for LDP.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This 350-501 practice question is part of Courseiva's free Cisco certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 350-501 exam.