Understanding OSPF LSA types is necessary to master the OSPF routing protocol. In an OSPF routing domain, each node creates at least one type of LSA, which is the router LSA. A router may produce more LSAs depending on its functions (DR, BDR, ABR, or ASBR). The set of LSAs within an OSPF area constitutes the area’s link-state database, and it is consistent on all the area’s routers.
You will learn several OSPF LSA types and their functions in detail. Every LSA type has a separate function. For instance, router-LSAs and network-LSAs describe how an area’s routers and networks are interconnected, and devices within a particular area can rely on those types of LSA only to draw the map of the area. Meanwhile, ABRs use summary-LSAs to advertise routes between areas. AS external-LSAs and Type-7 LSAs allow advertising of external routing information throughout the Autonomous System and NSSA areas, respectively.
Upon the completion of this post, you will be able to answer the following questions:
- What is LSA in OSPF?
- What is the purpose of an LSA?
- What are the different Types of LSA in OSPF?
- What is OSPF LSA Type 1?
- What is OSPF LSA Type 2?
- What is OSPF LSA Type 3?
- What is OSPF LSA Type 4?
- Why is Type 4 LSA needed/required?
- What is OSPF LSA Type 5?
- What is OSPF LSA Type 7?
- What information is advertised in Type 1,2,3,4,5, and 7 LSA packets?
- What are the formats of OSPF LSA Type 1,2,3,4,5, and 7?
- Which LSA Type is advertised by all OSPF routers?
- What are the Types of OSPF packets?
- What is the difference between OSPF LSA Type 5 and LSA Type 7?
- What is the difference between OSPF LSA Type 4 and LSA Type 5?
What is LSA in OSPF?
In an OSPF AS, a link statement advertisement (LSA) is a data format routers use to describe the links connected to them, OSPF adjacent neighbors, internal and external subnets, and ASBRs. Different OSPF LSA types are used by routers within an OSPF domain to build up the graph of the network for the sake of producing the SPF tree.
Each node in an OSPF autonomous system creates one or more LSAs based on its configuration and shares them with its adjacent neighbors. In addition, the router will also flood the latest version of any received LSA to its neighbors, except the sender and including the router that originated the LSA. This is if it is not the sender.
How Many OSPF LSA Types Do Exist?
There are 11 LSA types in OSPF, and each LSA type is handled differently, with the combined set of all received and sent LSAs establishing the router’s link state database (LSDB). Cisco, Juniper, and Huawei are implementing the following ten OSPF LSA types on their routers, whereas RFC 2328’s specification for OSPFv2 defines only five LSA types:
- LSA Type 1 (Router LSA)
- LSA Type 2 (Network LSA)
- LSA Type 3 (Summary LSA)
- LSA Type 4 (ASBR Summary LSA)
- LSA Type 5 (Autonomous System LSA)
- LSA Type 7 (NSSA external LSA)
- LSA Type 8 (External-Attributes LSA)
- LSA Type 9 (Link-local opaque LSA)
- LSA Type 10 (Area-local opaque LSA)
- LSA Type 11 (Autonomous System opaque LSA))
OSPF LSAs Type 6 are used in multicast OSPF applications. They are not supported by Cisco. In the rest of this tutorial, we discuss LSA types 1,2,3,4,5, and 7. The other types will be the subject of a future post. Before continuing, here is the network diagram we will be working on.
Figure 1 – Network diagram of an OSPF domain linked to a RIPv2 AS
Basically, RIPv2 and OSPF have been configured based on the network topology. Moreover, RIPv2 prefixes have been injected into the OSPF routing domain by executing the redistribute command on router R4. Similarly, OSPF routes have been redistributed into the RIPv2 autonomous system.
Router | Router ID | Interface | IP address/Subnet Mask | Routing Protocol |
R1 | 1.1.1.1 | F0/0 | 10.0.0.1/24 | OSPF Area 0 |
S1/0 | 10.0.12.1/24 | OSPF Area 12 | ||
F0/1 | 10.0.13.1/24 | OSPF Area 13 | ||
S1/1 | 10.0.16.1/24 | OSPF Area 16 | ||
R2 | 2.2.2.2 | F0/0 | 10.0.0.2/24 | OSPF Area 0 |
F0/1 | 10.0.2.2/24 | OSPF Area 12 | ||
S1/0 | 10.0.12.2/24 | OSPF Area 12 | ||
R3 | 3.3.3.3 | F0/0 | 10.0.0.3/24 | OSPF Area 0 |
F0/1 | 10.0.13.3/24 | OSPF Area 13 | ||
Loopback0 | 10.0.3.3/24 | OSPF Area 3 | ||
R4 | 4.4.4.4 | F0/0 | 10.0.0.4/24 | OSPF Area 0 and RIPv2 |
F0/1 | 10.0.45.4/24 | RIPv2 | ||
R5 | None | F0/1 | 10.0.45.5/24 | RIPv2 |
Loopback0 | 10.0.5.5/24 | RIPv2 | ||
R6 | 6.6.6.6 | S1/1 | 10.0.16.6/24 | OSPF Area 16 |
PC1 | None | F0 | 10.0.2.10/24 | Default Gateway:10.0.2.2 |
Here are the links to download the initial router configurations.
Router R1 | Router R2 | Router R3 |
Router R4 | Router R5 | Router R6 |
At this point, let’s describe some of those OSPF LSA types in detail.
OSPF LSA Type 1 (Router LSA) with Examples
What is OSPF LSA Type 1?
One Router LSA is generated per area by each router in the OSPF domain. An LSA Type 1 describes all router interfaces that are assigned to a specific OSPF area. It contains the IP address, subnet address, subnet mask, and cost of each interface.
If a router interface is connected to a broadcast or non-broadcast data link and a designated router exists, OSPF considers the interface a transit network and includes the DR’s IP address in the LSA. Otherwise, the interface gets described as a stub network, and the router inserts an LSA entry containing the IP address of the adjacent OSPF router if one got detected over that interface.
A router LSA includes these fields:
- LS age:
- LS Type:
- Link State ID:
- Advertising Router:
- LS Seq Number:
- Checksum:
- Length:
- Number of Links:
If the router has links into many areas, including the backbone area, LSA Type 1 will have a line showing that the router is an Area Border Router. The data of each entry in an LSA Type 1 depends on the OSPF network type associated with the interface that entry is describing.
OSPF LSA Type 1 Examples
OSPF LSA Type 1 Example for Point-to-Point Links
For a Point-to-Point interface, OSPF generates two entries. The first entry provides IP information about the interface and includes data similar to Exhibit 1.
Link connected to: a Stub Network (Link ID) Network/subnet number: 10.0.12.0 (Link Data) Network Mask: 255.255.255.0 Number of MTID metrics: 0 TOS 0 Metrics: 64
Exhibit 1- Entry of a stub network in an LSA Type-1
The second entry reveals details of the OSPF neighbor on the P2P link if one exists, as you see in Exhibit 2.
Link connected to: another Router (point-to-point) (Link ID) Neighboring Router ID: 2.2.2.2 (Link Data) Router Interface address: 10.0.12.1 Number of MTID metrics: 0 TOS 0 Metrics: 64
Exhibit 2- Entry of a router LSA describing a full OSPF adjacency
OSPF LSA Type 1 Example for Point-to-Multipoint Links
The router produces two OSPF entries for this type of OSPF network: one entry for each full OSPF neighbor, and one entry for the underlying interface. Generally, the fields within those entries are the same as those for an entry describing a Point-to-Point link.
OSPF LSA Type 1 Example for Broadcast and Non-Broadcast Links
For each broadcast/non-broadcast interface, the router produces one LSA entry. Moreover, if a designated router gets elected, OSPF defines the link as a transit network and includes the IP address and cost of the interface in the LSA entry, as well as the DR’s IP address (Exhibit 3).
Link connected to: a Transit Network (Link ID) Designated Router address: 10.0.0.4 (Link Data) Router Interface address: 10.0.0.2 Number of MTID metrics: 0 TOS 0 Metrics: 1
Exhibit 3 – Entry of a router LSA describing a broadcast link
Otherwise, the router marks the interface as a stub network and contains its cost, subnet IP address, and subnet mask in the LSA entry, as shown in Exhibit 4.
Link connected to: a Stub Network (Link ID) Network/subnet number: 10.0.2.0 (Link Data) Network Mask: 255.255.255.0 Number of MTID metrics: 0 TOS 0 Metrics: 1
Exhibit 4 – Entry in a router LSA describing a broadcast link on which no DR exists
For each area, the router creates one LSA Type 1 (Exhibit 5), which may contain one or more entries. A Router LSA is flooded within the LSA’s area only, which means that when a router receives an LSA Type 1, it forwards it to all neighbors within the LSA’s area, except for the sending node.
R2# show ip ospf database router self-originate OSPF Router with ID (2.2.2.2) (Process ID 1) Router Link States (Area 0) LS age: 58 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: 80000003 Checksum: 0x4BBA Length: 36 Area Border Router Number of Links: 1 Link connected to: a Transit Network (Link ID) Designated Router address: 10.0.0.4 (Link Data) Router Interface address: 10.0.0.2 Number of MTID metrics: 0 TOS 0 Metrics: 1 Router Link States (Area 12) LS age: 24 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: 80000003 Checksum: 0xE859 Length: 60 Area Border Router Number of Links: 3 Link connected to: another Router (point-to-point) (Link ID) Neighboring Router ID: 1.1.1.1 (Link Data) Router Interface address: 10.0.12.2 Number of MTID metrics: 0 TOS 0 Metrics: 64 Link connected to: a Stub Network (Link ID) Network/subnet number: 10.0.12.0 (Link Data) Network Mask: 255.255.255.0 Number of MTID metrics: 0 TOS 0 Metrics: 64 Link connected to: a Stub Network (Link ID) Network/subnet number: 10.0.2.0 (Link Data) Network Mask: 255.255.255.0 Number of MTID metrics: 0 TOS 0 Metrics: 1
Exhibit 5 – Displaying router LSAs originated by router R2
Router R2 advertises three interfaces in the OSPF domain. Two of them are in area 12, and one interface is in area 0. Therefore, R2 generated two Type 1 LSAs: one consisting of three entries dedicated to area 12, and another LSA including one entry for area 0, as shown in Exhibit 5.
OSPF LSA Type 1 Example for Loopback interfaces
By default, OSPFv2 advertises a loopback interface using its IP address and the /32 subnet mask (Exhibit 6), regardless of its IP configuration. To change this behavior, set the network type of the interface to point-to-point, which is the only choice allowed in Cisco IOS.
In Exhibit 6, router R3 is describing its Loopback0 interface as an isolated host using the /32 subnet mask.
R3# show ip ospf database router self-originate OSPF Router with ID (3.3.3.3) (Process ID 1) Router Link States (Area 0) LS age: 1120 Options: (No TOS-capability, DC) LS Type: Router Links Link State ID: 3.3.3.3 Advertising Router: 3.3.3.3 LS Seq Number: 80000006 Checksum: 0x7F2 Length: 36 Area Border Router Number of Links: 1 Link connected to: a Transit Network (Link ID) Designated Router address: 10.0.0.4 (Link Data) Router Interface address: 10.0.0.3 Number of MTID metrics: 0 TOS 0 Metrics: 1 Router Link States (Area 3) LS age: 1120 Options: (No TOS-capability, DC) LS Type: Router Links Link State ID: 3.3.3.3 Advertising Router: 3.3.3.3 LS Seq Number: 80000006 Checksum: 0x8E75 Length: 36 Area Border Router Number of Links: 1 Link connected to: a Stub Network (Link ID) Network/subnet number: 10.0.3.3 (Link Data) Network Mask: 255.255.255.255 Number of MTID metrics: 0 TOS 0 Metrics: 1 Router Link States (Area 13) LS age: 1120 Options: (No TOS-capability, DC) LS Type: Router Links Link State ID: 3.3.3.3 Advertising Router: 3.3.3.3 LS Seq Number: 80000007 Checksum: 0x1AC5 Length: 36 Area Border Router Number of Links: 1 Link connected to: a Transit Network (Link ID) Designated Router address: 10.0.13.3 (Link Data) Router Interface address: 10.0.13.3 Number of MTID metrics: 0 TOS 0 Metrics: 1
Exhibit 6 – Type 1 LSAs created by router R3
OSPF LSA Type 2 (Network LSA)
What is OSPF LSA Type 2?
LSA type 2 to describe a broadcast or NBMA data link. The designated router is the only router responsible for creating network LSAs. In addition to the DR’s IP address and subnet mask, an LSA type 2 also includes the subnet mask of the DR, which is helpful in calculating the IP address of the corresponding subnet address, which is can be accomplished by ANDing those two fields together.
OSPF LSA Type 2 Format
A network LSA includes router IDs of all OSPF neighbors attached to the current multi-access network (Exhibit 7). In addition, an LSA type 2 gets flooded within its corresponding area as LSA Type 1, 3, and 4 do.
R4# show ip ospf database network 10.0.0.4 OSPF Router with ID (4.4.4.4) (Process ID 1) Net Link States (Area 0) Routing Bit Set on this LSA in topology Base with MTID 0 LS age: 1179 Options: (No TOS-capability, DC) LS Type: Network Links Link State ID: 10.0.0.4 (address of Designated Router) Advertising Router: 4.4.4.4 LS Seq Number: 80000003 Checksum: 0xBE2B Length: 40 Network Mask: /24 Attached Router: 4.4.4.4 Attached Router: 1.1.1.1 Attached Router: 2.2.2.2 Attached Router: 3.3.3.3
Exhibit 7 – Network LSA describing the subnet 10.0.0.0/24
LSA Type 3 (Summary LSA)
What is OSPF LSA Type 3?
First of all, an ABR (Area Border Router) is a router that connects to more than one OSPF area, including the backbone area (area 0). Area border routers do not flood one area’s router and network LSAs into another area. In other words, ABRs do not change Type 1 and 2 LSAs between areas.
However, each ABR in the network is responsible for sharing all intra-area and inter-area routes in its routing table using Type 3 LSAs following these two rules:
Rule #1: for each intra-area route that is not in OSPF area 0, the router creates one Type 3 LSA, and then advertises it in the backbone area. Remember that an intra-area route is a route that corresponds to a subnet in an OSPF area the current router is attached to.
For example, router R1 belongs to areas 0, 12, 13, and 16, as illustrated in the following table. Therefore, prefixes 10.0.0.0/24, 10.0.2.0/24, 10.0.12.0/24, 10.0.13.0/24, and 10.0.16.0/24 are intra-area routes in R1’s routing table because they are advertised in areas that connect to router R1.
Area | Subnets | R1 is attached to the area? |
0 | 10.0.0.0/24 | Yes |
3 | 10.0.3.3/32 | No |
12 | 10.0.2.0/24 | Yes |
10.0.12.0/24 | ||
13 | 10.0.13.0/24 | Yes |
16 | 10.0.16.0/24 | Yes |
However, since R1 does not have an interface in the area of subnet 10.0.3.3/24, route 10.0.3.3/24 appears as an inter-area route in its routing table (Exhibit 8). Consequently, that subnet will not be advertised in area 0 using a summary LSA.
R1# show ip route ospf 10.0.0.0/8 is variably subnetted, 12 subnets, 2 masks O 10.0.2.0/24 [110/65] via 10.0.12.2, 02:12:48, Serial1/0 O IA 10.0.3.3/32 [110/2] via 10.0.0.3, 02:12:48, FastEthernet0/0 O E2 10.0.5.0/24 [110/20] via 10.0.0.4, 02:12:48, FastEthernet0/0 O E2 10.0.45.0/24 [110/20] via 10.0.0.4, 02:12:48, FastEthernet0/0
Exhibit 8 – Displaying learned OSPF routes
In the output of the show ip route command, inter-area routes are denoted by the string “O IA”. In conclusion, router R1 generates five summary LSAs for subnets 10.0.0.0/24, 10.0.2.0/24, 10.0.12.0/24, 10.0.13.0/24, and 10.0.16.0/24, and advertises them in area 0.
R1# show ip ospf database summary self-originate OSPF Router with ID (1.1.1.1) (Process ID 1) Summary Net Link States (Area 0) LS age: 149 Options: (No TOS-capability, DC, Upward) LS Type: Summary Links(Network) Link State ID: 10.0.2.0 (summary Network Number) Advertising Router: 1.1.1.1 LS Seq Number: 80000001 Checksum: 0x5F8C Length: 28 Network Mask: /24 MTID: 0 Metric: 65 LS age: 149 Options: (No TOS-capability, DC, Upward) LS Type: Summary Links(Network) Link State ID: 10.0.12.0 (summary Network Number) Advertising Router: 1.1.1.1 LS Seq Number: 80000001 Checksum: 0xE6FB Length: 28 Network Mask: /24 MTID: 0 Metric: 64 LS age: 149 Options: (No TOS-capability, DC, Upward) LS Type: Summary Links(Network) Link State ID: 10.0.13.0 (summary Network Number) Advertising Router: 1.1.1.1 LS Seq Number: 80000001 Checksum: 0x63BD Length: 28 Network Mask: /24 MTID: 0 Metric: 1 LS age: 149 Options: (No TOS-capability, DC, Upward) LS Type: Summary Links(Network) Link State ID: 10.0.16.0 (summary Network Number) Advertising Router: 1.1.1.1 LS Seq Number: 80000001 Checksum: 0xBA24 Length: 28 Network Mask: /24 MTID: 0 Metric: 64 < omitted output >
Exhibit 9 – Summary LSAs originated by router R1 and advertised into area 0
An LSA Type 3 includes these fields:
- LS age
- LS Type
- Link State ID
- Advertising Router
- LS Seq Number
- Checksum
- Length
- Network Mask
- Metric
The Link State ID field is the subnet’s IP address, and the metric is the cost to reach that subnet from the LSA’s advertising router.
Subnet | Area | R1 is attached to the area? | Advertised using a summary LSA to areas |
10.0.0.0/24 | 0 | Yes | 3, 12, 13, and 16 |
10.0.3.3/32 | 3 | No | 12, 13, and 16 |
10.0.2.0/24 | 12 | Yes | 0, 3, 13, and 16 |
10.0.12.0/24 | 12 | ||
10.0.13.0/24 | 13 | Yes | 0, 3, 12, and 16 |
10.0.16.0/24 | 16 | Yes | 0, 3, 12, and 13 |
R1# show ip ospf database summary self-originate < omitted output > Summary Net Link States (Area 12) LS age: 149 Options: (No TOS-capability, DC, Upward) LS Type: Summary Links(Network) Link State ID: 10.0.0.0 (summary Network Number) Advertising Router: 1.1.1.1 LS Seq Number: 80000001 Checksum: 0xF23B Length: 28 Network Mask: /24 MTID: 0 Metric: 1 LS age: 110 Options: (No TOS-capability, DC, Upward) LS Type: Summary Links(Network) Link State ID: 10.0.3.3 (summary Network Number) Advertising Router: 1.1.1.1 LS Seq Number: 80000001 Checksum: 0xBD69 Length: 28 Network Mask: /32 MTID: 0 Metric: 2 LS age: 149 Options: (No TOS-capability, DC, Upward) LS Type: Summary Links(Network) Link State ID: 10.0.13.0 (summary Network Number) Advertising Router: 1.1.1.1 LS Seq Number: 80000001 Checksum: 0x63BD Length: 28 Network Mask: /24 MTID: 0 Metric: 1 LS age: 149 Options: (No TOS-capability, DC, Upward) LS Type: Summary Links(Network) Link State ID: 10.0.16.0 (summary Network Number) Advertising Router: 1.1.1.1 LS Seq Number: 80000001 Checksum: 0xBA24 Length: 28 Network Mask: /24 MTID: 0 Metric: 64 Summary Net Link States (Area 13) LS age: 149 Options: (No TOS-capability, DC, Upward) LS Type: Summary Links(Network) Link State ID: 10.0.0.0 (summary Network Number) Advertising Router: 1.1.1.1 LS Seq Number: 80000001 Checksum: 0xF23B Length: 28 Network Mask: /24 MTID: 0 Metric: 1 LS age: 149 Options: (No TOS-capability, DC, Upward) LS Type: Summary Links(Network) Link State ID: 10.0.2.0 (summary Network Number) Advertising Router: 1.1.1.1 LS Seq Number: 80000001 Checksum: 0x5F8C Length: 28 Network Mask: /24 MTID: 0 Metric: 65 LS age: 110 Options: (No TOS-capability, DC, Upward) LS Type: Summary Links(Network) Link State ID: 10.0.3.3 (summary Network Number) Advertising Router: 1.1.1.1 LS Seq Number: 80000001 Checksum: 0xBD69 Length: 28 Network Mask: /32 MTID: 0 Metric: 2 LS age: 149 Options: (No TOS-capability, DC, Upward) LS Type: Summary Links(Network) Link State ID: 10.0.12.0 (summary Network Number) Advertising Router: 1.1.1.1 LS Seq Number: 80000001 Checksum: 0xE6FB Length: 28 Network Mask: /24 MTID: 0 Metric: 64 LS age: 149 Options: (No TOS-capability, DC, Upward) LS Type: Summary Links(Network) Link State ID: 10.0.16.0 (summary Network Number) Advertising Router: 1.1.1.1 LS Seq Number: 80000001 Checksum: 0xBA24 Length: 28 Network Mask: /24 MTID: 0 Metric: 64 Summary Net Link States (Area 16) LS age: 149 Options: (No TOS-capability, DC, Upward) LS Type: Summary Links(Network) Link State ID: 10.0.0.0 (summary Network Number) Advertising Router: 1.1.1.1 LS Seq Number: 80000001 Checksum: 0xF23B Length: 28 Network Mask: /24 MTID: 0 Metric: 1 LS age: 149 Options: (No TOS-capability, DC, Upward) LS Type: Summary Links(Network) Link State ID: 10.0.2.0 (summary Network Number) Advertising Router: 1.1.1.1 LS Seq Number: 80000001 Checksum: 0x5F8C Length: 28 Network Mask: /24 MTID: 0 Metric: 65 LS age: 110 Options: (No TOS-capability, DC, Upward) LS Type: Summary Links(Network) Link State ID: 10.0.3.3 (summary Network Number) Advertising Router: 1.1.1.1 LS Seq Number: 80000001 Checksum: 0xBD69 Length: 28 Network Mask: /32 MTID: 0 Metric: 2 LS age: 149 Options: (No TOS-capability, DC, Upward) LS Type: Summary Links(Network) Link State ID: 10.0.12.0 (summary Network Number) Advertising Router: 1.1.1.1 LS Seq Number: 80000001 Checksum: 0xE6FB Length: 28 Network Mask: /24 MTID: 0 Metric: 64 LS age: 149 Options: (No TOS-capability, DC, Upward) LS Type: Summary Links(Network) Link State ID: 10.0.13.0 (summary Network Number) Advertising Router: 1.1.1.1 LS Seq Number: 80000001 Checksum: 0x63BD Length: 28 Network Mask: /24 MTID: 0 Metric: 1
Exhibit 10 – Displaying summary LSAs originated by router R1
It is important to note that Type 3 LSAs cannot carry information about subnets outside of current OSPF domains. Furthermore, if an OSPF router is linked to multiple OSPF areas but not area 0, it will not produce Type 3 LSAs.
To understand how Type 4 LSAs (ASBR summary LSAs) work, let us first examine Type 5 LSAs.
OSPF LSA Type 5 (AS external LSA)
What is OSPF LSA Type 5?
An LSA Type 5 is generated by AS boundary routers (ASBRs). On an ASBR, routes get injected from another routing domain into the current OSPF autonomous system. Router R4 is called ASBR because it redistributes subnets of the RIPv2 autonomous system into the OSPF AS.
For each external subnet, the ASBR creates one Type 5 LSA and forwards it to all of its full adjacent neighbors no matter the areas they are in. The next step is that each of the external LSAs gets flooded throughout the entire OSPF domain. In our case, router R4 generates a Type 5 LSA and forwards it to its OSPF adjacent neighbors for each injected subnet from the RIPv2 domain.
Due to the fact that router R4 is the DR on its F0/0’s link, it will forward those LSAs to routers R1, R2, and R3. The routers will share these LSAs with their adjacent neighbors. In fact, router R1 will transmit those LSAs to routers R2, R3, and R6. Additionally, routers R2 and R3 will only forward these external LSAs to router R1.
In contrast to router, network, summary, and AS summary LSAs, Type 5 LSAs do not get associated with a specific area. The following fields are included in external LSAs:
- LS age
- LS Type
- Link State ID
- Advertising Router
- LS Sequence Number
- Checksum
- Length
- Network Mask
- Metric
The Link State ID field contains the IP address of an external subnet, and the Advertising Router field indicates the router ID of the OSPF router originating the type 5 LSA.
Here are two examples of external LSAs.
R6# show ip ospf database external OSPF Router with ID (6.6.6.6) (Process ID 1) Type-5 AS External Link States Routing Bit Set on this LSA in topology Base with MTID 0 LS age: 734 Options: (No TOS-capability, DC, Upward) LS Type: AS External Link Link State ID: 10.0.5.0 (External Network Number ) Advertising Router: 4.4.4.4 LS Seq Number: 80000001 Checksum: 0xB5CB Length: 36 Network Mask: /24 Metric Type: 2 (Larger than any link state path) MTID: 0 Metric: 20 Forward Address: 0.0.0.0 External Route Tag: 0 Routing Bit Set on this LSA in topology Base with MTID 0 LS age: 840 Options: (No TOS-capability, DC, Upward) LS Type: AS External Link Link State ID: 10.0.45.0 (External Network Number ) Advertising Router: 4.4.4.4 LS Seq Number: 80000001 Checksum: 0xFB5D Length: 36 Network Mask: /24 Metric Type: 2 (Larger than any link state path) MTID: 0 Metric: 20 Forward Address: 0.0.0.0 External Route Tag: 0
Exhibit 11 – External LSAs generated by router R4
As shown in Exhibit 11, each LSA type 5 includes the IP address and subnet mask of the external network prefix. Also, the LSA supplies the router ID of the ASBR, and its path cost to reach that subnet. Moreover, external LSAs do not get flooded within stub areas (more about later in this post).
In Exhibit 12, you can notice that next to each LSA type, Cisco IOS displays the corresponding area, except for Type 5 LSAs. They are shown without any indication of a particular OSPF area.
R6# show ip ospf database OSPF Router with ID (6.6.6.6) (Process ID 1) Router Link States (Area 16) Link ID ADV Router Age Seq# Checksum Link count 1.1.1.1 1.1.1.1 674 0x80000003 0x002329 2 6.6.6.6 6.6.6.6 670 0x80000002 0x0040F4 2 Summary Net Link States (Area 16) Link ID ADV Router Age Seq# Checksum 10.0.0.0 1.1.1.1 688 0x80000001 0x00F23B 10.0.2.0 1.1.1.1 693 0x80000001 0x005F8C 10.0.3.3 1.1.1.1 688 0x80000001 0x00BD69 10.0.12.0 1.1.1.1 693 0x80000001 0x00E6FB 10.0.13.0 1.1.1.1 693 0x80000001 0x0063BD Summary ASB Link States (Area 16) Link ID ADV Router Age Seq# Checksum 4.4.4.4 1.1.1.1 688 0x80000001 0x00AE78 Type-5 AS External Link States Link ID ADV Router Age Seq# Checksum Tag 10.0.5.0 4.4.4.4 686 0x80000001 0x00B5CB 0 10.0.45.0 4.4.4.4 792 0x80000001 0x00FB5D 0
Exhibit 12 – Summary of R6’s LSDB
LSA Type 4 (Summary LSA)
In Exhibit 11, subnets 10.0.45.0/24 and 10.0.5.0/24 are shown to be linked to the IP gateway with router ID 4.4.4.4, which has an interface in area 0. Because area 0 routers are aware of where R4 is located, they can determine how to get to those subnets.
Specifically, all routers in area 0 have a router LSA originated by router R4; thus, routers R1, R2, and R3 can determine a way to reach router R4, and calculate the shortest paths to subnets 10.0.45.0/24 and 10.0.5.0/24. However, router R6 cannot determine the path to router R4 because all router LSAs hosted in its LSDB do not describe router R4 (Exhibit 12).
As a result, router R1 will create a Type 4 LSA summary to inform router R6 that R1 can be used as a gateway to reach router R4 (Exhibit 13). This means that router R6 can now calculate the best path to subnets 10.0.45.0/24 and 10.0.5.0/24, and these paths will be routed through router R1.
In Exhibit 13, the Link State ID, Advertising Router, and Metric fields include the router ID of the ASBR, OSPF router ID of the ABR that produced the LSA, and the cost to reach the ASBR from the ABR.
In summary, an area boundary router produces an LSA Type 4 in order to suggest itself as a gateway to a particular AS boundary router. In a scenario where there are many ASBRs on the network, each ABR generates one LSA Type 4 for each ASBR and then forwards it into areas the ABR is linked to (Exhibit 14), except OSPF areas to which the ASBR connects. In addition, each Type 4 LSA is flooded throughout its associated area, while Type 5 LSAs are flooded throughout the current OSPF autonomous system.
R6# show ip ospf database asbr-summary OSPF Router with ID (6.6.6.6) (Process ID 1) Summary ASB Link States (Area 16) Routing Bit Set on this LSA in topology Base with MTID 0 LS age: 1358 Options: (No TOS-capability, DC, Upward) LS Type: Summary Links(AS Boundary Router) Link State ID: 4.4.4.4 (AS Boundary Router address) Advertising Router: 1.1.1.1 LS Seq Number: 80000004 Checksum: 0xA87B Length: 28 Network Mask: /0 MTID: 0 Metric: 1
Exhibit 13 – Type 4 LSA created by Router R1 and sent to router R6
R1# show ip ospf database asbr-summary self-originate OSPF Router with ID (1.1.1.1) (Process ID 1) Summary ASB Link States (Area 12) LS age: 125 Options: (No TOS-capability, DC, Upward) LS Type: Summary Links(AS Boundary Router) Link State ID: 4.4.4.4 (AS Boundary Router address) Advertising Router: 1.1.1.1 LS Seq Number: 80000005 Checksum: 0xA67C Length: 28 Network Mask: /0 MTID: 0 Metric: 1 Summary ASB Link States (Area 13) LS age: 125 Options: (No TOS-capability, DC, Upward) LS Type: Summary Links(AS Boundary Router) Link State ID: 4.4.4.4 (AS Boundary Router address) Advertising Router: 1.1.1.1 LS Seq Number: 80000005 Checksum: 0xA67C Length: 28 Network Mask: /0 MTID: 0 Metric: 1 Summary ASB Link States (Area 16) LS age: 125 Options: (No TOS-capability, DC, Upward) LS Type: Summary Links(AS Boundary Router) Link State ID: 4.4.4.4 (AS Boundary Router address) Advertising Router: 1.1.1.1 LS Seq Number: 80000005 Checksum: 0xA67C Length: 28 Network Mask: /0 MTID: 0 Metric: 1
Exhibit 14- Type 4 LSAs created by Router R1
Related Lessons to OSPF LSA Types
- OSPF
- OSPF Router ID
- OSPF Null Authentication
- OSPF Plain Text Authentication
- OSPF Default Route
- Basic OSPF Configuration Lab for CCNA
- OSPF Configuration
- OSPF Passive Interface
- OSPF Virtual Link
- OSPF Stub Area
- OSPF LSA Types
- OSPF Graceful Restart
- OSPF Totally Stubby Area
- OSPF Reference Bandwidth
- OSPF Cost
- OSPF DR/BDR Election
- OSPF Hello and Dead Interval
- OSPF Metric
- OSPF MD5 Authentication
- OSPF HMAC-SHA Cryptographic Authentication
- OSPF Multi-Area
- OSPF TTL Security Check
- OSPF Graceful Shutdown
- Route Redistribution between OSPF and RIP
- OSPF Network Types
- OSPF Totally NSSA Area
- OSPF NSSA Area
- OSPF Summarization
- OSPF Route Filtering
- OSPF Type 5 LSA Filtering
- OSPF ABR Type 3 LSA Filtering
- OSPF Prefix Suppression
- OSPF Path Selection
- OSPF LSA Throttling
- OSPF SPF Throttling
- OSPF Incremental SPF
- OSPF Non-Broadcast Network Type
- OSPF Point-to-Point Network Type
- OSPF Broadcast Network Type
- OSPF Point-to-Multipoint Network Type
- OSPF vs RIP
- OSPF LSA Group Pacing
- OSPF LSA Flood Pacing
- OSPF LSA Retransmission Pacing
- Troubleshooting OSPF Neighbor Adjacency
- Troubleshooting OSPF Route Installation
- Troubleshooting OSPF Route Advertisement
- OSPF Stub Router
Conclusion
I hope this blog post helps you learn something.
Now I’d like to turn it over to you:
What did you like about this tutorial?
Or maybe you have an excellent idea that you think I need to add.
Either way, let me know by leaving a comment below right now.