Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

BGP, prefer path to remote endpoint with route map

We do business with a company that has two ISP connections to Internet.

This company advertises their IP Address block from both providers, but the preferred path from us to them has more latency than the other path does.

I can see from traceroute that the prefered path goes through fewer AS "hops" than the less desired path.

The two endpoints are in different AS.

Our connection to them always takes the shortest AS path and I would like to see if the other path is any better.

Our Internet provider provides only a default route to us, and I can only make changes to my Internet router.

Is it possible for me to force our traffic to take the path of the less desired AS with a route map?

Both paths take the backbone AS 123 (example), until jumping onto AS 200 (example) and AS 300 (example) respectively.

Could I configure weight per the endpoint AS#, something like this?

I am thinking this wouldn't work because there is nothing in the BGP table that corresponds to the endpoint IP Addresses, only default route.

!

router bgp 5432

no synchronization

bgp log-neighbor-changes

network 2.4.6.8 mask 255.255.255.224

neighbor 1.2.3.4 remote-as 123

neighbor 1.2.3.4 route-map SET-WEIGHT in

no auto-summary

!

!

route-map SET-WEIGHT permit 10

description Set weight on Vendor 1

match as-path 200

set weight 1

!

route-map SET-WEIGHT permit 20

description Set weight on Vendor 2

match as-path 300

set weight 50000

!

6 REPLIES

BGP, prefer path to remote endpoint with route map

Unfortunately, if your provider is only advertising a default route to you you wouldn't be able to choose your path. You might be able to get in touch with your provider to see if they can so some routing for you toward the preferred path that you want to take though.

HTH,

John

HTH, John *** Please rate all useful posts ***
New Member

Re: BGP, prefer path to remote endpoint with route map

If I do a trace route from my end point to both of the other endpoints, I see only two AS numbers in both trace routes.

I see our local AS, jump onto a backbone AS, then jump on to each respective remote AS.

There are the same number of hops seen all the way to each remote AS, once we get on the remote AS, the preferred path we are taking is only four hops inside AS 200 and the other less desired path is eight hops inside AS 300.

Would this be considered an AS path issue even though the four hops and eight hops are in their respective AS?

Or would BGP see the four hops as a single AS and the eight hops as a single AS and there would be some other metric causing the path to be taken?

Re: BGP, prefer path to remote endpoint with route map

There could be many reasons why this path is being taken as opposed to the other. Are you taking the less preferred AS 300? If so, there could be a routing policy that's preferring that path over the better AS200. I could be completely off base, but are you laid out like this:

   AS200       AS300

       \                /

     ISP          ISP

        \             /

         \           /

             ISP

               |

               |

            YOU

If so, there's nothing that you can do that I'm aware of to influence your routing to the other company if the ISP you have is providing you with just a default route. If the above picture is incorrect, please let us know how you're set up.

HTH,

John

HTH, John *** Please rate all useful posts ***
New Member

Re: BGP, prefer path to remote endpoint with route map

I am taking the path that has the least number of hops in AS 200, I just am not sure why this is the preferred path.

In your example shown, the path is the exactly the same across the "ISP", what is different is the number of hops inside each respective AS.

I am taking the path that has the fewer number of hops inside the remote AS. Both paths have the same number of total AS in their paths.

Do the number of hops inside an AS make one path preferred over the other?

For example would BGP AS path preference prefer four hops inside AS 200, or eight hops inside AS 300 if everything else is equal, or would that not necessarily be a factor?

BGP, prefer path to remote endpoint with route map

It's not necessarily a factor. There's a path selection process that BGP uses. Along the path, owners of blocks and ISPs can manipulating routing metrics, local prefs, weights, etc, in order to influence the path that BGP goes across. One path that may have 8 hops could be preferred for many reasons. One reason could be that the company that you're connecting to may want their incoming traffic for certain prefixes to go through AS 200 and other prefixes go to AS 300. They may not be doing anything with their metric other than simply advertising with BGP and letting the provider change. The providers may have a routing policy set up because provider A (AS 200) may have a better backbone as opposed to a possibly smaller provider B (AS 300). The path selection process is like:

1. Highest Weight

2. Highest Local pref

3. Aggregate or network command (does the peering router advertise with the network command or is it coming from a transit AS)

4. AS path (shortest AS path preferred)

5. igp, egp, or unknown origin (each one preferred over the next)

6. MED (this is a metric that's used to manipulate incoming routes)

8. ebgp over ibgp

There are others, but generally you won't get past 6 (at least in my environment). So out of this list, a lot of things can be manipulated to make a route more or less preferred. If the company that you're doing business with isn't manipulating prefixes before advertising to the provider, then the provider could be doing something.

John

HTH, John *** Please rate all useful posts ***
New Member

BGP, prefer path to remote endpoint with route map

Thanks for the replies.

What makes me thing the provider is not doing anything is that when a traceroute is done from the remote end, the two remote ISP providers take their path, then once they get on the backbone, they both take the exact same path to get to me.

Forgive me if this is basic, but something I am not sure of:

We have a VPN tunnel to the remote company, if they do a traceroute to me, it is different than if I do a traceroute to them, how does the tcp communication exist with asymetric traffic paths?

546
Views
15
Helpful
6
Replies