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

OSPF - how to prefer an E2 route over an IA?

Charles Rayer
Level 1
Level 1

I am writing a new config for our sites.

Basically we have main lines and backup lines. We run BGP through the main lines and OSPF over the backup lines, the BGP is redistributed into OSPF at the main line router for each site, and that OSPF runs between the main line router, the backup line router, and the core layer 3 switch on each site.

Now the problem is that, due to the redistribution, the main line route to a particular site becomes an E2, and the backup route to the same site is an IA, which goes into the routing table.

How can I engineer to have the E2 route preferred over the IA route? Is it even possible?

Thanks for reading

1 Accepted Solution

Accepted Solutions

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Charles,

you can only prefer an O E2 route over another O E2 route for its lower metric.

in your scenario you need to use a second OSPF process on the backup lines and to redistribute carefully among the two OSPF processes.

In this way you can make routes comparable = of the same type and those coming from BGP primary links preferred for their lower metric

Hope to help

Giuseppe

View solution in original post

11 Replies 11

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Charles,

you can only prefer an O E2 route over another O E2 route for its lower metric.

in your scenario you need to use a second OSPF process on the backup lines and to redistribute carefully among the two OSPF processes.

In this way you can make routes comparable = of the same type and those coming from BGP primary links preferred for their lower metric

Hope to help

Giuseppe

Is there a way you could adveritise the route in BGP so that it's more specific than the route learned by the OSPF inter area route? That way it would chose route specificity over OSPF route type.

-Todd

I know this is an old thread but this was marked as the solution and im having the same problem Could you elaborate on how this could be done with a second OSPF process on the backup link and what you mean by "redistribute carefully among OSPF Processes"? I have started my own thread here: Re: OSPF With MPLS IPVPN and Back Door Link - Page 2 - Cisco Community.

Is there a way you could  adveritise the route in BGP so that it's more specific than the route  learned by the OSPF inter area route? That way it would chose route  specificity over OSPF route type.

-Todd

There is another alternative; although it doesn’t scale well.  Use the distance command under OSPF to lower the admin distance to something below 110 for only that particular OSPF E2 route.

Chris

An example to which I am referring would be if the route is a 192.168.0.0/23, you could add two static routes on the BGP router pointed to the correct next hop. The routes being 192.168.0.0/24 and 192.168.1.0/24 then add the network commands to advertise them in BGP across the appropriate link to the remote location. The when they get redistributed you have 2 /24s E2 that would be preferred over the ospf /23 IA network. The key to this being that you could add the statics and advertise them in the BGP router without influencing the ospf that send the routes over the backup link. Obviously if ospf started advertising those routes as IA routes it wont work.

-Todd

Something you could do to cause both routes to occur as external is disable OSPF on the remote core switch for that network, and then redistribute that connected network into OSPF. This would cause both routes for the prefix in question to be external; consequently easier to deal with.

For example if 192.168.1.0/24 is the network that’s being preferred over the backup circuit and your OSPF config at the remote site looks something like this:

Router ospf 10
Network 192.168.1.0 0.0.0.255 area 0
Exit


Then try this:

Ip prefix-list conn2ospf permit 192.168.1.0/24

Route-map conn2ospf permit 10
Match address prefix-list conn2ospf
Exit

Router ospf 10
No network 192.168.1.0 0.0.0.255 area 0
Redistribute connected subnets metric-type 1 route-map conn2ospf
Exit


Also alter how you redistribute the BGP routes into OSPF to be type 1 external routes; this will allow the metric to increase on an external route as it’s propagated throughout the OSPF domain.  Because you are closer to your BGP router it will look probably look better than the E1 route over the backup circuit.  If not the metrics of the routes can be adjusted.

After this 192.168.1.0/24 should occur as an E1 via both circuits.

This is a great document:

http://www.cisco.com/en/US/tech/tk365/technologies_white_paper09186a0080094e9e.shtml#t33


Chris

mauricionaegele
Level 1
Level 1

Maybe you could use something called sham-link to solve your problem.

Try this link : http://www.cisco.com/en/US/docs/ios/12_2t/12_2t8/feature/guide/ospfshmk.html#wp1025241

[]s

Hello Mauricio,

the original poster is a customer of an MPLS L3 VPN service with direct backup links that are backdoors.

I agree that a possible option could be moving to OSPF as PE-CE protocol to avoid to have O E2 routes and then with OSPF sham link is possible to have comparable O routes when compared with the backdoor links provided by backup links

However, all this has to be done on service provider side and it is not an option for the customer side.

In other words the customer should ask for :

moving to OSPF as PE-CE protocol

for a sham-link between PE nodes

Hope to help

Giuseppe

We did originally have sham links with the provider but every time they did maintenance we got 2 hours of downtime as opposed to 5-10 minutes for the BGP only links so we decided that BGP native was the only way to go....

Cheers,

You can try to use a higher prefix to prefer the route i.e. the router will consider them as two different routes and take the highest prefix.

A router evaluates routes in the following order.

  1. Prefix Length - The longest-matching route is preferred first. Prefix length trumps all other route attributes.
  2. Administrative Distance - In the event there are multiple routes to a destination with the same prefix length, the route learned by the protocol with the lowest administrative distance is preferred.
  3. Metric - In the event there are multiple routes learned by the same protocol with same prefix length, the route with the lowest metric is preferred. (If two or more of these routes have equal metrics, load balancing across them may occur.)

http://packetlife.net/blog/2010/aug/16/route-preference/

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: