cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
12505
Views
10
Helpful
11
Replies

Removing AS-PATH

mkamar
Level 1
Level 1

Hi;

  R1 is peering with two private MPLS providers, Unfortunatily there is some AS number conflict between the two providers, and R1 want to act as a transit between the two providers, how can i remove the AS path from the provider when i receive the route and advertise it with R1 AS number only, I know that aggregate can solve this problem but it's hard to maintain each single route coming from each provider and aggregate it, What i'm looking for is to clean the AS path coming from each provider and adverise the same route with R1 provider, thanks

1 Accepted Solution

Accepted Solutions

i had same issue before like this

you can solve it using one of the methods bellow

1 - use bgp route aggregation: in the way the route will be sourced from the router making the aggregation

for example

R1 AS 100  --- R2 AS 200--- R3 AS 400

if you aggregate a route recieved from AS 100 the AS path will be seen by AS 400 for that aggregate route will 200 only

but when you use this method you need to be careful about the aggregation advertisement direction

if you have route from AS 200 need to be advertised to AS 400 and ths AS path has 400 in it this will be dropped by R3 above

aggregate this route then deny this aggregate using route-map from being send back to AS 100 R! above

and same idea for the other side

also be careful from making a large summary because this will make blackballing !!

2- as mentioned above the command as-override can help you but it is available only under bgp vrf address-family only

what you can do is create a VRF and put all the of you router interfaces under this VRF

now when you configure BGP go to the vrf address famaly and you cnuse the as-override command

good luck

if helpful Rate

View solution in original post

11 Replies 11

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Mkumar,

you can use neigh x.x.x.x as-override to have the private AS number replaced by an occurrence of local AS number (under the conditions desribed by Edison in his post)

if the conflict is not on the first AS things are more complex and probably your best option is to aggregate

another command that could be used is:

neighbor  remove-private-as

http://www.cisco.com/en/US/partner/docs/ios/iproute_bgp/command/reference/irg_bgp3.html#wp1067523

that may be able to handle longer AS paths made of private AS numbers

Hope to help

Giuseppe

Edison Ortiz
Hall of Fame
Hall of Fame

you can use neigh x.x.x.x as-override to have the private AS number replaced by an occurrence of local AS number

Caveat: as-override can only be used at the PE under the BGP VRF SAFI. This command is not available for non-VRF IPv4 BGP neighbors.

Regards

Edison.

Thanks Giuseppe, Edison for being interest on my discussion, As you said as-override can only be used at the PE under the BGP VRF, So i can't use it here, Also as you know remove-private-as will not work if there is one public as in the as-path, and as you know some private MPLS providers are using their public AS number in their core, Do you know any other work around, thanks

Hi,

is the AS number conflicting one of the neighbor AS numbers you are peering to directly?

Or generally somewhere in the AS-PATH?

I see only two possibilities generally:

a) The provider would have to use "neighbor ... allowas-in" command to permit his AS number within the AS-PATH of prefixes received.

b) You would have to configure mutual redistribution  between BGP and an IGP (OSPF, e.g.) within your AS.

This is what I've done a year ago to fix similar problem and it was pretty complicated.

Impossible to configure on one router only.

BR,

Milan

Thanks Milan;

  I think the 1st option is hard to be maintained as the two provider in this case should issue allowas-in in all current and conflicting sites VRFs, I don't know why Cisco don't offer as-override in the CE to make our live easier ? Anyway I like the idea of mutual redistribution to IGP, although it's complicated but i think it's the only option allow me advertise the same routes without aggregate and with my AS#, Can you share with me sample configuration? Thanks

i had same issue before like this

you can solve it using one of the methods bellow

1 - use bgp route aggregation: in the way the route will be sourced from the router making the aggregation

for example

R1 AS 100  --- R2 AS 200--- R3 AS 400

if you aggregate a route recieved from AS 100 the AS path will be seen by AS 400 for that aggregate route will 200 only

but when you use this method you need to be careful about the aggregation advertisement direction

if you have route from AS 200 need to be advertised to AS 400 and ths AS path has 400 in it this will be dropped by R3 above

aggregate this route then deny this aggregate using route-map from being send back to AS 100 R! above

and same idea for the other side

also be careful from making a large summary because this will make blackballing !!

2- as mentioned above the command as-override can help you but it is available only under bgp vrf address-family only

what you can do is create a VRF and put all the of you router interfaces under this VRF

now when you configure BGP go to the vrf address famaly and you cnuse the as-override command

good luck

if helpful Rate

Thanks Marwan for your answer, However i have one more question which is, If the aggregate route is also coming from AS400, in this case using aggregate in R2 will set the next hop to Null0 and R2 will not be able to reach R3, Is there a way to remove this Null0, Thanks

Hello Mkamar,

a couple of options:

use a floating static route with AD 220 to create the locally generated BGP route

use the modern way to create a BGP aggregate that is the aggregate command it should be the better way to do it.

Hope to help

Giuseppe

Thanks Giuseppe;

  you meant by the 1st option is to filter this aggregate route from R3 and generate my own in R2? or to receive the aggregate from R3 and generate the my own using floating static?, But i beleive if i receive it and put it as a network command still the router will consider the AS-PATH of the coming aggregate route, About the the 2nd option, The problem is that the aggregate is setting Null 0 as the next hop and i couldn't find a way to remove it, Or you mean something else by modern aggregate?

Best Regards;

MKamar

Hello Mkumar,

I mean aggregate-address command not network command

http://www.cisco.com/en/US/docs/ios/iproute_bgp/command/reference/irg_bgp1.html#wp1068191

>> Using the aggregate-address command with no keywords will create an aggregate entry in the BGP  or mBGP routing table if any more-specific BGP or mBGP routes are  available that fall within the specified range. (A longer prefix which  matches the aggregate must exist in the RIB.) The aggregate route will  be advertised as coming from your autonomous system and will have the  atomic aggregate attribute set to show that information might be  missing.

Hope to help

Giuseppe

in this case create a static route in R2 point to R3 and cover the aggregate route you recieve it from R3

this will fix it but it has one issue thats its not dynamic any change in the future to this rioute from R3 need to be change in R2 as well i mean updating this static route

good luck

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card