Showing results for 
Search instead for 
Did you mean: 

Multiple OSPF Instance Question

John Early

I am in the process of switching out my WAN provider for my company.  I am currently running a single OSPF instance and am planning to add a second for my new carrier.  We are planning to run both carriers for some time as we migrate over.  Below is my current configuration, my question is can I add a second OSPF line on the VLAN interface?  Or how can I run 2 OSPF instances at once with different weights.

interface Vlan10
ip address
ip ospf passive-interface
ip router ospf 50 area
ip pim sparse-mode

interface Vlan100
no ip redirects
ip address
ip ospf passive-interface
ip router ospf 50 area

interface Vlan200
ip address
ip ospf dead-interval 10
ip ospf hello-interval 2
ip ospf network broadcast
ip router ospf 50 area
no shutdown

router ospf 50
network area
default-information originate

I plan to add:

router ospf 100
network area

interface Vlan100
no ip redirects
ip address
ip ospf passive-interface
ip router ospf 50 area
ip router ospf 100 area  <<  Can I add another OSPF line to an interface?

8 Replies 8

Jon Marshall
VIP Community Legend VIP Community Legend
VIP Community Legend

You can't do this or rather they will only show up in one of the OSPF processes but not both.

What you can do redistribute from one process to another but then the redistributed routes will be external routes and I'm assuming the existing ones are intra or inter area routes so they will always be preferred.

Would need to know more about the topology and what you currently have.


I didn't set this network up originally, but the existing OSPF 50 might only be used so that I can get the routing table from the carrier.  If I do a show ip route ospf then I see plenty of routes from ospf 50.  Is there a way to see if I am even sending routes?  If I understand how this works the "ip router ospf 50 area" line on the vlan interface is intented to send that network to the OSPF neighbor, right?

The OSPF statement tells your router to start sending and receiving hellos on that intefrace and also to advertise the network.

What is the WAN ie. point to point, MPLS, VPLS something else ?

If you are receiving routes you will be advertising routes to the remote sites.

What does a "sh ip ospf neighbor" show on your device ?

What do the OSPF routes from the remote sites look like ie. are they intra area, inter area or externals ?

Without a full understanding of how everything works at the moment impossible to say how you might approach it.


The WAN is MPLS and if I need to add a new network to any site, not just this one which is a core data center site, then I have to call the carrier and have them manually add it.  I have never been able to add new networks without calling them.  My branch sites just use static routing and the carrier does all of the edge routing.  With the new carrier we are making sure the we are able to advertise our own networks.

NEXUS7K-1# sh ip ospf neighbors detail
Neighbor, interface address
Process ID 50 VRF default, in area via interface Vlan200
State is FULL, 5 state changes, last change 21w6d
Neighbor priority is 1
DR is BDR is
Hello options 0x12, dbd options 0x52
Last non-hello packet received 00:01:37
Dead timer due in 00:00:09

So you don't receive any routes from the provider at all ie. all your sites including this one just use static routes.

Is that correct ?

If so with the new provider are you going to be running OSPF between you and them or are you going to be using BGP (which is more common) and then redistribute OSPF into BGP ?

Both are possibilities.


All OTHER sites are static only, this one does have OSPF running and if I do "show ip route ospf" I can see all the networks.  I do have one network that has the "ip router ospf 50 area" on it, but it isn't WAN routed, it just works locally.  That same network isn't in the DR data center's OSPF routes, which makes me think that I am not advertising to them with this command.  I think this OSPF 50 instance is just so that they can pass down the WAN routing table to us in the data centers.

The new carrier is going to be running OSPF between us and them, then they are going to be running BGP on their side and redistribute the OSPF into BGP that way.

Okay, so the remote sites don't use OSPF.

When you say on this site you can see all the routes is that for the remote sites ?

It sounds like with your new provider they are actually going to be presenting their MPLS WAN to you as a backbone area in OSPF so the routes between your sites will probably be inter area assuming your remote sites each have their own area.

I am making that assumption though from your description.

So when you do a "sh ip route" for a remote site on this site what does the route entry look like ?


Masoud Pourshabanian


As John stated, you can not apply two OSPF instances under one interface. You need to do these steps.

1- Configure new OSPF instance for your new SP

router ospf 100
network area

2- Add the new instance only under new VLAN toward your new SP

    interface Vlan100

   ip router ospf 100 area

3- Redistribute route from instance 50 to instance 100 with higher metric

   Router ospf 100

   redistribute ospf 50 metric 10000 subnets

After Applying the configuration, your destination receives two routes for each subnet. One with low metric and other with high metric. The one with low metric sits in the routing table, which is in your case routes from instance 50.

If you disconnect your old service provider, routes coming from new SP with highest metric sit inside the routing table.

In this configuration, your old SP is preferable, which makes sense at early stage.

Hope it helps,


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:

Recognize Your Peers