Routing

Expand all | Collapse all

Source based forwarding BGP

Jump to Best Answer
  • 1.  Source based forwarding BGP

    Posted 04-16-2018 01:09
      |   view attached

    Hi,

     

    I have a customer VRF with two connections to the customer's HQ using BGP (customer is advertising default route on both). I would like to be able to decide which branch site's traffic that should chose which BGP connection - in direction towards the HQ.

    For example, in the picture attached, customer traffic from PE3 and PE4 should use BGP connection on PE1 as primary. And customer traffic from PE5 should use the BGP session on PE2 as primary. I guess some kind of source based forwarding or similar. Is this possible?

     

    Erac



  • 2.  RE: Source based forwarding BGP
    Best Answer

    Posted 04-16-2018 01:36

    Hello,

    One solution would be:

    1/ on each route-originating PE, add a standard community to the advertised routes, do it in VRF-EXPORT policy:

     

    ## PE-1 example:
    set policy-options community std-iam-from-pe1 members 64512:301
    set policy-options community rt-cust-vrf members target:64512:3000
    set policy-options policy-statement pe1-vrf-export term 1 from <match conditions go here>
    set policy-options policy-statement pe1-vrf-export term 1 then community add std-iam-from-pe1
    set policy-options policy-statement pe1-vrf-export term 1 then community add rt-cust-vrf
    set policy-options policy-statement pe1-3vrf-export term 1 then accept
    set routing-instances CUST-VRF vrf-export pe1-vrf-export

    2/ on each route-receiving PE, match on the community && increase Local Preference, do it in VRF-IMPORT policy

     

     

    ## PE-3 example
    set policy-options community iam-from-pe1 members [ 64512:301 target:64512:3000 ]
    set policy-options community iam-from-pe2 members [ 64512:302 target:64512:3000 ]
    set policy-options policy-statement pe3-vrf-import term 1 from community iam-from-pe1
    set policy-options policy-statement pe3-vrf-import term 1 then local-preference 200
    set policy-options policy-statement pe3-3vrf-import term 1 then accept
    set policy-options policy-statement pe3-vrf-import term 2 then community iam-from-pe2
    set policy-options policy-statement pe3-3vrf-import term 2 then accept
    set routing-instances CUST-VRF vrf-import pe3-vrf-import

    HTH

    Thx

    Alex

     



  • 3.  RE: Source based forwarding BGP

    Posted 04-21-2018 22:07

    Hi Alex,

     

    This is exactly what I was looking for. Thanks a lot for the help!!

     

    Erac