cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1498
Views
0
Helpful
11
Replies

Modify OSPF routes based on source criteria and destination interface

deschete
Level 1
Level 1

Hopefully someone here can assist with a problem I've been having for a few months now.

We run OSPF. On two of our routers, I would like to have the router analyze the traffic and decide which of two paths to take based on two things:

1) The source IP and precdence of the packet, and

2) The next-hop interface of the packet once the router decides where it will be routed.

Is there a way to have the router examine a list of criteria and then the routing table to find matches, then alter the next-hop route for entries that match this criteria?

I am also open to other suggestions of how to achieve this.

11 Replies 11

Edison Ortiz
Hall of Fame
Hall of Fame

You can't do this with destination-based routing protocols such as OSPF or EIGRP, for that matter.

Source-based routing is implemented with Policy-Based Routing.

Please have a read and come back if you have any questions:

http://www.cisco.com/en/US/docs/ios/12_4/ip_route/configuration/guide/piconfig.html#wp1001398

HTH,

__

Edison.

Edison,

I have tried using PBR; unfortunately, matching on ip next-hop can only be used for redistribution. PBR can only use match ip and match length.

Because of this I was wondering if I could analyze OSPF routes, modify them based on criteria in a route map, and then redistribute the changes back into the same instance.

I am also open to other suggestions of how this may be done.

Thanks,

Daniel

In OSPF you can't redistribute from OSPF back into OSPF.

Can you please give us a sample scenario that we can follow?

I have a hard time understanding what exactly you want to accomplish.

With PBR, you can change default routing behavior based on the source parameters. From the main posts, it seems that what you wanted.

Sure, let me try to make it a little more clear.

I have two routers in two cities. Between these two routers there are two connections. One is intended for general traffic and is configured to participate in OSPF. The second link is for traffic with priority 5 from a select list of IP addresses, and this link is not participating in OSPF.

Here's where the problem comes in - there are multiple T1 connections coming in to both of these routers also. This means that technically speaking, there are multiple "inbound" interfaces on the router.

If I classify based on source or priority with PBR, I may send traffic that simply needs to go out of another T1 on the router across the WAN to the second router, where it will be sent back and then go over the neighboring T1!

So in short, the easiest way to solve this particular problem would be to analyze all traffic destined to go out of the primary uplink to the other city's router. If it matches a set of criteria, it is re-routed over the secondary link for priority traffic.

I can try to explain in greater detail if this is still unclear.

Thanks,

Daniel

If you want to force traffic (bi-directionally) via a specified T1 based on certain criteria, then you need PBR on both routers.

The problem is that the need to send the traffic hinges on if it was already destined to go over another interface. Because PBR is processed before the routing table is processed, I can't find a way to do this with PBR.

You lost me there, sorry - traffic hinges ?

Can you pull up a quick visio diagram and explain the traffic pattern that you want out of this task ?

Edit: see next post, I can't attach to an edit...

Attached is a drawing showing the situation that I'm describing.

Item #4 should read "after an inefficient trip through R1," not R4 as on this diagram.

Anyone have any ideas about this one?

Based on your diagram, I believe your requirement can't be accomplished.

Review Cisco Networking for a $25 gift card