Routing
Highlighted
Routing

Source based forwarding BGP

‎04-16-2018 01:09 AM

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

Attachments

2 REPLIES
Routing
Solution
Accepted by topic author ErAc
‎04-21-2018 10:07 PM

Re: Source based forwarding BGP

‎04-16-2018 01:36 AM

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

 

_____________________________________________________________________

Please ask Your Juniper account team about Juniper Professional Services offerings.
Juniper PS can design, test & build the network/part of the network as per Your requirements

+++++++++++++++++++++++++++++++++++++++++++++

Accept as Solution = cool !
Accept as Solution+Kudo = You are a Star !
Routing

Re: Source based forwarding BGP

‎04-21-2018 10:07 PM

Hi Alex,

 

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

 

Erac