This document describes the behavior of redistributing connected routes into Open Shortest Path First (OSPF). There are two behaviors dependent on which version of Cisco IOS® software you are running.
Readers of this document should have knowledge of these topics:
General IP routing
OSPF routing protocol concepts and terms
The information in this document is based on these software and hardware versions:
Cisco 2503 routers
Cisco IOS Software Release 12.2(24a) running on all the routers
The information presented in this document was created from devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If you are working in a live network, ensure that you understand the potential impact of any command before using it.
For more information on document conventions, see the Cisco Technical Tips Conventions.
Before Cisco IOS Software Release 12.1.3, when redistributing connected routes into OSPF, connected networks included in the network statements under router OSPF advertised in Type-1, Type-2, or Type-3 link-state advertisements (LSAs) were also announced in Type-5 LSAs. Memory is required to store those Type-5 LSAs. If the router originates a type-5 LSA for every connected network, even one over which OSPF runs natively, then a large number of redundant Type-5 LSAs is created. The storage also requires a CPU to process the LSAs during full or partial Shortest Path First (SPF) runs and to flood them when some instability occurs.
The advertisement of the connected networks through Type-5 LSAs may also cause problems in certain situations, when routes learned through a different protocol are redistributed into OSPF. Refer to Common Routing Problem with OSPF Forwarding Address for more information.
The following example shows the creation of the Type-1, Type-2, Type-3, and Type-5 LSAs. Use the show ip interface brief command to see all the directly connected networks.
R1# show ip interface brief Interface IP-Address OK? Method Status Protocol Ethernet0/0 172.16.1.1 YES manual up up Loopback0 1.1.1.1 YES manual up up Loopback1 2.2.2.2 YES manual up up
Configuration:
router ospf 1 redistribute connected subnets network 0.0.0.0 255.255.255.255 area 0
Note: Refer to Redistribute Connected Networks into OSPF with Subnet Keyword for more information on the behavior of the redistribution of connected routes in OSPF with subnet keyword.
OSPF database contents:
R1# show ip ospf database OSPF Router with ID (8.8.8.8) (Process ID 1) Router Link States (Area 0) Link ID ADV Router Age Seq# Checksum Link count 2.2.2.2 2.2.2.2 39 0x80000001 0xE08A 3 Type-5 AS External Link States Link ID ADV Router Age Seq# Checksum Tag 1.1.1.0 2.2.2.2 40 0x80000001 0x1E50 0 2.2.2.0 2.2.2.2 40 0x80000001 0x9BDD 0 172.16.1.0 2.2.2.2 40 0x80000001 0x665C 0
You can see in the above output that there are Type-5 LSAs generated for each of the networks connected to the router. In addition to the Type-5 LSAs, the three networks are also advertised using the router LSA (Type-1) created, as shown below. You can use the show ip ospf database router command to display information only about the router LSAs.
R1# show ip ospf database router 2.2.2.2 OSPF Router with ID (2.2.2.2) (Process ID 1) Router Link States (Area 0) LS age: 514 Options: (No TOS-capability, DC) LS Type: Router Links Link State ID: 2.2.2.2 Advertising Router: 2.2.2.2 LS Seq Number: 80000002 Checksum: 0xAE7C Length: 60 AS Boundary Router Number of Links: 3 Link connected to: a Stub Network (Link ID) Network/subnet number: 2.2.2.2 (Link Data) Network Mask: 255.255.255.255 Number of TOS metrics: 0 TOS 0 Metrics: 1 Link connected to: a Stub Network (Link ID) Network/subnet number: 1.1.1.1 (Link Data) Network Mask: 255.255.255.255 Number of TOS metrics: 0 TOS 0 Metrics: 1 Link connected to: a Stub Network (Link ID) Network/subnet number: 172.16.0.0 (Link Data) Network Mask: 255.255.0.0 Number of TOS metrics: 0 TOS 0 Metrics: 10 R1#
In Cisco IOS Software Release 12.1(3) and later, the Type-5 LSAs are no longer created for connected networks included in the network statements under router OSPF. Using the same router as above, now running Cisco IOS version 12.2(2), you can see that only router LSAs are created:
R1# show ip ospf database OSPF Router with ID (2.2.2.2) (Process ID 1) Router Link States (Area 0) Link ID ADV Router Age Seq# Checksum Link count 2.2.2.2 2.2.2.2 751 0x80000002 0xAE7C 3 R1#
This document demonstrates the different behavior of redistributing connected routes into OSPF. The change in behavior began in Cisco IOS version 12.1(3). Refer to Bug ID CSCdp72526 (registered customers only) in the Bug Toolkit for more information.