cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2993
Views
5
Helpful
5
Replies

OSPF Neighbors not forming unless network for router interfaces included

matthew.norman
Level 1
Level 1

Hello all,

I have the following basic setup:

In all of the training material that I have for my CCNA and any videos that I have watched, I have not seen anyone adding the OSPF interface subnet to their OSPF process.

For some reason I can only get the above to work if R1 advertises the 192.168.1.0/24 and 10.0.0.0/30 networks and the same on R2 with the 192.168.2.0/24 and 10.0.0.0/30 networks.

Am I completely missing something here or is packet tracer just messing me around?

I can't quite understand why this is required on the basis that the two interfaces are connected and can send LSA's.

1 Accepted Solution

Accepted Solutions

Richard Burts
Hall of Fame
Hall of Fame

I do not understand your question. I think it is clear that OSPF works if you have two network statements on each router with a network statement for 192.168.1.0/192.168.2.0 and a network statement for 10.0.0.0. I think that you are asking about configuring OSPF with a single network statement. So let us take a look at what happens when OSPF has only a single network statement.

- what if OSPF has only the network statement for 10.0.0.0? Then OSPF will process the link connecting the routers and not process the link connecting to the host. The result is that OSPF runs and does form a neighbor relationship but has no prefixes to advertise.

- what is OSPF has only the network statement for 192.168.x.0? Then OSPF will process the link connecting to the host but not the link connecting to the other router. The result is that OSPF sends hello messages on the link connecting to the host but does not receive any hello and does not form and neighbor relationship and has no prefix to advertise.

I hope that clarifies your issue. If not then please clarify.

HTH

Rick

HTH

Rick

View solution in original post

5 Replies 5

Richard Burts
Hall of Fame
Hall of Fame

I do not understand your question. I think it is clear that OSPF works if you have two network statements on each router with a network statement for 192.168.1.0/192.168.2.0 and a network statement for 10.0.0.0. I think that you are asking about configuring OSPF with a single network statement. So let us take a look at what happens when OSPF has only a single network statement.

- what if OSPF has only the network statement for 10.0.0.0? Then OSPF will process the link connecting the routers and not process the link connecting to the host. The result is that OSPF runs and does form a neighbor relationship but has no prefixes to advertise.

- what is OSPF has only the network statement for 192.168.x.0? Then OSPF will process the link connecting to the host but not the link connecting to the other router. The result is that OSPF sends hello messages on the link connecting to the host but does not receive any hello and does not form and neighbor relationship and has no prefix to advertise.

I hope that clarifies your issue. If not then please clarify.

HTH

Rick

HTH

Rick

Thank you Rick,

That makes complete sense and helps to clear things up.

I was working on the basis that the network commands purpose was to define the network to advertise.

With the combinations of your reply and cwhite's reply it now makes sense.

On looking back at my CCNA book it was correctly adding the network for the router to router links.

On various other examples i found out there however they were not doing this so I guess there's some bad training material out there.

Regards

Matt

Matt

Yes I see where the response fro cwhite did explain some things that I assumed in my response but did not explicitly discuss. So the combination of responses provided the explanation that you needed. I am glad that we were able to explain this in a way that you understand and can use. Thank you for using the rating system to mark this question as answered. This will help other readers in the forum to identify discussions that have helpful information.

HTH

Rick

HTH

Rick

cwhite0013
Level 1
Level 1

Hello,

The OSPF network command is commonly misunderstood. When you run "network 192.168.2.0 0.0.0.255 area 0" under the OSPF process, you aren't telling the router to advertise the 192.168.2.0/24 network, you're telling the router to match whatever interface that has an IP address within the 192.168.2.0/24 range. If an IP address on an interface falls within the 192.168.2.0/24 range, by default it will start sending out hellos and advertise all subnets that are attached to the interface (you can have multiple subnets on a single interface).

So, this means that if you want to enable OSPF on R2s 192.168.2.1 interface, you can use either of the below configurations as they will BOTH match the interface:

router ospf 1

network 192.168.2.1 0.0.0.0 area 0

router ospf 1

network 192.168.2.0 0.0.0.255 area 0

There isn't really a benefit to using one of those over the other, it mainly just gives you more granular control. 

Joseph W. Doherty
Hall of Fame
Hall of Fame

Disclaimer

The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.

Liability Disclaimer

In no event shall Author be liable for any damages wha2tsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.

Posting

In all of the training material that I have for my CCNA and any videos that I have watched, I have not seen anyone adding the OSPF interface subnet to their OSPF process.

How did the training videos inform OSPF what to advertise?  By default, starting an OSPF process, it won't advertise anything or form adjacencies.

For some reason I can only get the above to work if R1 advertises the 192.168.1.0/24 and 10.0.0.0/30 networks and the same on R2 with the 192.168.2.0/24 and 10.0.0.0/30 networks.

Am I completely missing something here or is packet tracer just messing me around?

Yea, that's how it's generally done.  In this case, I would say packet tracer is working correctly.

I can't quite understand why this is required on the basis that the two interfaces are connected and can send LSA's.

I suppose the OSFP committee didn't want links or networks to appear in the OSPF topology by default.  I.e., they wanted some positive configuration; as is generally also required from other routing protocols.

BTW, LSAs won't be sent (implicitly) until OSPF is configured to do.

Also BTW, even when OSPF is actively sending its hellos, consider the other OSPF parameters that need to agree before an adjacency is established, e.g. area type, area number, password, etc.

Review Cisco Networking for a $25 gift card