01-27-2020 08:20 AM
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 ?
01-27-2020 08:38 AM
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.
01-27-2020 09:23 AM
Could you please put an example ?
01-27-2020 10:22 AM
01-27-2020 01:10 PM
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
01-27-2020 09:14 PM
01-28-2020 06:31 AM
01-28-2020 10:24 AM
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
!
01-28-2020 11:41 AM
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.
01-28-2020 11:51 AM
01-28-2020 11:44 AM
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
01-28-2020 11:50 AM
01-28-2020 11:59 AM
Don't just send a default route from R1, R5. Send LAN IP such as 10/24, 30/24, 50/24 etc as well.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide