cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1529
Views
20
Helpful
13
Replies

Segment Routing Label finding method

rocky2024
Level 1
Level 1

Hello,

I am very new to SR world.

we are implementing SR with OSPF as IGP.

can somebody tell me how to find SR label by using various show commands?

any link or any one can share show commands in brief that will be great help me to start checking labels.

please help

 

13 Replies 13

Hello,

Let me read document, i will come back to you thank you.

 

Hello, i could not able to make out from above link what is the SR label for destination/local prefix

anyone can give me small example to find out SR label ? thank you!!

 

you run lab ? can I see it ?~

I use 
show mpls forwarding-label

Hi @rocky2024 ,

With IOS-XR you can use "show ospf sid-database" and IOS-XE "show ip ospf segment-routing sid-database". This displays the labels (SIDs) for all the routers in the segment routing domain.

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

fssabati
Cisco Employee
Cisco Employee

Hi @rocky2024 

 

Good day !

QUERY :

can somebody tell me how to find SR label by using various show commands? 

 

ANSWER :

the below command can be used to check the sid and the perfix associated with the sid 

COMMAND :

Show ospf database opaque-as

EX :

#show ospf database opaque-area 
 
            OSPF Router with ID (X.X.X.X) (Process ID test)
 
                Type-11 Opaque Link AS Link States
 
  LS age: 1888
  Options: (No TOS-capability, DC)
  LS Type: Opaque AS Link
  Link State ID: 7.0.0.1
  Opaque Type: 7
  Opaque ID: 1
  Advertising Router: 1.1.0.5
  LS Seq Number: 800000d7
  Checksum: 0x7ab
  Length: 44
 
    Extended Prefix TLV: Length: 20
      Route-type: 5
      AF        : 0
      Flags     : 0x0
      Prefix    : 1.1.0.1/32
 
      SID sub-TLV: Length: 8
        Flags     : 0x40
        MTID      : 0
        Algo      : 0
        SID Index : 7>>>>> the sid value using which the label can be obtained 
 
Regards 
Sharanya 

rocky2024
Level 1
Level 1

Hello Harold,

i checked in ncs540 CSG router using show ospf sid-database command. i can see many /32 loopback ips with assigned sid values manually during migration to SR 

 but now what ?  means

under some vrfs many routes are there in show route vrf 3g, next hop mentioned, prefix is there but how to find out label or sid value for destination prefixes under this vrf ? 

This is vrf route table for 3g vrf

This output is for specific next hop ip for destination prefixes for 3g vrf

Output for next hop ip to see how its learning   its learning from BGP LU session built with Nokia AGG

This is show bgp all all sum output to show BGP LU session and vpnv4 Ips

This is vrf route table for 3g vrf

rocky1_0-1672817280087.png

This output is for specific next hop ip for destination prefixes for 3g vrf

rocky1_1-1672817280089.png

Output for next hop ip to see how its learning   its learning from BGP LU session built with Nokia AGG

rocky1_2-1672817280090.png

This is show bgp all all sum output to show bgp LU session and vpnv4 IPs

rocky1_3-1672817280123.png

so my query is now how to find mpls label/sid value for prefixes under vrf 3g and sid for next hop ip for 3g vrf destinations ? i am totally confused..

 

 

 

 

Hi @rocky2024 ,

> but now what ?  means

Can you please explain what you mean by that?

To see what label(s) is used for a specific prefix in the VRF, you could use the following:

show cef vrf 3G_Service_HW <prefix/prefix length>

This will show you the BGP LU label, the IGP label (SR) and the service label (BGP).

Regards, 

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Hello Harold,

> but now what ? means--- sorry please ignore this.. i was thinking so i typed that way.

i checked show cef commands i can see like below

rocky1_0-1672918036205.png

rocky1_1-1672918065663.png

 

so labels are there in above outputs after keyword "imposed" all are assigned by SR IGP or BGP ?

in below output, i can see entry only for 20462 label but not rightmost two labels .. what does this means ?

rocky1_2-1672919083508.png

 

 

 

Hi @rocky2024 ,

so labels are there in above outputs after keyword "imposed" all are assigned by SR IGP or BGP ?

Yes, these labels are shown regardless if they have been learnt via BGP LU, BGP VPNv4 or SR.

> in below output, i can see entry only for 20462 label but not rightmost two labels .. what does this means ?

"show mpls forwarding" shows the content for the LFIB, which is sort of the routing table for the labels. MPLS routes the packets using the top label. In your case it is 20462. It doesn't need to know about the other labels, but the downstream routers will need to know about them. 

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

show mpls forwarding show only the top label, cef show all labels which in your case three label. 

rocky2024
Level 1
Level 1

Hello,

I am really sorry.

can you pls tell me how to find prefix sid (router loopback 0) value for prefix under vrf ? to know that this particular prefix under vrf 3G_Service_HW is belongs to that router (prefix sid value) showing ?

 

 

pman
Spotlight
Spotlight

Router#show segment-routing mpls connected-prefix-sid-map local ipv4

PREFIX_SID_CONN_MAP ALGO_0

Prefix/masklen SID Type Range Flags SRGB
10.10.10.10/32 16010 Abs 1 Y

Router#show segment-routing mpls connected-prefix-sid-map ipv4

PREFIX_SID_CONN_MAP ALGO_0

Prefix/masklen SID Type Range Flags SRGB
10.10.10.10/32 16010 Abs 1 Y

PREFIX_SID_PROTOCOL_ADV_MAP ALGO_0

Prefix/masklen SID Type Range Flags SRGB Source
1.1.1.1/32 1 Indx 1 Y OSPF Area 0 1.1.1.1
10.10.10.10/32 10 Indx 1 Y OSPF Area 0 10.10.10.10
11.11.11.11/32 11 Indx 1 Y OSPF Area 0 11.11.11.11
12.12.12.12/32 12 Indx 1 Y OSPF Area 0 12.14.12.12
13.13.13.13/32 13 Indx 1 Y OSPF Area 0 13.13.13.13
14.14.14.14/32 14 Indx 1 Y OSPF Area 0 14.14.14.14