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

OSPF general vs detailed network command

AndreT_Li
Level 1
Level 1

I'm reading a CCNA book that has a 2 router running OSPF where one interface has a general network command of

network 192.168.0.0 0.0.255.2555 area 0

vs

network 192.168.1.12.2 0.0.0.0. area 0

network 192.168.1.24.2 0.0.0.0. area 0

network 192.168.1.2.2 0.0.0.0. area 0

 

Question is does it give an engineer more control of the more specific routes or whats the deal hear.

Whats the difference ?

3 Replies 3

Francesco Molino
VIP Alumni
VIP Alumni

Hi

 

Let's assume your router has 3 interfaces:

- 192.168.2.0/24

- 192.168.20.0/24

- 192.168.200.0/24

 

If your network statement is :

network 192.168.0.0 0.0.255.255 area 0

 

This means that all interfaces matching this statement, theyr networks will be advertised into ospf in area 0.

Now let's say, you don't want to advertise one interface on this supernet 192.168.0.0/16 or if you want to create a new interface to do an adjacency with another router in area 1, you won't be able to do it unless if you have specific network statements.

This is a choice made during a design and by planning the future.

 

Both solutions will work but as explained there are some limitations. By advertising a global subnet, all interfaces will be in the same area.

 

Personally i advertise subnets using the most precise network statement like:

network 192.168.1.1 0.0.0.0 area 0 or by doing a redistribute connected if i want to tag routes for future use.

 

 


Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question

You don't point out the limitation or benefits of either.

Yes i gave you an example also.
Being specific with the network statement you will advertise only the interface associated to this subnet while advertising a bigger subnet with network statement, you'll force the router to integrate all its interfaces to be part of ospf if their subnets match the network command subnet.

With specific you can filter to tell which interface is part of ospf and on which area. With the largest subnet, you can't define it too much. All interfaces matching this large subnet will be part of the same area.

And if you create a loopback or interface that doesn't need to be advertised on ospf, with the larger subnet network command, if there's a match, you won't avoid it.


Thanks
Francesco
PS: Please don't forget to rate and select as validated answer if this answered your question