vMX

 View Only
last person joined: 9 days ago 

Ask questions and share experiences about vMX.
  • 1.  Per prefix load balancing for IBGP over LSP

    Posted 07-24-2020 22:11

    Hi everyone,

    Please consider the following set up:

    Capture-23.PNG

    Above:

    1) We are generating traffic stream from WIN1 to WIN3  10.10.10.11->20.20.20.33 of 1Mbs, which is received on ge0/0/4 on MX2.

    2) As above, we are generating traffic stream from WIN2 to WIN4 10.10.10.22->20.20.20.44 of 2 Mbs, which is received on ge0/0/4 on MX2.

    3) MX2 and MX5 are IBGP neighbors, MX5 is announcing 20.20.20.0/24 via IBGP to MX2.

    4) MX2 has two static LSP to MX5 's loopback 5.5.5.5

    5) MX2 learns 20.20.20.0/24 via IBGP  with protocol next hop 5.5.5.5

    6) MX2 installs 20.20.20.0/24 with next hops pointed to two LSPs.

    7) Per packet ( per flow) load balancing is configured  on MX2 which in turns installs two LSP paths to 20.20.20.0/24 in forwarding table.

    😎 Per prefix load balancing is configured on MX2.

     

    I was under impression, since we are using per prefix load balancing and IBGP is being used, MX2 will send one flow over one LSP, the other flow over 2nd lsp. But I see MX2 simples sends both flow over single LSP while the other LSP sits idle.

    Below are some screen shots,  full config of MX2 is under additional info at the end.

    Capture09.PNG

    Below we see  total 3Mbs  from WIN1/WIN2 ,simulating two flows,  enters MX2 ge-0/0/4

    Capture4.PNG

     

    Below MX2 sees BGP advertised route 20.20.20.0/24 with protocol next hop 5.5.5.5

     

    Capture-32.PNG

    MX2 sends both flow over single LSP:

    Capture35.PNG

     

    Forwarding table on MX2,  shows both LSP ( labels) for 20.20.20.0/24 is installed in forwarding table:

    Capture23.PNG

     

    I used hash seed, indexed-load-balance under forwarding option, clear the LSP , but still MX2 sends both flow over single LSP.

    a) How can we spread these two flows over two LSP instead of one?

     

    Thank and have a good weekend!!

    Additional info:

    set version 18.2R1.9
    set chassis fpc 0 performance-mode
    set interfaces ge-0/0/0 unit 0 family inet address 192.168.1.202/24
    set interfaces ge-0/0/1 unit 0 family inet address 23.23.23.2/24
    set interfaces ge-0/0/1 unit 0 family mpls
    set interfaces ge-0/0/2 unit 0 family inet address 25.25.25.2/24
    set interfaces ge-0/0/2 unit 0 family mpls
    set interfaces ge-0/0/3 unit 0 family inet address 24.24.24.2/24
    set interfaces ge-0/0/3 unit 0 family mpls
    set interfaces ge-0/0/4 unit 0 family inet address 10.10.10.2/24
    set interfaces ge-0/0/4 unit 0 family mpls
    set interfaces ge-0/0/9 unit 0 family inet address 192.168.1.2/24
    set interfaces lo0 unit 0 family inet address 2.2.2.2/32
    set forwarding-options load-balance indexed-load-balance
    set forwarding-options load-balance per-prefix hash-seed 345
    set routing-options autonomous-system 100
    set routing-options forwarding-table export LOAD_BALANCE
    set protocols rsvp interface ge-0/0/3.0
    set protocols rsvp interface ge-0/0/2.0 subscription 1
    set protocols mpls statistics file mpls.stat
    set protocols mpls statistics file size 1m
    set protocols mpls statistics file files 2
    set protocols mpls statistics auto-bandwidth
    set protocols mpls label-switched-path MX2-MX5 to 5.5.5.5
    set protocols mpls label-switched-path MX2-MX5 adaptive
    set protocols mpls label-switched-path MX2-MX5 auto-bandwidth adjust-interval 300
    set protocols mpls label-switched-path MX2-MX5 auto-bandwidth minimum-bandwidth 1m
    set protocols mpls label-switched-path MX2-MX5 auto-bandwidth resignal-minimum-bandwidth
    set protocols mpls label-switched-path MX2-MX5 primary MX5
    set protocols mpls label-switched-path MX2-MX5_ALTERNATE to 5.5.5.5
    set protocols mpls label-switched-path MX2-MX5_ALTERNATE auto-bandwidth adjust-interval 300
    set protocols mpls label-switched-path MX2-MX5_ALTERNATE auto-bandwidth adjust-threshold 1
    set protocols mpls label-switched-path MX2-MX5_ALTERNATE auto-bandwidth minimum-bandwidth 2m
    set protocols mpls label-switched-path MX2-MX5_ALTERNATE auto-bandwidth maximum-bandwidth 10m
    set protocols mpls label-switched-path MX2-MX5_ALTERNATE auto-bandwidth resignal-minimum-bandwidth
    set protocols mpls label-switched-path MX2-MX5_ALTERNATE primary MX4
    set protocols mpls path MX4 24.24.24.4
    set protocols mpls path MX2
    set protocols mpls path MX5 25.25.25.5
    set protocols mpls interface all
    set protocols bgp group INT type internal
    set protocols bgp group INT import TEST-20
    set protocols bgp group INT export TEST-10
    set protocols bgp group INT neighbor 5.5.5.5 local-address 2.2.2.2
    set protocols ospf traffic-engineering
    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
    set protocols ospf area 0.0.0.0 interface ge-0/0/3.0
    set protocols ospf area 0.0.0.0 interface lo0.0 passive
    set policy-options policy-statement LOAD_BALANCE then load-balance per-packet
    set policy-options policy-statement TEST-10 from route-filter 10.10.10.0/24 exact
    set policy-options policy-statement TEST-10 then accept
    set policy-options policy-statement TEST-20 from route-filter 20.20.20.0/24 exact
    set policy-options policy-statement TEST-20 then accept

     

     

     

     



  • 2.  RE: Per prefix load balancing for IBGP over LSP
    Best Answer

    Posted 07-24-2020 23:34

    Hello,

     


    @sarahr202 wrote:


    set routing-options forwarding-table export LOAD_BALANCE
    <skip>
    set policy-options policy-statement LOAD_BALANCE then load-balance per-packet

     


     

    This configuration disables per-prefix LB and enabled per-flow LB.

    For the avoidance of doubt:

    1/ JUNOS per-prefix LB is the default when no policy is applied to forwarding table. Per-prefix means if there is a large set (at least hundreds) of prefixes that are resolved via ECMP LSP, then traffic towards a portion of this large prefix set is forwarded over  

    individual LSP 1, traffic towards another portion of large prefix set is forwarded over individual LSP 2, and so on until individual LSP X. The algorithm of distribution for individual prefixes into "portions" is NOT ROUND ROBIN

    2/ JUNOS per-flow LB is enabled with policy applied to forwarding table and traffic distribution between individual LSP changes: now each individual flow when e flow means a unique combination of src IP, dst IP, if TCP or UDP also src port & dst port is mapped to individual LSP.  The algorithm of mapping individual flows to individual LSPs is NOT ROUND ROBIN.

     


    @sarahr202 wrote:

     

    7) Per packet ( per flow) load balancing is configured  on MX2 which in turns installs two LSP paths to 20.20.20.0/24 in forwarding table.

    8] Per prefix load balancing is configured on MX2.

     

     

    It's either one or another. Per prefix or per flow. Not 2 together for the same prefix. You LB config is per-flow.

    You need much more flows to see effect of per-flow load-balancing - please widely vary UDP ports in Your iperf setup, ideally use all src ports 1-65535 and all dst ports 1-65535, to see LB.

     

    HTH

    Thx

    Alex