vMX

 View Only
last person joined: 10 days ago 

Ask questions and share experiences about vMX.
  • 1.  vMX Segment routing and some questions.

    Posted 05-21-2020 19:36

    Hi everybody,

    I am learning segment routing on vMX, for that, I am using a simple topology without North Star controller for now.

    All conigs are under additional info at the end. Please excuse the long-winded post,  I tried to provide all the info.

    Please consider the following set up:

    Below, I have assigned static labels to help me understand the concept.SPRING-12.PNG

     

    I observed following:

    1) mpls.0 table does not contain adjancey label generated by its neighors, for example, MX1 mpls.0 table contains adjaceny label it generated for  its attached link (label1048512), it does not contain any adjaceny labels generatted by its neigbors MX2.

     

    jcluser@vMX1> show route table mpls.0

    SNIP!!
    1002 *[L-OSPF/10/5] 00:15:53, metric 1
    > to 10.100.12.2 via ge-0/0/0.0, Pop
    1002(S=0) *[L-OSPF/10/5] 00:15:53, metric 1
    > to 10.100.12.2 via ge-0/0/0.0, Pop
    1004 *[L-OSPF/10/5] 00:15:53, metric 2
    > to 10.100.12.2 via ge-0/0/0.0, Swap 1004
    1048512 *[L-OSPF/10/5] 00:15:58, metric 0
    > to 10.100.12.2 via ge-0/0/0.0, Pop
    1048512(S=0) *[L-OSPF/10/5] 00:15:58, metric 0
    > to 10.100.12.2 via ge-0/0/0.0, Pop

     

    2) inet3.0 only contains loopbacks and their corresponing labels, e.g

    jcluser@vMX4> show route table inet.3

    inet.3: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both

    10.100.100.1/32 *[L-OSPF/10/5] 00:18:20, metric 2
    > to 10.100.24.1 via ge-0/0/2.0, Push 1001
    10.100.100.2/32 *[L-OSPF/10/5] 00:19:04, metric 1
    > to 10.100.24.1 via ge-0/0/2.0

     

    3) Unlike Cisco, I do not see traffic engineering database when segment routing is enabled:

    jcluser@vMX1> show ted database brief
    TED database: 0 ISIS nodes 0 INET nodes

     

    4) There is no label for 10.100.13.0/24 used by HOST connected to MX1. How can we force traffic from MX4 ,destined to 10.100.13.1 to use LSP ? Currnetly MX4 sends all traffic des tined to 10.100.13.1 without any label:

    jcluser@vMX4> show route 10.100.13.1

    inet.0: 16 destinations, 16 routes (16 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both

    10.100.13.0/24 *[OSPF/10/10] 00:25:21, metric 3
    > to 10.100.24.1 via ge-0/0/2.0

     

     

    Thanks and have a good night!!

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

    Additional info:

    ##MX1 ##

    set protocol mpls traffic-engineering

    set chassis network-service enhanced-ip
    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 interface-type p2p
    set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 ipv4-adjacency-segment unprotected label 1048512
    set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
    set protocols ospf area 0.0.0.0 interface lo0.0
    set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 passive
    set protocols mpls interface all
    set interfaces ge-0/0/0 unit 0 family mpls
    set interfaces ge-0/0/2 unit 0 family mpls

    ## MX2##

    set protocol mpls traffic-engineering

    set chassis network-service enhanced-ip
    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 interface-type p2p
    set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 ipv4-adjacency-segment unprotected label 1048521
    set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 interface-type p2p
    set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 interface-type p2p
    set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 ipv4-adjacency-segment unprotected label 1048524
    set protocols ospf area 0.0.0.0 interface lo0.0
    set protocols mpls interface all
    set interfaces ge-0/0/0 unit 0 family mpls
    set interfaces ge-0/0/2 unit 0 family mpls

    ##MX4##

    set protocol mpls traffic-engineering

    set chassis network-service enhanced-ip
    set protocols ospf source-packet-routing node-segment ipv4-index 4
    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/1.0
    set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 interface-type p2p
    set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 ipv4-adjacency-segment unprotected label 1048542
    set protocols ospf area 0.0.0.0 interface lo0.0
    set protocols mpls interface all
    set interfaces ge-0/0/2 unit 0 family mpls

     



  • 2.  RE: vMX Segment routing and some questions.
    Best Answer

    Posted 05-21-2020 23:31

    Hello,

     


    @sarahr202 wrote:

     

    1) mpls.0 table does not contain adjancey label generated by its neighors, for example, MX1 mpls.0 table contains adjaceny label it generated for  its attached link (label1048512), it does not contain any adjaceny labels generatted by its neigbors MX2.

     

     

    This is expected, JUNOS does not implement Global Adj-SID as described in RFC 8402 section 3.4 https://tools.ietf.org/html/rfc8402#section-3.4 , only local Adj-SID (L-flag is set in the Adj-SID TLV).

    As such, Adj-SID is installed only on the local SR node.

    As such the remote SR nodes are expected to use 2-label stack { SN, SNL } when utilizing Adj-SID for forwarding OVER A SPECIFIC LINK to the node(s) adjacent to local SR node. Forwarding over shortest path link does not need Adj-SID.

     

     


    @sarahr202 wrote:

     

    2) inet3.0 only contains loopbacks and their corresponing labels, e.g

    jcluser@vMX4> show route table inet.3

    inet.3: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both

    10.100.100.1/32 *[L-OSPF/10/5] 00:18:20, metric 2
    > to 10.100.24.1 via ge-0/0/2.0, Push 1001
    10.100.100.2/32 *[L-OSPF/10/5] 00:19:04, metric 1
    > to 10.100.24.1 via ge-0/0/2.0

     

     

     

    This is default JUNOS behaviour akin to JUNOS LDP and RSVP behaviour - only lo0.0 /32 IP addresses are installed in inet.3.

    If You want to see every link subnet in inet.3, use OSPF export policy to attach a Prefix-SID to every link and advertise them.

     

     


    @sarahr202 wrote:

     

     

    3) Unlike Cisco, I do not see traffic engineering database when segment routing is enabled:

    jcluser@vMX1> show ted database brief
    TED database: 0 ISIS nodes 0 INET nodes

     

     

    Please add following line into Your configs:

     

    set protocols ospf traffic-engineering igp-topology

     

     


    @sarahr202 wrote:

     

     

     

    4) There is no label for 10.100.13.0/24 used by HOST connected to MX1. How can we force traffic from MX4 ,destined to 10.100.13.1 to use LSP ? Currnetly MX4 sends all traffic des tined to 10.100.13.1 without any label:

    jcluser@vMX4> show route 10.100.13.1

    inet.0: 16 destinations, 16 routes (16 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both

    10.100.13.0/24 *[OSPF/10/10] 00:25:21, metric 3
    > to 10.100.24.1 via ge-0/0/2.0

     

     

    2 options:

    #1 (Juniper-preferred) :

    1a/ configure iBGP between MX1 and MX4

    1b/ add iBGP export policy to advertise 10.100.13.0/24 from MX1 with NHS

    1c/ MX4 will resolve BGP nexthop to the SPRING LSP

     

    #2:

     

    2a/ use OSPF export policy to allocate and advertise a Prefix-SID to 10.100.13.0/24 on MX1

    2b/ on every other node, especially MX4, add following line:

     

    set protocols mpls traffic-engineering mpls-forwarding

     

     - in order for Your pings/traceroutes originated on MX4 to use Prefix-SID label You allocated on MX1 to prefix 10.100.13.0/24.

    2c/ pings/traces originated on MX2 won't be able to use that Prefix-SID by default due to PHP, You need to add this line to

    MX1 if You want 10.100.13/0 to be pingable/traceable from everywhere:

     

    set protocols ospf source-packet-routing explicit-null

     

    HTH

    Thx

    Alex

     



  • 3.  RE: vMX Segment routing and some questions.

    Posted 05-22-2020 22:56

    Hi Alex,

    Thanks for helping me understand the concept.

    You mentioned:

    2a/ use OSPF export policy to allocate and advertise a Prefix-SID to 10.100.13.0/24 on MX1

    However, I am not able to find any example on google  to perform above mentioned action. Most of examples were exporting OSPF routes into other protocols such as BGP etc.

    Could you please give an example  how to perform above mentioned goal?

    Much appreciated!!

     



  • 4.  RE: vMX Segment routing and some questions.

    Posted 05-23-2020 05:16

    Hello,

     


    @sarahr202 wrote:

     

    2a/ use OSPF export policy to allocate and advertise a Prefix-SID to 10.100.13.0/24 on MX1

    However, I am not able to find any example on google  to perform above mentioned action. Most of examples were exporting OSPF routes into other protocols such as BGP etc.

    Could you please give an example  how to perform above mentioned goal?

     

     

    Of course. The example config on MX1 should look like:

     

    set protocols ospf source-packet-routing prefix-segment PL-OSPF-EX
    set protocols ospf export PL-OSPF-EX
    set policy-options policy-statement PL-OSPF-EX term 1 from route-filter 10.100.13.0/24 exact
    set policy-options policy-statement PL-OSPF-EX term 1 then prefix-segment index 11
    set policy-options policy-statement PL-OSPF-EX term 1 then accept
    set policy-options policy-statement PL-OSPF-EX term 2 from route-filter 10.100.100.1/32 exact
    set policy-options policy-statement PL-OSPF-EX term 2 then prefix-segment 1 node-segment
    set policy-options policy-statement PL-OSPF-EX term 2 then accept

     

     

    Note that policy PL-OSPF-EX is mentioned twice: under [protocols ospf] and under [protocols ospf source-packet-routing]. This is not a mistake/typo, You have to do it this way. Also, You have to add match on MX1 loopback 10.100.100.1 in this policy, otherwise MX1 NodeSID won't be advertised. 

     

    HTH

    Thx

    Alex

     

     



  • 5.  RE: vMX Segment routing and some questions.

    Posted 05-23-2020 08:58

    Thanks Alex, Prefix-segment index has to be unique on each MX or it has to be unique in whole ospf's domain , i.e can two MX routers have the same prefox segment index 11 for their attached prefixes ?

    Apreciated!!

     

    set policy-options policy-statement PL-OSPF-EX term 1 then prefix-segment index 11

     



  • 6.  RE: vMX Segment routing and some questions.

    Posted 05-23-2020 09:58

    Hello,

     

    I suggest You use unique Prefix SIDs per node per prefix for Your basic learning purposes.

     

    HTH

    Thx

    Alex