PBR - Checking an OSPF route

Answered Question
Mar 3rd, 2008

There's a doc describing PBR with "Multiple Tracking Options." In this doc, it describes PBR as being able to track the "Existence of an entry in the routing table." But, I can't find any further info or examples on how to do this.

I need PBR to be able to route from a router with BGP and OSPF, getting routes for the same networks from both, to use the OSPF route across a 50Mb MetroEthernet link instead of a much smaller MPLS link (unless of course the MetroE is down, and v.v.) Any ideas or links to docs that might have examples or more info?

TIA

Paul

I have this problem too.
0 votes
Correct Answer by royalblues about 8 years 9 months ago

Try this

Access-list 10 permit

router ospf xx

distance 15 y.y.y.y 0.0.0.0 10 ---- y.y.y.y is the router ID of the route source

This will set the AD to be lower for only the routes matched by ACL 10

HTH

Narayan

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Edison Ortiz Mon, 03/03/2008 - 11:20

Bringing PBR will complicate your network even more. PBR will replace any dynamic routing protocol function. What you need to do is influence the routing decision in choosing OSPF over BGP. This is done by playing with the 'administrative distance'. I'm assuming the BGP route is learned via eBGP (AD 20) while the least preferred route is learned via OSPF (AD 110).

I suggest you change the eBGP AD to 120 so OSPF can be preferred.

http://www.cisco.com/en/US/docs/ios/12_4/ip_route/command/reference/rte_bgh1.html#wp1073775

Be sure to do it a both ends so you can have the return traffic coming back the same way.

HTH,

__

Edison.

PAUL TRIVINO Mon, 03/03/2008 - 11:24

Don't I wish it were that simple. Only *SOME* of the sites should go via MetroE (the ones that have MetroE). I have to advertise those same networks on both BGP and OSPF so I can use the smaller BGP link (MPLS WAN) as a backup if, and only if, the MetroE is down.

Paul

royalblues Mon, 03/03/2008 - 11:27

Paul,

I think you would be better of manipulating the admin distance to choose over BGP.

However if you need to use PBR, you could use it and define the next-hop as the router across the OSPF cloud and track the peer. When OSPF link fails, the pbr will fail and should use the BGP route in the routing table to forward packets

HTH

Narayan

PAUL TRIVINO Mon, 03/03/2008 - 11:32

That's "Plan B." The only thing I still need to know is, if the MetroE interface on the other side is still UP when the actual MetroE is down, then I can't Track that interface because there isn't an end-to-end path (the ping will go MPLS and still work, if the interface is up). OTOH, if I track the existence of an OSPF route, I will KNOW the MetroE is down when the route disappears.

Unless there's a way to set the AD on individual routes, which I can't find.

Thanx!

Paul

Correct Answer
royalblues Mon, 03/03/2008 - 13:24

Try this

Access-list 10 permit

router ospf xx

distance 15 y.y.y.y 0.0.0.0 10 ---- y.y.y.y is the router ID of the route source

This will set the AD to be lower for only the routes matched by ACL 10

HTH

Narayan

PAUL TRIVINO Mon, 03/03/2008 - 13:37

Hey! That's gonna get you a gold star if it works, sound like just the ticket. Thanks!

Paul

Actions

This Discussion