cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3396
Views
12
Helpful
34
Replies

BGP as-path prepend for specific destination

mirage
Level 1
Level 1

Dear all,

I have a following topology in my lab:

R1 (as 208097) -- > R2 ISP (as16010)  -- R3 (as 35805)

                                                |

                                      R4 (as 10101)

I want to

prepend

my announce for AS35805 only with

as-path access-list

and

route-map

like this:

R1

interface FastEthernet0/0
ip address 2.2.2.1 netmask 255.255.255.252
duplex auto
speed auto

router bgp 20809
no synchronization
bgp router-id 1.1.1.254
bgp log-neighbor-changes
network 1.1.1.0 netmask 255.255.255.0
neighbor 2.2.2.2 remote-as 16010
neighbor 2.2.2.2 route-map BGP_OUT_RMAP out

ip as-path access-list 50 permit ^20809 16010 35805$
ip as-path access-list 50 deny .*

ip prefix-list MM seq 10 permit 1.1.1.0/24

route-map BGP_OUT_RMAP permit 10

match ip address prefix-list MM
match as-path 50
set as-path prepend 20809 20809

 

But it doesn't work

Does it possible?

 

34 Replies 34

Perfect answer,

 

But more details about my test:

I turned off R1 (main router) and bgp announce changed on R5(for example), but when it returns in active state, toute table does not change at R5 until I clear bgp session on R2 (backup router). What is a solution for returning best path again on R5 except EEM (I can configure EEM event on R2 when R1 returns in active state)?

Thanks in advance.

 

Both primary and backup in same as' run bfd it will immediately detect neighbor up/down fast than depend on bgp hello.

I thy this way too, and will write results..

mirage
Level 1
Level 1

Done without bfd, there was little misconfiguration.

Many thanks for all!

and from me and all you are so welcome 

Review Cisco Networking for a $25 gift card