PurposeCommand or Action
segment-routing mpls
Step 3
Example:
RP/0/RP0/CPU0:router(config-ospf)# segment-routing
mpls
Enables SR forwarding on all interfaces where this instance
OSPF is enabled.
segment-routing forwarding mpls
Example:
Step 4
RP/0/RP0/CPU0:router(config-ospf)# segment-routing
forwarding mpls
Enables server functionality and allows OSPF to advertise
the local mapping entries using area-scope flooding. The
segment-routing prefix-sid-mapadvertise-local
Example:
Step 5
flooding is limited to areas where segment-routing is
enabled. Disabled by default.
RP/0/RP0/CPU0:router(config-ospf)# segment-routing
prefix-sid-map advertise local
Enables OSPF to communicate to the routing information
base (RIB) that SR labels are preferred to LDP labels. If
segment-routing sr-preferprefix-list[acl-name]
Example:
Step 6
ACL is used, OSPF signals the preference of SR labels over
RP/0/RP0/CPU0:router(config-ospf)# segment-routing
sr-prefer prefix-list foo
LDP labels for prefixes that match ACL. If ACL is not used,
OSPF signals the preference of SR labels for all prefixes.
Example
The following example shows how OSPF advertises local mapping entries using area-flooding scope.
ipv4 prefix-list foo
permit 2.2.2.2/32
!
router ospf 1
router-id 1.1.1.1
segment-routing mpls
segment-routing forwarding mpls
segment-routing prefix-sid-map receive
segment-routing prefix-sid-map advertise-local
segment-routing sr-prefer prefix-list foo
area 0
interface Loopback0
prefix-sid index 1
!
interface GigabitEthernet0/0/0/0
!
interface GigabitEthernet0/2/0/0
!
interface GigabitEthernet0/2/0/3
!
!
area 1
interface GigabitEthernet0/2/0/7
!
Routing Configuration Guide for Cisco NCS 6000 Series Routers, IOS XR Release 6.4.x
325
Implementing OSPF
Enabling OSPF Interaction with SRMS Server