cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
379
Views
0
Helpful
5
Replies

Problem with sending BGP route out with AS path prepending

gwhuang5398
Level 2
Level 2

I have 3 routers: one is a remote router, and two are the ISP facing routers. The two ISP routers are running BGP with the remote but not in between. My goal is to have one ISP router send out a default route as preferred, and the same time, have the other ISP router also send out a default router, however with AS path prepended, so it becomes a backup route.

Here are the relavent BGP configs. I have seen both routers sending default route out to its BGP neighbors, but on the remote router I'm seeing only one default route in BGP table. Should I see two routes in remote's BGP table, with one being a longer AS path?

How can I fix the problem? There's no filtering on the remote router.

ISP1#

router bgp 1

network 0.0.0.0

neighbor x.x.x.x remote-as xx

neighbor x.x.x.x route-map BGP out

route-map BGP permit 10

match ip address prefix-list DEFAULT

ip prefix-list DEFAULT permit 0.0.0.0/0

ISP2#

router bgp 1

network 0.0.0.0

neighbor x.x.x.x remote-as xx

neighbor x.x.x.x route-map BGP out

route-map BGP permit 10

match ip address prefix-list DEFAULT

ip prefix-list DEFAULT permit 0.0.0.0/0

set as-path prepend xx xx xx

Thanks a lot.

5 Replies 5

Istvan_Rabai
Level 7
Level 7

Hi Gary,

Please make sure the "set as-path prepend xx xx xx" command is under the "route-map BGP permit 10" command:

route-map BGP permit 10

match ip address prefix-list DEFAULT

set as-path prepend xx xx xx

Cheers:

Istvan

Hi, thanks. I have "set as-path" under router-map. I just copy pasted wrong in the first posting.

Thanks.

Are you running EBGP or IBGP with the ISP facing router and the remote router?

In order to prefer a certain ISP from the remote router, you can use other attributes like the local preference etc rather than playing with AS-paths

Narayan

Hi Narayan:

Here is the conncetivity:

ISP1 ---- Service Provide cloud --- Remote Rtr

ISP2 ---- Same Provider cloud ----- Remote Rtr

ISP1, ISP2, and Remote Rtr all have the same private AS #. Provider cloud is a public AS #.

There is no BGP neighboring between ISP1 and ISP2, but they learn each other's BGP advertisements. My goal is to have the remote router learn ISP1's BGP default route as the preferred, and ISP2's BGP default route as backup.

If I set local preference for the default route out from ISP1 and ISP2, the service provider cloud can pass that along. But when the routes are handed over to Remote router in a different AS as provider, would the local preference lost?

Thanks

Hello Gary,

on remote router if it is under your control

neighbor ISP1 weight 500

the local preference is not passed over another BGP AS.

Hope to help

Giuseppe

Review Cisco Networking products for a $25 gift card