Routing

last person joined: 4 days ago 

Ask questions and share experiences about ACX Series, CTP Series, MX Series, PTX Series, SSR Series, JRR Series, and all things routing, including portfolios and protocols.
  • 1.  Node segment label is not generated

    Posted 05-16-2020 19:27

    Hi everybody,

    I am trying to learn segment routing, I am using a simple lab to understand the concept:

    MX1 ge0/0/0-------ge0/0/0 MX2

    ge-0/0/2

    |

    |

    ge0/0/2

    MX3

    The issue I observed, none of the routers above generate label for Node segment, they do generate Adjacney label .

    All configs are pasted at the end under " Additional info"

     

    As an example,  MX2 generates Adjaceny label but not Node segment label:

     

    MX2>show ospf database extensive opaque-area advertising-router 10.100.100.2


    OSPF database, Area 0.0.0.0
    Type ID Adv Rtr Seq Age Opt Cksum Len
    OpaqArea*7.0.0.1 10.100.100.2 0x80000001 1853 0x22 0xdd14 44
    Opaque LSA
    Extended Prefix (1), length 20:
    Route Type (1), length 1:
    1
    Prefix Length (2), length 1:
    32
    AF (3), length 1:
    0
    Flags (4), length 1:
    0x40
    Prefix (5), length 32:
    10.100.100.2
    Prefix Sid (2), length 8:
    Flags (1), length 1:
    0x00
    MT ID (2), length 1:
    0
    Algorithm (3), length 1:
    0
    SID (4), length 4:
    2
    Gen timer 00:16:02
    Aging timer 00:29:06
    Installed 00:30:53 ago, expires in 00:29:07, sent 00:30:53 ago

    Last changed 00:30:53 ago, Change count: 1, Ours, TE Link ID: 0
    OpaqArea*8.0.0.1 10.100.100.2 0x80000001 1713 0x22 0x93b8 52
    Opaque LSA
    Extended Link (1), length 28:
    Link Type (1), length 1:
    2
    Link Id (2), length 4:
    10.100.12.2
    Link Data (3), length 4:
    10.100.12.2
    Lan Adjacency Sid (3), length 11:
    Flags (1), length 1:
    0x60
    MT ID (2), length 1:
    0
    Weight (3), length 1:
    0
    Neighbor ID (4), length 4:
    10.100.100.1
    Label (4), length 3:
    299776
    Gen timer 00:21:27
    Aging timer 00:31:27
    Installed 00:28:33 ago, expires in 00:31:27, sent 00:28:33 ago
    Last changed 00:28:33 ago, Change count: 1, Ours, TE Link ID: 0

     

    What am I missing again:) ?

    Thanks and have a good weekend!!

     

    ######################################################

    Additional info:

    ## MX1##

    set version 20191212.201431_builder.r1074901
    set system host-name vMX1
    set chassis network-services enhanced-ip
    set interfaces ge-0/0/0 unit 0 family inet address 10.100.12.1/24
    set interfaces ge-0/0/0 unit 0 family mpls
    set interfaces ge-0/0/2 unit 0 family inet address 10.100.13.1/24
    set interfaces ge-0/0/2 unit 0 family mpls
    set interfaces lo0 unit 0 family inet address 10.100.100.1/32
    set interfaces lo0 unit 0 family mpls

    set protocols ospf source-packet-routing node-segment ipv4-index 1
    set protocols ospf source-packet-routing srgb start-label 1000
    set protocols ospf source-packet-routing srgb index-range 9000
    set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
    set protocols ospf area 0.0.0.0 interface ge-0/0/2.0
    set protocols ospf area 0.0.0.0 interface lo0.0
    set protocols mpls traffic-engineering
    set protocols mpls interface all


    ## MX2##
    set system host-name vMX2
    set system root-authentication encrypted-password "$6$w0uV/Veg
    set chassis network-services enhanced-ip
    set interfaces ge-0/0/0 unit 0 family inet address 10.100.12.2/24
    set interfaces ge-0/0/0 unit 0 family mpls
    set interfaces lo0 unit 0 family inet address 10.100.100.2/32
    set interfaces lo0 unit 0 family mpls
    set protocols ospf source-packet-routing node-segment ipv4-index 2
    set protocols ospf source-packet-routing srgb start-label 1000
    set protocols ospf source-packet-routing srgb index-range 9000
    set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
    set protocols ospf area 0.0.0.0 interface lo0.0
    set protocols mpls traffic-engineering
    set protocols mpls interface all

    ## MX3##

    set version 20191212.201431_builder.r1074901
    set system host-name vMX3
    set chassis network-services enhanced-ip
    set interfaces ge-0/0/2 unit 0 family inet address 10.100.13.2/24
    set interfaces ge-0/0/2 unit 0 family mpls
    set interfaces lo0 unit 0 family inet address 10.100.100.3/32
    set interfaces lo0 unit 0 family mpls
    set routing-options static route 0.0.0.0/0 next-hop 100.123.0.1
    set protocols ospf source-packet-routing node-segment ipv4-index 3
    set protocols ospf source-packet-routing srgb start-label 1000
    set protocols ospf source-packet-routing srgb index-range 9000
    set protocols ospf area 0.0.0.0 interface ge-0/0/2.0
    set protocols ospf area 0.0.0.0 interface lo0.0
    set protocols mpls traffic-engineering
    set protocols mpls interface all

     

     

     

     

     



  • 2.  RE: Node segment label is not generated
    Best Answer

    Posted 05-16-2020 21:22

    Hello,

    Node SID is not "generated" because it is advertised as index in accordance with RFC 8665 section 3.2 and section 5  https://tools.ietf.org/html/rfc8665 :

     

    Prefix-SIDs MAY be advertised in the form of an index as described in
       Section 5.  

     

     

    and

     

     

       The Prefix-SID Sub-TLV is a sub-TLV of the OSPF Extended Prefix TLV
       described in [RFC7684] and the OSPF Extended Prefix Range TLV
       described in Section 4.  It MAY appear more than once in the parent
       TLV and has the following format:
    
        0                   1                   2                   3
        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       |              Type             |             Length            |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       |      Flags    |   Reserved    |      MT-ID    |    Algorithm  |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       |                     SID/Index/Label (variable)                |
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

     

    And You have it there in Your printout:

     


    @sarahr202 wrote:

     

    MX2>show ospf database extensive opaque-area advertising-router 10.100.100.2


    OSPF database, Area 0.0.0.0
    Type ID Adv Rtr Seq Age Opt Cksum Len
    OpaqArea*7.0.0.1 10.100.100.2 0x80000001 1853 0x22 0xdd14 44
    Opaque LSA
    Extended Prefix (1), length 20:
    Route Type (1), length 1:
    1
    Prefix Length (2), length 1:
    32
    AF (3), length 1:
    0
    Flags (4), length 1:
    0x40
    Prefix (5), length 32:
    10.100.100.2
    Prefix Sid (2), length 8:
    Flags (1), length 1:
    0x00
    MT ID (2), length 1:
    0
    Algorithm (3), length 1:
    0
    SID (4), length 4:
    2   <========= this is the index

     

    To see it converted into a label, use command "show route table inet.3 10.100.100.2" on a different router which is 2 hops away from MX2;

    or

    on MX2, use  command "show route table mpls.0 label 1002"

     

    Finally, JUNOS allocates Adj labels not from SRGB but from dynamic label space by default, hence Adj labels are shown as "labels" and not as index.  

     

    HTH

    Thx

    Alex



  • 3.  RE: Node segment label is not generated

    Posted 05-17-2020 15:17

    Thanks Alex  for clarifying this for me.

    In order to generate a label for SID, a node needs to know srgb start value.

    Example:

     

    MX1-------MX2---------MX3

    MX1: index1, srgb start value 1000

    MX2: index 2, srgb start value 1000

    MX3 : index 3 Srgb start value 1000

    Let say MX1 wants to send traffic to MX3 using NODE SID . In order to do that,  MX1 needs to figure out what label MX2 expects for MX3. MX1 calculates this label as follows:

    Index of MX3 ( as advertsied by MX3 in LSA)+ Srgb start value 1000 ( as advertised by MX2 in LSA) so

    3+1000=1003, 

    I can see  SRGB start value in ISIS data base, but I do do not see that in OSPF data base.

    As an example from Day one book ( Segment routing )

    lab@R2> show isis overview | no-more
    Instance: master
    Router ID: 192.168.0.2
    Hostname: R2
    Sysid: 1921.6800.0002
    Areaid: 49.0000
    Adjacency holddown: enabled
    Maximum Areas: 3
    LSP life time: 65535
    Reference bandwidth: 1000000000000
    Attached bit evaluation: enabled
    SPF delay: 50 msec, SPF holddown: 2000 msec, SPF rapid runs: 5
    Overload bit at startup is set
    Overload high metrics: disabled
    Allow route leaking: disabled
    Overload timeout: 300 sec
    IPv4 is enabled, IPv6 is enabled, SPRING based MPLS is enabled
    Traffic engineering: enabled
    Restart: Disabled
    Helper mode: Enabled
    Layer2-map: Disabled
    Source Packet Routing (SPRING): Enabled
    SRGB Config Range:
    SRGB Start-Label : 1000, SRGB Index-Range : 9000
    SRGB Block Allocation: Success
    SRGB Start Index : 1000, SRGB Size : 9000, Label-Range: [ 1000, 9999 ]
    Node Segments: Enabled
    Ipv4 Index : 402, Ipv6 Index : 602
    Post Convergence Backup: Disabled

     

    Where is SRGB start label in LSDB in OSPF? 

     

    Thanks and have a good weekend!!

     



  • 4.  RE: Node segment label is not generated

    Posted 05-17-2020 19:43

    Hello,

     


    @sarahr202 wrote:

     

    Where is SRGB start label in LSDB in OSPF? 

     

     


     

    It is there , just not in the same LSA as NodeSID/Prefix-SID:

     

     

    regress@R5> show ospf database opaque-area extensive advertising-router 198.51.100.3 | no-more 
    
        OSPF database, Area 0.0.0.0
     Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len 
    OpaqArea 4.0.0.0          198.51.100.3     0x80000001   399  0x22 0x2146  44
    Opaque LSA
      SR-Algorithm (8), length 1:
        Algo (1), length 1:
            0
      SID/Label Range (9), length 12:
        Range Size (1), length 3:
            9000
        SID/Label (1), length 3:
          Label (1), length 3:
            1000
      Aging timer 00:53:21
      Installed 00:05:58 ago, expires in 00:53:21
      Last changed 00:05:58 ago, Change count: 1
    OpaqArea 7.0.0.1          198.51.100.3     0x80000003   354  0x22 0x9640  44
    Opaque LSA
      Extended Prefix (1), length 20:
          Route Type (1), length 1:
            1
          Prefix Length (2), length 1:
            32
          AF (3), length 1:
            0
          Flags (4),  length 1:
            0x40
          Prefix (5), length 32:
            198.51.100.3
          Prefix Sid (2), length 8:
           Flags (1), length 1:
            0x00
           MT ID (2), length 1:
            0
           Algorithm (3), length 1:
            0
           SID (4), length 4:
            2
      Aging timer 00:54:06
      Installed 00:05:51 ago, expires in 00:54:06
      Last changed 00:05:58 ago, Change count: 1
    OpaqArea 8.0.0.1          198.51.100.3     0x80000002   354  0x22 0x1c04  52
    Opaque LSA
      Extended Link (1), length 28:
        Link Type (1), length 1:
         2
         Link Id (2), length 4:
         169.254.35.0
         Link Data (3), length 4:
         169.254.35.0
        Lan Adjacency Sid (3), length 11:
            Flags (1), length 1:
              0x60
            MT ID (2), length 1:
               0
            Weight (3), length 1:
               0
            Neighbor ID (4), length 4:
              198.51.100.5
            Label (4), length 3:
              265
      Aging timer 00:54:06
      Installed 00:05:51 ago, expires in 00:54:06
      Last changed 00:05:56 ago, Change count: 1
    

     

     

    According to RFC 8665 https://tools.ietf.org/html/rfc8665 :

     

     

    The SID/Label Range TLV is a top-level TLV of the Router Information
    Opaque LSA (defined in [RFC7770]).

     

    whereas

     

       The Prefix-SID Sub-TLV is a sub-TLV of the OSPF Extended Prefix TLV
       described in [RFC7684] and the OSPF Extended Prefix Range TLV
       described in Section 4. 

     

     

    and according to  https://tools.ietf.org/html/rfc7684

     

     

    OSPFv2 Extended Prefix TLV - Top-level TLV advertising attributes
           for a prefix in the OSPFv2 Extended Prefix Opaque LSA.

     

     

    HTH

    Thx

    Alex



  • 5.  RE: Node segment label is not generated

    Posted 05-17-2020 20:18

    Thank you so much !!