Routing

 View Only
last person joined: 2 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.

CoS-Based Forwarding For Layer 3 VPNs!

  • 1.  CoS-Based Forwarding For Layer 3 VPNs!

    Posted 05-25-2021 22:54
    Hi,
    I read the Juniper document and they said that " the route-filter statement has no effect because the policy checks the bgp.l3vpn.0 table, not the vrf.inet.0 table."

    Configuring CoS-Based Forwarding | Class of Service User Guide (Routers and EX9200 Switches) | Juniper Networks TechLibrary
    "For Layer 3 VPNs, when you use class-based forwarding for the routes received from the far-end provider edge (PE) router within a VRF instance, the software can match the routes based on the attributes that come with the received route only. In other words, the matching can be based on the route within RIB-in. In this case, the route-filter statement you include at the [edit policy-options policy-statement my-cos-forwarding from] hierarchy level has no effect because the policy checks the bgp.l3vpn.0 table, not the vrf.inet.0 table."

    But I try to test in my lab and I observed that it still works perfectly when using CBF with route-filterfor L3VPN. Please let me the comment if you have any idea about this point!
    Thank you!

    Topology:

    Detail test:
    + the CBF apply for R3:
    set policy-options policy-statement CBF term 2 from route-filter 2.2.2.2/32 exact
    set policy-options policy-statement CBF term 2 then cos-next-hop-map task_CBF
    set policy-options policy-statement CBF term 2 then accept
    set policy-options policy-statement CBF term 3 then accept

    set routing-options forwarding-table export CBF
    set routing-options forwarding-table export LB

    set class-of-service forwarding-policy next-hop-map task_CBF forwarding-class gold lsp-next-hop R3-R4
    set class-of-service forwarding-policy next-hop-map task_CBF forwarding-class silver lsp-next-hop R3-R5-R4

    + send traffic to 2.2.2.2 with forwarding-class gold:
    lab@R3# run show mpls lsp statistics
    Ingress LSP: 3 sessions
    To From State Packets Bytes LSPname
    4.4.4.4 3.3.3.3 Up 100 8400 R3-R4
    4.4.4.4 3.3.3.3 Up 0 0 R3-R5-R4
    + send to 2.2.2.2 with forwarding-class silver:
    lab@R3# run show mpls lsp statistics
    Ingress LSP: 3 sessions
    To From State Packets Bytes LSPname
    4.4.4.4 3.3.3.3 Up 100 8400 R3-R4
    4.4.4.4 3.3.3.3 Up 100 8400 R3-R5-R4

    + I tried to change  the class-map to test and it still work perfectly:
    set class-of-service forwarding-policy next-hop-map task_CBF forwarding-class gold lsp-next-hop R3-R4
    set class-of-service forwarding-policy next-hop-map task_CBF forwarding-class silver lsp-next-hop R3-R4

    lab@R3# run clear mpls lsp statistics
    send traffic again for both forwarding class:
    lab@R3# run show mpls lsp statistics
    Ingress LSP: 3 sessions
    To From State Packets Bytes LSPname
    4.4.4.4 3.3.3.3 Up 200 16800 R3-R4
    4.4.4.4 3.3.3.3 Up 0 0 R3-R5-R4