Is 'localpref' the best way to handle this multihoming scenario?

Answered Question
Mar 7th, 2009

Hey can you help me on this:

I am trying to master concepts on BGP. Please see attached diagram and my question in red. Appreciate your help.

Attachment: 
I have this problem too.
0 votes
Correct Answer by Giuseppe Larosa about 7 years 8 months ago

Hello Marlon,

BGP provides a lot of tools to implement policies but none can deal with ip source addresses:

you can in your scenario implement a route-map applied inbound to neighbor of ISP1

router bgp 7500

neigh 172.16.1 route-map rise_locpref in

but first of all you need to advertise net 192.168.2.0/24 to have a successful communication

note2:

in real world a public ip address prefix is associated/owned by a single AS so a better lab setup would be that of having another AS after the two ISPs and then the problem of route choice becomes evident.

note3:

until you have a single router you could use also weight:

or directly on neighbor

neighbor 172.16.1.1 weight 500

this provides preferences to all routes learned by this neighbor

or again using a route-map to set the weight selectively on specific routes

If instead you want to send traffic destined to a netA to ISP1 only when the source is 192.168.2.2 you can only use PBR to do this because BGP makes its own choice of best path regardless of the source address.

Hope to help

Giuseppe

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Correct Answer
Giuseppe Larosa Sat, 03/07/2009 - 23:26

Hello Marlon,

BGP provides a lot of tools to implement policies but none can deal with ip source addresses:

you can in your scenario implement a route-map applied inbound to neighbor of ISP1

router bgp 7500

neigh 172.16.1 route-map rise_locpref in

but first of all you need to advertise net 192.168.2.0/24 to have a successful communication

note2:

in real world a public ip address prefix is associated/owned by a single AS so a better lab setup would be that of having another AS after the two ISPs and then the problem of route choice becomes evident.

note3:

until you have a single router you could use also weight:

or directly on neighbor

neighbor 172.16.1.1 weight 500

this provides preferences to all routes learned by this neighbor

or again using a route-map to set the weight selectively on specific routes

If instead you want to send traffic destined to a netA to ISP1 only when the source is 192.168.2.2 you can only use PBR to do this because BGP makes its own choice of best path regardless of the source address.

Hope to help

Giuseppe

Joseph W. Doherty Sun, 03/08/2009 - 06:32

From your diagram: "Goal: Traffic from "Client" should flow from ISP1. In case ISP1 is down, then it goes to ISP2."

This is a bit unclear since you describe "from Client" and "flow from ISP1", did you mean traffic to/from client should use just ISP1, except for failure, or traffic to client should just use ISP1, again except for failure?

For inbound traffic, perhaps a good method to insure the traffic for client only uses ISP1, except for ISP1 failure, might be usage of the BGP Conditional Route Injection (if available on your platform). See http://www.cisco.com/en/US/docs/ios/12_2t/12_2t11/feature/guide/ft11bpri.html for more inof.

For outbound, i.e. from client, Giuseppe's post describes both usage of route weight and PBR to direct the outbound traffic from client. Some possible issues with using the route weight technique, it would apply to all outbound traffic, unlike PBR, and ISP2 might advertize a more specific prefix than ISP1. I'm not positive about the latter, but a more specific route might be preferred over a more weighted aggregate.

Actions

This Discussion