Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

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

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
Hall of Fame Super Silver

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

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

10 REPLIES
Hall of Fame Super Silver

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

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

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

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

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

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

Silver

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

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

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

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

Silver

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

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

New Member

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

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

Hall of Fame Super Silver

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

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

New Member

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

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,

New Member

You can try to use a higher

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/

2210
Views
0
Helpful
10
Replies
CreatePlease login to create content