cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2283
Views
0
Helpful
25
Replies

Multi Homed BGP - how to influence outbound path per ip

Brandon Baker
Level 1
Level 1

I have two providers and in which all my incoming traffic is somewhat balanced using route maps, currently all outgoing traffic just goes to one provider and if that provider goes down then it rolls to the other. Is there a way I can force an individual IP address or range to go out my other provider while both are active?

25 Replies 25

Will this work even though I have a full routing table coming from one ISP and only a default route from the other?

Hello


@Brandon Baker wrote:

Will this work even though I have a full routing table coming from one ISP and only a default route from the other?


Not so sure who this question was directed at but if it was response to my post then No the weight PA it won’t work as it only acts upon received routes and as a default route catches all it won’t be applicable -  I think @Richard Burts already stated this in one of his posts.

 

PBR I would say I’m this instance would be the best suggested solution 

 


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

No it will not work if you receive only a default route from one and some (or lots) routes from the other. You can use a route map to set either local preference or weight to prefer one ISP over the other when you receive advertisement from both ISP for the same prefix. If you receive only a default from one ISP then any other more specific routes from the other ISP will always be preferred.

 

HTH

 

Rick

HTH

Rick

Let me try to clarify a couple of things in hope that it might be helpful.

 

There are two attributes in BGP that you can set if you want to create some preference for routes advertised to you by a provider. One attribute is weight. This attribute is locally significant which means that it is effective if you are running BGP on a single router connecting to 2 providers. But it would not be effective if you were running BGP on 2 routers connecting to ISPs. The other attribute is local preference. This is effective if you are running BGP on multiple routers or on a single router. If you want to use either of these attributes you would set them using a route map applied to advertisements from your providers.

 

You can establish a preference only if both providers are advertising exactly the same route to you (same network and same mask). If one provider advertises a certain route to you and the other provider advertises something that is less specific (such as a default route) then the more specific advertisement will always be used. 

 

So in your case where one provider is advertising only the default route there is not anything you can do in BGP to route some traffic to that provider and PBR is the option you should look at.

 

HTH

 

Rick

HTH

Rick

Is a route-map what I would want to do then.., for exampe if I wanted to send 1.1.1.1 outbound traffic to ISP B (the one where I am only receiving the default route)

 

access-list 25 permit 1.1.1.1

route-map LOCALPREF permit 10
match ip address 25
set local-preference 500

route bgp ZZZZ
neighbor Y.Y.Y.49 (ISP B) route-map LOCALPREF in

There are a couple of things to address about your question. First and foremost setting local preference is only effective if both ISP have advertised that route to you. Since ISP B is only advertising a default route then this route map approach will not work for 1.1.1.1.

 

Secondly in the route map it is generally more effective matching using prefix list than access list, and if you use access list it is done with extended access list rather than standard access list.

 

HTH

 

Rick

HTH

Rick

Here is another thought which I hope may hep clarify what we are discussing. Using the attributes local preference or weight in BGP is very much like using administrative distance which is used to create preferences between types of routing entries. AD is what makes a connected route preferred over an OSPF route which is preferred over a RIP route. But AD only comes into play when you have exactly the same route (the same network and the same mask) from two different protocol sources. 

 

So lets think of a couple of examples.

If you have a connected route for 172.16.0.0/16 and an OSPF route for 172.16.0.0/16 then the connected route is preferred over the OSPF route. The connected 172.16.0.0 will be placed into the routing table and the OSPF route will not be placed in the routing table.

But if you have a connected route for 172.16.0.0/16 and you have an OSPF route for 172.16.0.0/24 then AD does not come into play and the OSPF route will be placed into the routing table. 

 

AD is used to establish preference between routing protocol sources. Local Preference and Weight are used to establish preference within BGP. But either one only comes into play when you are comparing exactly the same route (same network and same mask).

 

HTH

 

Rick

HTH

Rick

I think im a little confused as to the difference between what I posted and PBR- do I just need to put in "set ip next hop" in my route-map instead of set local pref?

There is a bit more to it than just changing set local-preference to set ip next-hop but that is the most obvious part. The route map for PBR would need to use an extended access list so that you could specify destination addressing. And the way that you apply the route map would change from being part of a neighbor configuration to being configured on the interface where the traffic entered the router. But I think you are on the right path now.

 

HTH

 

Rick

HTH

Rick

Thank you, I will dig into this a little more. For reference though, if I accept a full routing table from ISP B the same way I do ISP A would I then be able to use the set local pref?

Yes if ISP B would send full routes then you could certainly set local preference to choose certain routes from ISP B. In fact you do not necessarily need full routes from B. If ISP B would send you partial routes then you could configure a route map to set local preference for those routes and then you would use those routes from B and the other routes from A and would not need to support two full sets of routes in the BGP tables.

 

HTH

 

Rick

HTH

Rick
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card