BGP default route

Unanswered Question
Aug 29th, 2008

We have 4 upstream providers. All but one is sending us full tables and default routes. The last one is send full tables only.

I was looking to use a route map to define the next hop vs a static entry.

Below is what I was looking at trying, but since it is a live network, I don't want to kill something.

route-map xyz-OUT permit 10

set as-path prepend 70000

route-map xyz-OUT permit 20

match as-path

set ip next-hop a.b.c.d

Would that work if I defined that route-map in my BGP neighbor config? This route and 1 of the others will be my default routes out, the other 2 are failover only links.

Provider 1 = Primary inbound and outbound (gig)

Provider 2 = Secondary inbound and Primary outbound (the one that will use this route-map, gig)

Provider 3 = Tertiary provider if the first 2 fail. 10 prepends (100meg)

Provider 4 = last resort if the top 3 fail. 12 prepends (100meg)

Thanks for any suggestions

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
tdrais Fri, 08/29/2008 - 17:04

I can see what the prepend does and that will affect your inbound traffic as you describe.

Not real sure what setting the nexthop your provider will receive will accomplish. Assuming they know how to get to a.b.c.d they would send your traffic there. Not too sure the ISP will like this or allow it.

If you really intended to set the nexthop inbound I guess the next question is what is a.b.c.d If this was on a route learn from ISP2 but your pointed it to ISP1 nexthop and ISP1 failed this route would stay in the BGP table since isp2 is still up but not be placed in the routing table.

The more normal way to do this is to use weight or local preference on a inbound route-map to select which outbound path to take. If you wish to have more than one active at the same time you can set the BGP max paths to the number of routes you wish to install in the routing table.

The only thing you need to watch for is if one ISP sends you a summary and the other sends the more specific. You may have to do some filtering.

paarlberg Fri, 08/29/2008 - 18:22

The scenario is, we have our primary feed via Provider 1. Provider 2 we use for outbound and up to 25% inbound. It is the deal we received, mostly for non-metered redundancy.

Provider 2 will not send us a default route along with full tables. We don't want to have static routes as a failure of Provider 2 will cause issues.

I need to define the default route for that bgp neighbor to route traffic over the desired path. We will have multiple active routes at any time.

We are filtering our inbound routes to the provider and connected only.

tdrais Sat, 08/30/2008 - 03:25

I see, you do not accept the full routing table and therefore must use default route.

So I assume your goal is to manipulate the nexthop of the default routes you learn to point to a different ISP?

The issue you have is that unlike most protocol bgp only sends routes when they change. With the default route this will never change and is only sent when the neighbor first comes up.

So if I have 3 ISP and they all send the route and ip say point them to ISP1 i would end up with

Learned from ISP1 > isp1 nexthop

learned from ISP2 > isp1 nexthop

learned from isp3 > isp1 nexthop

Now ISP1 goes down so his default route is removed from the bgp and routing table. Unfortunately the 2 other routes are still in the bgp table pointing to ISP1. Since the nexthop is invalid they will not get placed in the routing table. You will not receive new default routes from ISP2 or ISP3 until they go down so you will not be able to change the bgp entry.

Maybe I am still misunderstanding what you are attempting.

Another option is to use the static route but use the track option on it. You could cause the route to only be inserted when the ISP that did not give you a default is reachable.

paarlberg Sat, 08/30/2008 - 05:44

We are receiving full routes from Providers 1 and 2. Provider 2 does not send us default routes, where Provider 1 does.

Since we want to spread outbound traffic across Provider 1 and 2, we need a default route to them. I am trying to find the safest way to insert the gateway/default route to Provider 2 when BGP is up with them.

This is in a hosting environment, so most traffic will be outbound.


This Discussion