cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
694
Views
0
Helpful
3
Replies

BGP Prepend

JAMT
Level 1
Level 1

We have two router running iBGP and we have 3 ISPs all are in EBGP setup, 1 ISP connected to R1 and two ISPs connected to R2. x.x.67.0 network was originated in R1 and advertising thru BGP and we want when reaching this network it should use the primarily the WAN_LINK1 of R2. Therefore, i prepend the ISP peered to R1 and R2 WAN_LINK2 ISP, thus x.x.67.0 should learned primarily on WAN_LINK1 but when i checked x.x.67.0 network best path is learned from WAN_LINK2 ISP of R2. 

 

Here are the configurations 

 

R1

router bgp xx11
bgp router-id x.x.192.254
bgp log-neighbor-changes
network x.x.67.0

R2

interface GigabitEthernet0/0/3
description WAN_LINK1
ip flow monitor NTAMonitor input
ip flow monitor NTAMonitor output
ip address x.x.67.62 255.255.255.252
ip nat outside
ip access-group DENY_ACCESS in
speed 1000
no negotiation auto
!
interface GigabitEthernet0/0/4
description WAN_LINK2
ip flow monitor NTAMonitor input
ip flow monitor NTAMonitor output
ip address x.x.15.246 255.255.255.252
ip access-group DENY_ACCESS in
negotiation auto
!
router bgp xxxx
bgp router-id x.x.66.1
bgp log-neighbor-changes
neighbor x.x.15.245 description WAN_LINK2
neighbor x.x.15.245 soft-reconfiguration inbound
neighbor x.x.15.245 route-map LINK2_IN in
neighbor x.x.15.245 route-map LINK2_OUT out
neighbor x.x.15.245 filter-list 1 out
neighbor x.x.67.61 remote-as xxxx
neighbor x.x.67.61 description WAN_LINK1
neighbor x.x.67.61 soft-reconfiguration inbound
neighbor x.x.67.61 route-map LINK1_OUT out
neighbor x.x.67.61 filter-list 1 out
!
ip prefix-list 67_Block seq 5 permit x.x.67.0/24 le 32
!
route-map LINK2_IN permit 10
set local-preference 200
!
route-map LINK1_OUT permit 10
match ip address prefix-list Block66 67_Block
!
route-map LINK1_OUT permit 20
match ip address prefix-list 64_Block 65_Block
set as-path prepend 7611 7611
!
route-map LINK2_OUT permit 10
match ip address prefix-list 64_Block
!
route-map LINK2_OUT permit 20
match ip address prefix-list 65_Block 67_Block 66_Block
set as-path prepend 7611 7611

 

Can someone assist me what need to check or need to add on the configuration on our BGP. 

 

Thanks a lot.

3 Replies 3

Hello
Looks like your route-map is incorrect, what you need to as-prepend matching on the prefix-list and then apply a catch al stanza at the end for any other traffic not maching the PF, Maybe adding an additional asn to one of the less preferred isp links in event of failover

 

Exampe:

route-map LINK1_OUT permit 10
match ip address prefix-list Block66 67_Block
set as-path prepend 7611 7611

 

route-map LINK1_OUT permit 20


route-map LINK2_OUT permit 10
match ip address prefix-list Block66 67_Block
set as-path prepend 7611 7611 7616

 

route-map LINK2_OUT permit 20

 

clear ip bgp * soft  <--perfrom a route-refresh soft reset


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Harold Ritter
Level 12
Level 12

Hi @JAMT ,

 

but when i checked x.x.67.0 network best path is learned from WAN_LINK2 ISP of R2. 

 

Where did you precisely check? On an Internet looking glass? Please provide more information on this.

 

Regards,

 

 

 

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Yes I used looking glass when i checked the bgp route.

Review Cisco Networking for a $25 gift card