Summary Post – OSPF Network Statement Order and Matching

When you configure OSPF network statements, IOS orders them most-specific to least-specific then does a top-to-bottom match of the interfaces. It doesn’t matter which order you put them in, the configuration will always be ordered with the longest prefix matches first.  Lab time!

I have router R1 with these interfaces.

Let’s add the OSPF configuration where is in area 2 then check what OSPF thinks is happening.

All the interfaces are in area 2 as expected. Now let’s add into area 1 to see what happens.

Alright. Lo200 stayed in area 2, but the other two interfaces moved to area 1. You can see that the network statement for area 1 was inserted above the area 2 config even though I configured it later.

I also got this interesting log message when I configured the new network statement. I thought it was worth mentioning.

One more to grow on? goes into area 0.

Yes, I got the message again when F0/0 moved to area 0.

Send any link state table updates questions my way.

Aaron Conaway

I shake my head around sometimes and see what falls out. That's what lands on these pages. If you have any questions, the best way to contact me is through Twitter at @aconaway.

More Posts

Follow Me:

Leave a Reply

Your email address will not be published.