cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2143
Views
0
Helpful
12
Replies

How can seperate Upload/Download Traffic usig BGP

RH Shakib
Level 1
Level 1

Dear all, Can anyone help me how can i separate upload/Download traffic using Border gateway Protocol (BGP). I've advertised 30.0.0.0/24 to R1 and 50.0.0.0/24 to R5. I want to separate each block to each upstream. how can i do this ?

12 Replies 12

rais
Level 7
Level 7

You have correctly advertised unique /24s to each upstream to diversify the downstream. Similarly, for upstream just make sure to have different destination prefixes be preferred over different upstream.

HTH.

Could you please put an example ?

 

Could please paste an exampl?

If you have advertised already each block to each ISP you are done with downstream. For upstream you have can use bgp local preference attribute for the prefixes you learn from each provider. 

If they are ISP borders (full routing table) it is quite difficult to differentiate based on received prefixes.

You can have a look here for some scenarios:

https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13762-40.html

 

 

 

We use local preference for inbound filter, if i use local preference then which local preference is high then we will get high priority Route in our routing table, but my question how my prefix will know his exit path. Example if i trace from 30.0.0.0/24 how the prefix knows the exit path.
Explain please

The exit path depends on how you treat prefixes received from ISP.
E.g:
If you have two BGP sessions with two ISPs (advertising the same prefixes) then for prefixes received from ISP1 assume you assign them local preference 100.
For prefixes received from ISP2 assume you assign them local preference 50.
The higher local preference the better so for a learned prefix BGP will prefer ISP1 and will update routing table accordingly.
In every router that is participating on the routing of your AS this piece of information will be propagated.
If you trace from one these routers the exit point will be ISP1.
Using Local preference is one way to achieve this but there are still alternative ways.
I suggest you to have a look on the link I send you on my previous reply.

Please see the configuration of R2:

 

interface Ethernet0/0
description From-R1
ip address 10.0.0.2 255.255.255.252
shutdown
!
interface Ethernet0/1
description From-R3
ip address 20.0.0.1 255.255.255.252
!
interface Ethernet0/2
description From-R5
ip address 40.0.0.2 255.255.255.252
!
interface Ethernet0/3
no ip address
shutdown
!
router bgp 200
bgp log-neighbor-changes
neighbor 10.0.0.1 remote-as 100
neighbor 20.0.0.2 remote-as 300
neighbor 40.0.0.1 remote-as 500
!
address-family ipv4
network 10.0.0.0 mask 255.255.255.252
network 30.0.0.0 mask 255.255.255.252
network 40.0.0.0 mask 255.255.255.252
neighbor 10.0.0.1 activate
neighbor 10.0.0.1 route-map R1-IN in
neighbor 10.0.0.1 route-map R1-OUT out
neighbor 20.0.0.2 activate
neighbor 40.0.0.1 activate
neighbor 40.0.0.1 route-map R5-IN in
neighbor 40.0.0.1 route-map R5-OUT out
exit-address-family
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
!
ip prefix-list R1-IN seq 5 permit 0.0.0.0/0
!
ip prefix-list R1-OUT seq 5 permit 50.0.0.0/30
ip prefix-list R1-OUT seq 15 permit 20.0.0.0/30
ip prefix-list R1-OUT seq 20 deny 0.0.0.0/0 le 32
!
ip prefix-list R1-OUT-PREP seq 10 permit 30.0.0.0/30
!
ip prefix-list R5-IN seq 5 permit 0.0.0.0/0
!
ip prefix-list R5-OUT seq 10 permit 30.0.0.0/30
ip prefix-list R5-OUT seq 20 deny 0.0.0.0/0 le 32
!
ip prefix-list R5-OUT-PREP seq 10 permit 20.0.0.0/30
ip prefix-list R5-OUT-PREP seq 20 permit 50.0.0.0/30
!
route-map R1-OUT permit 10
match ip address prefix-list R1-OUT
!
route-map R1-OUT permit 20
match ip address prefix-list R1-OUT-PREP
!
route-map R5-OUT permit 10
match ip address prefix-list R5-OUT
!
route-map R5-OUT permit 20
match ip address prefix-list R5-OUT-PREP
!
route-map R1-IN permit 10
match ip address prefix-list R1-IN
set local-preference 100
!
route-map R5-IN permit 10
match ip address prefix-list R5-IN
set local-preference 50
!

The routers are learning defaults only. Had there been full internet routes, load-balancing would be natural. In your situation, you would need aspath-relax in your bgp configuration. 

HTH.

How can do this, i'm new in BGP?

 

I may be misunderstanding what you are trying to do but if you want all traffic to use the same path both ways then you cannot control the outbound traffic with BGP a because you are trying to route on source IP. 

 

You would need something like PBR. 

 

Jon

How can , can you help me ?

Don't just send a default route from R1, R5. Send LAN IP such as 10/24,  30/24, 50/24 etc as well.

Review Cisco Networking products for a $25 gift card