08-05-2020 11:42 AM
Hi there!
We have an ASR 9001 that I'm wanting to better balance our outbound traffic for.
Our setup is as follows
Router -> Tier 1 ISP X
Router -> BGP peer with another public ASN -> Tier 1 ISP Y
It was easy to balance the incoming traffic, I simply prepended our ASN once to ISP X, however I'm having a difficult time balancing outbound traffic.
Ideally what I'd like to do is simply strip out the ASN that's in the middle of going to ISP Y so that BGP bestpath is more accurate. However I have not found a way to do this, as it's a public ASN.
Any assistance or ideas would be appreciated.
Thanks!
Solved! Go to Solution.
08-17-2020 03:48 PM - edited 08-17-2020 03:49 PM
Hello
@blacksnow94 wrote:
Thanks Paul, I appreciate the assistance. Would this failover to the other ISP if said ISP it's set as the next-hop to failed? It doesnt seem like it to me, but I could be wrong.
Hello
A rudimentary resilience for pbr would be to specify a second next hop in the same route
map or you could apply some ip verification on the tracking which is a little more configuration but a lot more deterministic
ip sla 10
icmp-echo <next-hop>
ip sla schedule 10 start-time now life forever
track 10 rtr 10 reachability
route-map xx
set ip next-hop verify-availability <next-hop>
08-05-2020 01:11 PM
Hello,
you cannot strip a public AS number from the AS path. Why don't you simply use weight ?
08-05-2020 02:20 PM - edited 08-05-2020 02:22 PM
Hello @blacksnow94
If this is a single router with dual ebgp peering then as stated you can utilize the bgp weight path attribute (which isn't really a PA) to engineer egress traffic based on various criteria such as an access/prefix list or as-path regular expression.
See attach file for example:
08-05-2020 03:30 PM
Hi Paul,
Thanks, I appreciate the assistance. Yes, it's a single router connected to two eBGP peers. Perhaps I'm missing a concept with weighting, but the weight I have tried to set simply forces it all out one peer or another, it does nothing to balance it. Below is what I've tried for my BGP neighbors:
neighbor xxx.xxx.xxx.xxx remote-as ISP1/X description ISP1 local address 123.456.78.10 update-source Bundle-Ether1.2039 address-family ipv4 unicast weight 400 route-policy ISP1-in in allowas-in 1 route-policy ISP1-out out soft-reconfiguration inbound ! neighbor yyy.yyy.yyy.yyy remote-as ISP2/Y ebgp-multihop 10 description ISP2 local address 123.456.78.9 update-source Bundle-Ether1.2038 address-family ipv4 unicast weight 500 route-policy ISP2-in in allowas-in 1 route-policy ISP2-out out soft-reconfiguration inbound !
In this configuration all traffic is forced out ISP2.
My route-policies are pretty ordinary, outbound I have if destination is in our prefix lists then pass, else drop and for ISP X I have a prepend 1 time.
08-05-2020 03:39 PM
Hello
That is because you have a weight preferential for the whole peering for isp2 to be preferred over isp1, review the example i provided and apply the similar concept lon that software which looks like ios-xe?
08-05-2020 03:46 PM
Hi Paul,
Yeah, IOS-XR (ASR 9001). Based on your example it looks like you're matching the ASN, which to me seems it would do the same thing as applying to the neighbor, unless I'm missing something. Both peers are sending a full route table. So if I set a weight of 500 to match the AS of ISP 1 and a weight of 600 to match the AS of ISP 2, it'll do the same thing as applying it to the neighbor, or am I missing something there?
Once again, I really appreciate your assistance.
08-05-2020 04:18 PM - edited 08-05-2020 04:20 PM
Hello
The weight values are arbitrary those are just examples i provided based on a specific regex attribute such as an specific as-path value in a an advertising prefix or access-control/prefix lists match
Basically with this weight PA you can be quite deterministic in your egress path selection using this form of configuration so if you have a certain route advertised from both isps and you would like to use via a certain ebgp peer to reach that route then you can do this just using the weight path attribute.
08-05-2020 04:26 PM
Hi Paul,
The prefixes are advertised out each peer so that it's multi-homed. It sounds like using the weight attribute I would just have to split up my prefix lists and set half of them to prefer ISP 1 and half of them to ISP 2 to get some sort of balance.
I was hoping to have a better bestpath determination, actually comparing the number of ASN's (minus one) but it sounds like that's not possible.
08-06-2020 01:07 AM - edited 08-06-2020 01:08 AM
Hello
Can you elaborate on how you wish to LB your traffic, path determination based on weight and regular expression can be very powerful however it depends on what you’re looking for.
Another alternative could be to implement performance edge routing, Which can optimize your traffic path based on monitoring results of traffic flow/volume etc…) here
08-06-2020 09:03 AM
Hello,
That's an interesting idea, I have not played with performance edge routing before. I'll definitely have to lab that out.
All I was trying to do was balance out the outbound traffic a bit better using as-path determination. Prepending a single AS worked nearly perfectly for inbound, so was hoping to do something of the same inbound, either prepending once outbound to the direct Tier 1, or removing the ASN that's in the middle for ISP Y.
08-06-2020 09:55 AM
Hello,
in addition to the other posts, have a look at topolofy 4 in the attached document...
https://showipbgp.com/sample-cisco-bgp-configuration-by-topology/
08-15-2020 10:58 AM
Alright, so based on ya'lls suggestion I'm trying a different route here.
I would like to weight a prefix-list of locally originated subnets to prefer ISP Y, however I'm struggling with the syntax for the route-policy.
Since weight is not an allowed outbound set command for route-policy in IOS XR, what is the proper syntax to use? I was assuming something like:
route-policy V4-ISPY-TO
if source in V4-PREF-ISPY
set weight 200
endif
... other rules
end-policy
However, that's not something that's allowed for an outbound policy. Any ideas on how to do that?
08-16-2020 03:19 AM
Hello
fyi you cannot advertise the weight PA - weight is only read locally on the rtr - you can set weight on prefixes being received by the rtr but not being advertise by it .
As you have discovered as-path prepending is a preferred way of advertising suggested ingress paths for the ISP peers either when this is based on all local originated or locally selected prefixes path determination can be accomplished.
For egress path determination you can utilise the weight pa only on a single bgp rtr with multiple egress paths but additionally you could also use regular expressions based on the any received prefixes as-path attributes.
However you won’t be able to remove the as-path information from any received ebgp prefixes
08-16-2020 03:24 PM
Hello,
Thanks, yeah so now what I'm trying to do is prefer one BGP peer, egress, for a local prefix-list of source subnets. Is there a way to do that?
08-17-2020 01:57 AM
Hello
@blacksnow94 wrote:
Hello,
Thanks, yeah so now what I'm trying to do is prefer one BGP peer, egress, for a local prefix-list of source subnets. Is there a way to do that?
Ingress traffic
Advertise those specific local subnets to either isp peers and as-path prepend on them towards the less preffered path (this would be for the return traffic)
Egress traffic
Policy base route on those specific local subnets towards the preffered ISP peer.
See attached file for an example:
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