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

BGP Routing - Multihomed

colin.painter
Level 1
Level 1

Hi All,

 

I've come across a minor issue on our network which is something that hadn't crossed my mind when configuring our multihomed BGP environment.

I am learning a destination from our least preferred peer, within a /24 subnet. I am learning the same destination from our preferred peer within a /23 subnet.

Therefore regardless of my local-preference configuration, because the more specific route is being learnt, traffic is going out via our least preferred transit peer.

 

What is the most efficient way to control this, so our preferred transit, stays preferred?

 

Thanks

 

Colin

5 Replies 5

Hi

I think you shoud filter the traffic with prefix-lists from both peers and associated that with your local preference values.

 

Example:

ip prefix-list BGP seq 5 permit x.x.x.x/23

 

route-map ISP1 permit 5

match ip address prefix BGP

set local-preference 1000

 

route-map ISP2 permit 5

match ip address prefix BGP

set local-preference 500

 

router bgp 100

neighbor 1.1.1.1 route-map ISP1 in

neighbor 2.2.2.2 route-map ISP2 in

 

Hope it is useful

:-)




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

Thanks for the reply.
Sorry, I should elaborate a bit more. These peerings are downloading the full internet routing table and there are about 4000 prefix differences, where a more specific subnet is being learnt from the least preferred transit, judging by iBGP distribution. So that would be an unmanageable approach to prefix-list that many. :(

Do you recieve a /23 too from your lease preferred ISP?

You can filter receving /24 or more specific prefixes from it:

 

ip pref BLOCK-SPECIFIC deny 0.0.0.0/0 ge 24

ip pref BLOCK-SPECIFIC permit 0.0.0.0/0 ge le

router bgp 123

neighbor x.x.x prefix-list  BLOCK-SPECIFIC in

 

this way you will have 2 /23 paths, and you can apply local pref or other traffic engineering technique to direct your traffic as you want.

 

Please test this in a LAB to make sure you will get the results you are expecting.

 

Duplicate post - 


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

Hello

Just to add to julios post, you could try using prefix-list to accomodate local preferance.

ip prefix-list STAN  permit 0.0.0.0/23
ip prefix-list STAN2 permit 0.0.0.0/24

 

route-map Preferred-ISP permit 10
match ip address prefix-list STAN
set local-preference 20000

route-map Preferred-ISP permit 99

 

route-map least-Preferred-ISP permit 10
match ip address STAN2
set local-preference 10000

route-map least-Preferred-ISP permit 99


router bgp  xx
neighbor x.x.x.x route-map Preferred-ISP in
neighbor x.x.x.x route-map least-Preferred-ISP in

If that isnt applicable then you could try using a EEM script with an AS-Path filter to match on the say a  AS these prefixs originate from or transit through or even both.


ip as-path access-list 5 deny _1111_
ip as-path access-list 5 permit .*

ip sla 10
icmp-echo x.x.x.x source-IP  x.x.x.x
ip sla schedule 10 life forever start-time now

track 1 rtr 10 reachability
event manager applet ISP1-UP
event track 1 state up
action 5.0 cli command "enable"
action 5.1 cli command "conf t"
action 5.2 cli command "router bgp xx"
action 5.3 cli command "neighbour filter-list 5 in"
action 5.4 cli command "end"

event manager applet ISP1-DOWN
event track 1 state down
action 5.5 cli command "enable"
action 5.6 cli command "router bgp xx"
action 5.7 cli command "no neighbour filter-list 5 in"
action 5.8 cli command "end"

res
Paul


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
Review Cisco Networking for a $25 gift card