BGP Question on ISP exclusion for a route

We want to exclude an ISP and want the traffic to choose the second ISP for route to corp HQ because of the latency reasons. Rest of the stuff we want to remain same. How can I do that with BGP?
totaramAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
rochey2009Connect With a Mentor Commented:
Sorry, I made an error in my previous post, you don't need the ip as-path since the configuration is specific to a the neighbor that you want to set the weight. I've removed the parts that were in error.

example

router bgp 65000
 neighbor 192.168.0.1 remote-as 65001
 neighbor 192.168.0.1 route-map PREF_ROUTES in

// put the routes which your prefer to use AS 65001 in a prefix list
ip prefix-list PREF_ROUTE seq 5 permit 10.0.0.0/8

// the routes must match 10.0.0.0/8
route-map PREF_ROUTES permit 10
 match ip address prefix-list PREF_ROUTES
 set weight 100
!
// let other routes through unchanged (without this other routes will be filtered)
route-map PREF_ROUTES permit 20

the default weight is 0 and the route with highest weight will be considered best
0
 
gheistCommented:
add metric
0
 
rochey2009Commented:
Hi,

Are you running iBGP or are you redistributing into an IGP onto your internal network?
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
totaramAuthor Commented:
Just running BGP, with ISPs getting the traffic out,,, no reditribution
0
 
gheistCommented:
you also get traffic in and it might come from the unpreferred peer.
setting small weight of route will ensure it gets less traffic TO the peer.
0
 
rochey2009Commented:
Just a single router connected to two ISPs?
0
 
totaramAuthor Commented:
Yes, single router connected to two ISPs..

We are not much concerned about the incoming traffic, only outbound, that too to only one location and specific IP address prefix.

Speaking of prfix, can one use prepend as in the following:
 'neighbor aa.bb.cc.dd prefix-list Outbound out prepend <asn_num>'
0
 
rochey2009Commented:
no I don't think so, you need to set a route-map to do AS prepending, but you don't need that in this case because you'd do that to influence which ISP inbound traffic would take. For outbound traffic you can use a bgp inbound route-map to set the weight of the preferred route to HQ.

please can you post your BGP configuration
0
 
totaramAuthor Commented:
Could you provide a example on how to set weight for the preferred route? IDo you mean the community string for the route-map?
0
 
rochey2009Commented:
example

router bgp 65000
 neighbor 192.168.0.1 remote-as 65001
 neighbor 192.168.0.1 route-map PREF_ROUTES in

// for routes via ASN 65001
ip as-path access-list 1 permit _65001_

// put the routes which your prefer to use AS 65001 in a prefix list
ip prefix-list PREF_ROUTE seq 5 permit 10.0.0.0/8

// the routes must match 10.0.0.0/8 and they must be though AS 65001
route-map PREF_ROUTES permit 10
 match ip address prefix-list PREF_ROUTES
 match as-path 1
 set weight 100
!
// let other routes through unchanged (without this other routes will be filtered)
route-map PREF_ROUTES permit 20

the default weight is 0 and the route with highest weight will be considered best
0
 
totaramAuthor Commented:
Should it not be PREF_ROUTE instead of PREF_ROUTES in the following stmt:

match ip address prefix-list PREF_ROUTES
0
 
rochey2009Commented:
sorry, yes it should be.
0
 
totaramAuthor Commented:
Couple of more doubts Rocckey2009,

1. How is your scheme better than prepending the undesirable route?

2. You made use of weights, how is it different from setting commuity string in the route-map? Can one use both community-string and weight??
0
 
rochey2009Commented:
Which location are you intending to make the change - HQ or a remote site?
0
 
totaramAuthor Commented:
Remote site.. coming in HQ
0
 
rochey2009Commented:
The remote site is receiving a route for HQ from two BGP peers, one peer to ISP A and the other to ISP B. You want to route towards HQ via ISP B for example just for the HQ network. On the remote router you set the weight for ISP B to a higher value than ISP A (default weight is 0 so no need to set it for this peer) for the HQ route. Weight is the first BGP attribute that gets checked. I've tested this in a lab and this works. Have I understood your requirements?
0
 
totaramAuthor Commented:
Yes.. it is the exact scenario.... ISP A B provide the redundance
0
 
rochey2009Commented:
as path prepending would be used if we were originating a prefix to both ISPs and we wanted to make the prefix undesirable by giving it a longer path. We're not doing that in this case. We're modify prefixes received.

You don't have any other routers running BGP so setting the weight will achieve your goals.
0
 
totaramAuthor Commented:
Roochy2002;

If we have something like following in the config at remote, would it not delay 3 AS-Distance in comcast route, the ISP B (preferred) would go normal:

route-map Comcast_route permit 10
 match ip address prefix-list Comcast_outbound
set as-path prepend 29710 29710 29710

router bgp 29710
neighbor comcast_peer_ip_addr route-map Comcast_route out
0
 
rochey2009Commented:
Which prefix is defined in the Comcast_outbound prefix-list?
0
 
totaramAuthor Commented:
The prefix that originates from the remote site, it is prefixed for both preferred and non-preferred paths but with route-map comcast_outbound, it has been made unpreferred.
0
 
totaramAuthor Commented:
The same prifix for both the ISP...
0
 
rochey2009Commented:
Which site does the prefix belong to?
0
 
totaramAuthor Commented:
remote... when we are advertising from remote, it can only advt its prefixes.
0
 
rochey2009Commented:
Ok but I thought you were only interested in changing the route for HQ and not the route into remote. In that case the AS-PATH prepending should do the trick.
0
All Courses

From novice to tech pro — start learning today.