What you need to understand is that the network statement is to determine which interface(s) will participate in OSPF, not to advertise the prefix of the network statement. If you have multiple interfaces within an IP address range, for a specific area, you can include them with a single network statement using a wildcard mask that encompasses all the desired interfaces. By using the
0.0.0.0 wildcard mask, you can include an individual interface for an area.
One method for including all the interfaces in a single area is to use the all-encompassing network statement:
network 0.0.0.0 255.255.255.255 area 0
If there are interfaces where you would like to advertise the network on the interfaces, but not send OSPF hellos on the interface, you can use the above network statement, and use the
passive-interface command for each interface for you don't want to send hellos, such as networks where there are no routers participating in OSPF (end-user networks). You can also use the
passive-interface default command to not send hellos out any interface by default, then use a
no passive-interface command to allow hellos on certain interfaces.
It just boils down to your particular requirements on a router. The network statements can be very flexible, but, if it is really convoluted where you need to set each interface individually, the design probably needs to be rethought. In many cases, using the single interface command can work well, especially when used with passive interfaces.