OSPF Advertising Networks using Redistribution vs Network Commands

When configuring OSPF, it is possible to advertise networks by redistributing connected networks, as well as the network command. Each approach gives different results in the behavior of OSPF. For example, an OSPF configuration could cointain the following commands:

router ospf 1 redistribute connected subnets

OR:

router ospf 1 network 172.16.0.0 0.0.3.255 area 0

In the first case, all networks that are configured on local interfaces of the router are injected into OSPF as external routes using Type 7 LSAs. In such a case, the router is considered an ASBR.

In the second case, all of the networks of interfaces that fall within the range specified will be advertised using OSPF Type 1 LSAs, advertising the network as intra-area routes.

When both commands are applied to the same OSPF configuration for the same address ranges, then it is the behavior provided by the network command that takes precedence. This is because OSPF's path selection process prefers intra-area routes over external routes.

https://networklessons.com/ospf/ospf-path-selection-explained