In this part, you will verify that the network has converged and explore how link-state advertisements (LSAs) are used as the building blocks for the OSPF link-state database (LSDB).
OSPF routers create LSAs for every directly connected OSPF-enabled interface. It then sends those LSAs to OSPF peers to form adjacencies. Individually, LSAs are database records providing specific OSPF network details. Combined, they describe the entire topology of an OSPF area.
OSPF routers uses six LSA types for IPv4 routing:
· Type 1, router LSA – All OSPF-enabled routers create and send type 1 LSAs. The LSAs are immediately propagated within the area. An ABR does not forward the LSA outside the area.
· Type 2, network LSA – Only a DR generates and advertises a type 2 LSA. The type 2 network LSA lists each of the attached routers that make up the transit network, including the DR itself, and the subnet mask that is used on the link. The DR floods the LSA to all OSPF routers (i.e., 224.0.0.5) on the multiaccess network. The content of the displayed type 2 LSA describes the network segment listing the DR address, the attached routers, and the used subnet mask. This information is used by each router participating in OSPF to build the exact picture of the described multiaccess segment, which cannot be fully described with just type 1 LSAs.
· Type 3, summary LSA – ABRs do not forward type 1 or type 2 LSAs into other areas. ABRs flood type 3 LSAs to propagate network information to other areas. Type 3 summary LSAs describe networks that are in an area to the rest of the areas in the OSPF autonomous system.
· Type 4, ASBR summary LSA – When there is an ASBR in the OSPF domain, it advertises itself using a special type 1 LSA. When an ABR receives this type 1 LSA, it builds a type 4 LSA to advertise the existence of the ASBR and floods it to other areas. Subsequent ABRs regenerate a type 4 LSA and flood it into their areas.
· Type 5, AS external LSA – ASBRs generate a type 5 external LSAs to advertise external OSPF routes to the OSPF domain. Type 5 LSAs are originated by the ASBR and are flooded to the entire autonomous system.
· Type 7, NSSA external LSA – This is a special LSA generated by a not-so-stubby (NSSA) ASBR to advertise external OSPF networks to an OSPF domain. The ABR converts the type 7 LSA to a type 5 LSA and propagates it to other areas. An NSSA network is a special-case area type used to reduce the amount of flooding, the LSDB size, and the routing table size in routers within the area.
Note: Other LSAs also exist but are out of scope of this lab.
The focus of this section will be on LSA types 1, 2, and 3 which are used to identify intra-area and interarea routes.
D1 is an internal router and generates type 1 LSAs. It is also the DR on the link connecting to R1 and therefore generates type 2 LSAs.
a. On D1, display the list of neighbors using the show ip ospf neighbors command.
Open configuration window
D1# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface 1.1.1.1 1 FULL/BDR 00:00:32 10.10.0.1 GigabitEthernet0/1 |
The output confirms that R1 (i.e., 1.1.1.1) is a neighbor and is the BDR on the link. Therefore, D1 must be the DR.
b. Verify the OSPF routing table using the show ip router ospf | begin Gateway command.
D1# show ip route ospf | begin Gateway
Gateway of last resort is 10.10.0.1 to network 0.0.0.0
O*E2 0.0.0.0/0 [110/1] via 10.10.0.1, 01:15:48, GigabitEthernet0/1 10.0.0.0/8 is variably subnetted, 6 subnets, 3 masks O IA 10.10.4.0/30 [110/40] via 10.10.0.1, 00:52:50, GigabitEthernet0/1 O IA 10.10.5.0/24 [110/50] via 10.10.0.1, 00:24:49, GigabitEthernet0/1 172.16.0.0/30 is subnetted, 2 subnets O IA 172.16.0.0 [110/20] via 10.10.0.1, 02:05:06, GigabitEthernet0/1 O IA 172.16.1.0 [110/30] via 10.10.0.1, 01:18:11, GigabitEthernet0/1 |
The routing table lists the four interarea networks and one external OSPF network.
c. D1 learned about these networks from LSAs. A router maintains a LSDB for each area it has interfaces in. Because D1 is an internal OSPF router, it will only have entries for Area 1. To display the contents of the LSDB of D1, use the show ip ospf database command.
D1# show ip ospf database
OSPF Router with ID (1.1.1.2) (Process ID 123)
Router Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Link count 1.1.1.1 1.1.1.1 1806 0x80000005 0x00DC15 1 1.1.1.2 1.1.1.2 167 0x80000005 0x001AA6 2
Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum 10.10.0.2 1.1.1.2 167 0x80000003 0x00B462
Summary Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum 10.10.4.0 1.1.1.1 1806 0x80000002 0x00A86E 10.10.5.0 1.1.1.1 1807 0x80000002 0x0014F4 172.16.0.0 1.1.1.1 1807 0x80000002 0x00DBA1 172.16.1.0 1.1.1.1 1807 0x80000002 0x00DAA0
Summary ASB Link States (Area 1)
Link ID ADV Router Age Seq# Checksum 2.2.2.1 1.1.1.1 1807 0x80000002 0x00131C
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag 0.0.0.0 2.2.2.1 1939 0x80000002 0x009F90 123 |
Notice how the command output is divided into the following five sections:
o Router Link States – These are the type 1 LSAs received by D1 and they identify the routers (i.e., 1.1.1.1 = R1, 1.1.1.2 = D1) in Area 1 that sent them, and the number of links that the routers have in the area. Therefore, R1 only has one interface in Area 1 and D1 has 2 interfaces in Area 1.
o Net Link States – These are the type 2 LSAs generated by the DR. In our example, the DR is 1.1.1.2 (i.e., D1) on the link 10.10.0.2.
o Summary Net Link States – These are the type 3 LSAs describing remote networks (i.e., our O IA networks or interarea routes) and the router that advertised them to D1.
o Summary ASB Link States – This is a type 4 LSA sent by the ABR (i.e., 1.1.1.1 = R1) advertising that there is an ASBR in the network (i.e., 2.2.2.1).
o Type-5 AS External Link States – This is a type 5 LSA advertising a default route (i.e., 0.0.0.0) and the router that is advertising it (i.e., 2.2.2.1).
d. Additional information about the Router Link States type 1 LSA can be gathered using the show ip ospf database router command.
D1# show ip ospf database router
OSPF Router with ID (1.1.1.2) (Process ID 123)
Router Link States (Area 1)
Routing Bit Set on this LSA in topology Base with MTID 0 LS age: 843 Options: (No TOS-capability, DC) LS Type: Router Links Link State ID: 1.1.1.1 Advertising Router: 1.1.1.1 LS Seq Number: 80000007 Checksum: 0xD817 Length: 36 Area Border Router Number of Links: 1
Link connected to: a Transit Network (Link ID) Designated Router address: 10.10.0.2 (Link Data) Router Interface address: 10.10.0.1 Number of TOS metrics: 0 TOS 0 Metrics: 1
LS age: 1196 Options: (No TOS-capability, DC) LS Type: Router Links Link State ID: 1.1.1.2 Advertising Router: 1.1.1.2 LS Seq Number: 80000006 Checksum: 0x18A7 Length: 48 Number of Links: 2
Link connected to: a Transit Network (Link ID) Designated Router address: 10.10.0.2 (Link Data) Router Interface address: 10.10.0.2 Number of MTID metrics: 0 TOS 0 Metrics: 1
Link connected to: a Stub Network (Link ID) Network/subnet number: 10.10.1.0 (Link Data) Network Mask: 255.255.255.0 Number of MTID metrics: 0 TOS 0 Metrics: 10 |
The output provides more information about the type 1 LSAs. The first router link (i.e., type 1) LSA is from R1 (i.e., 1.1.1.1). It is an ABR with only 1 link in Area 1 which is the transit network connecting to D1. The second router link portion identifies the transit network connecting to R1 and the stub network of D1 (i.e., 10.10.1.0/24).
An OSPF link can be connected to a stub, to another router (point-to-point), or to a transit network. The transit network usually describes an Ethernet segment which can include two or more routers. If the link is connected to a transit network, the LSA also includes the IP address of the DR.
e. To learn more about type 2 network LSAs, use show ip ospf database network command.
D1# show ip ospf database network
OSPF Router with ID (1.1.1.2) (Process ID 123)
Net Link States (Area 1)
LS age: 845 Options: (No TOS-capability, DC) LS Type: Network Links Link State ID: 10.10.0.2 (address of Designated Router) Advertising Router: 1.1.1.2 LS Seq Number: 80000005 Checksum: 0xB064 Length: 32 Network Mask: /30 Attached Router: 1.1.1.2 Attached Router: 1.1.1.1 |
The content of the type 2 LSA describes the network segment listing the DR address, the attached routers, and subnet mask using CIDR notation. This information is used by each router in the area to build the exact picture of the described multiaccess segment, which cannot be fully described with just type 1 LSAs.
f. To learn more about type 3 summary LSAs, use show ip ospf database summary command.
D1# show ip ospf database summary
OSPF Router with ID (1.1.1.2) (Process ID 123)
Summary Net Link States (Area 1)
LS age: 987 Options: (No TOS-capability, DC, Upward) LS Type: Summary Links(Network) Link State ID: 10.10.4.0 (summary Network Number) Advertising Router: 1.1.1.1 LS Seq Number: 80000005 Checksum: 0xA271 Length: 28 Network Mask: /30 MTID: 0 Metric: 30
LS age: 987 Options: (No TOS-capability, DC, Upward) LS Type: Summary Links(Network) Link State ID: 10.10.5.0 (summary Network Number) Advertising Router: 1.1.1.1 LS Seq Number: 80000005 Checksum: 0xEF7 Length: 28 Network Mask: /24 MTID: 0 Metric: 40
LS age: 988 Options: (No TOS-capability, DC, Upward) LS Type: Summary Links(Network) Link State ID: 172.16.0.0 (summary Network Number) Advertising Router: 1.1.1.1 LS Seq Number: 80000005 Checksum: 0xD5A4 Length: 28 Network Mask: /30 MTID: 0 Metric: 10
LS age: 989 Options: (No TOS-capability, DC, Upward) LS Type: Summary Links(Network) Link State ID: 172.16.1.0 (summary Network Number) Advertising Router: 1.1.1.1 LS Seq Number: 80000005 Checksum: 0xD4A3 Length: 28 Network Mask: /30 MTID: 0 Metric: 20 |
The output lists four type 3 LSAs. The LSAs identify the interarea networks, which ABR advertised, and the network mask using CIDR notation.
g. To learn more about type 4 summary LSAs, use show ip ospf database asbr-summary command.
D1# show ip ospf database asbr-summary
OSPF Router with ID (1.1.1.2) (Process ID 123)
Summary ASB Link States (Area 1)
LS age: 591 Options: (No TOS-capability, DC, Upward) LS Type: Summary Links(AS Boundary Router) Link State ID: 2.2.2.1 (AS Boundary Router address) Advertising Router: 1.1.1.1 LS Seq Number: 80000006 Checksum: 0xB20 Length: 28 Network Mask: /0 MTID: 0 Metric: 10 The output lists one type 4 LSA advertised by R1 identifying 2.2.2.1 as an ASBR. h. Finally, to learn more about type 5 AS external link LSAs, use show ip ospf database external command. D1# show ip ospf database external
OSPF Router with ID (1.1.1.2) (Process ID 123)
Type-5 AS External Link States
LS age: 1024 Options: (No TOS-capability, DC, Upward) LS Type: AS External Link Link State ID: 0.0.0.0 (External Network Number ) Advertising Router: 2.2.2.1 LS Seq Number: 80000006 Checksum: 0x9794 Length: 36 Network Mask: /0 Metric Type: 2 (Larger than any link state path) TOS: 0 Metric: 1 Forward Address: 0.0.0.0 External Route Tag: 123 |
The output lists one type 5 LSA identifying that 0.0.0.0/0 is available from 2.2.2.1 (i.e., R2).
R1 is an ABR with interfaces in Area 1 and Area 0. Therefore, R1 will have two LSDBs.
Display the LSDB on R1. Open configuration window R1# show ip ospf database
OSPF Router with ID (1.1.1.1) (Process ID 123)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count 1.1.1.1 1.1.1.1 1250 0x80000009 0x001E87 1 2.2.2.1 2.2.2.1 1284 0x8000000C 0x00A06E 2 3.3.3.1 3.3.3.1 1220 0x80000008 0x00BDDA 1
Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum 172.16.0.2 1.1.1.1 1284 0x80000006 0x002A3E 172.16.1.1 2.2.2.1 1284 0x80000006 0x0067F9
Summary Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum 10.10.0.0 1.1.1.1 1250 0x80000008 0x00B462 10.10.1.0 1.1.1.1 1250 0x80000006 0x0024E6 10.10.4.0 3.3.3.1 1220 0x80000008 0x0058B4 10.10.5.0 3.3.3.1 1220 0x80000006 0x00C739
Router Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Link count 1.1.1.1 1.1.1.1 1250 0x80000009 0x00D419 1 1.1.1.2 1.1.1.2 1632 0x80000008 0x0014A9 2
Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum 10.10.0.2 1.1.1.2 1632 0x80000006 0x00AE65
Summary Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum 10.10.4.0 1.1.1.1 1250 0x80000006 0x00A072 10.10.5.0 1.1.1.1 1250 0x80000006 0x000CF8 172.16.0.0 1.1.1.1 1250 0x80000006 0x00D3A5 172.16.1.0 1.1.1.1 1250 0x80000006 0x00D2A4
Summary ASB Link States (Area 1)
Link ID ADV Router Age Seq# Checksum 2.2.2.1 1.1.1.1 1250 0x80000006 0x000B20
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag 0.0.0.0 2.2.2.1 1284 0x80000006 0x009794 123 |
The output displays the type 1, 2, and 3 LSAs in Area 0, and then lists the type 1, 2, 3, and 4 LSAs in Area 1. The last section displays the type 5 LSAs.
To learn more about each LSA type, use the following commands:
show ip ospf database router show ip ospf database network show ip ospf database summary show ip ospf database asbr-summary show ip ospf database external |
R2 is an ASBR with interfaces in Area 0 and an external non-OSPF network.
Display the LSDB on R2.
Open configuration window
R2# show ip ospf database
OSPF Router with ID (2.2.2.1) (Process ID 123)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count 1.1.1.1 1.1.1.1 1790 0x80000009 0x001E87 1 2.2.2.1 2.2.2.1 1822 0x8000000C 0x00A06E 2 3.3.3.1 3.3.3.1 1759 0x80000008 0x00BDDA 1
Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum 172.16.0.2 1.1.1.1 1822 0x80000006 0x002A3E 172.16.1.1 2.2.2.1 1822 0x80000006 0x0067F9
Summary Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum 10.10.0.0 1.1.1.1 1790 0x80000008 0x00B462 10.10.1.0 1.1.1.1 1790 0x80000006 0x0024E6 10.10.4.0 3.3.3.1 1759 0x80000008 0x0058B4 10.10.5.0 3.3.3.1 1759 0x80000006 0x00C739
Type-5 AS External Link States
Link ID ADV Router Age Seq# Checksum Tag 0.0.0.0 2.2.2.1 1822 0x80000006 0x009794 123 |
The output displays the type 1, 2, 3 and 5 LSAs in Area 0. Notice that there is no type 4 LSA because R2 is the ASBR and only an ABR can generate an LSA4.