Overview

OSPFv3 routers use the Link-State Database (LSD) to store information it receives from Link State Advertisements (LSAs).

Examining the LSD is useful for troubleshooting and optimizing the efficiency of the OSPFv3 domain (i.e. using Stub areas to summarize routes).

OSPFv3 Database

In this lesson, we'll will explore the following verification commands:

show ipv6 ospf database
show ipv6 ospf database router
show ipv6 ospf database prefix
show ipv6 ospf database link
show ipv6 ospf interface [g0/0]
show ipv6 ospf database ?

FYI: This lesson uses the lab from the Basic OSPFv3 Configuration and Verification lesson to examine the OSPFv3 link-state database.

Basic OSPFv3 Configuration Topology
Basic OSPFv3 Configuration Topology

By issuing the show ipv6 ospf database command we'll see a summary of the OSPFv3 Link-State Database. Let's examine the output of R-1:

R-1#show ipv6 ospf database

            OSPFv3 Router with ID (1.1.1.1) (Process ID 6)

                Router Link States (Area 1)

ADV Router       Age         Seq#        Fragment ID  Link count  Bits
 1.1.1.1         54          0x80000002  0            1           None
 2.2.2.2         55          0x80000002  0            1           B

                Net Link States (Area 1)

ADV Router       Age         Seq#        Link ID    Rtr count
 2.2.2.2         55          0x80000001  2          2

                Inter Area Prefix Link States (Area 1)

ADV Router       Age         Seq#        Prefix
 2.2.2.2         100         0x80000001  2001:2::2/128
 2.2.2.2         90          0x80000001  2001:23::/64
 2.2.2.2         51          0x80000001  2001:3::3/128
 2.2.2.2         51          0x80000001  2001:4::4/128
 2.2.2.2         51          0x80000001  2001:34::/64

                Link (Type-8) Link States (Area 1)

ADV Router       Age         Seq#        Link ID    Interface
 1.1.1.1         94          0x80000002  2          Gi0/0
 2.2.2.2         95          0x80000002  2          Gi0/0

                Intra Area Prefix Link States (Area 1)

ADV Router       Age         Seq#        Link ID    Ref-lstype  Ref-LSID
 1.1.1.1         54          0x80000003  0          0x2001      0
 2.2.2.2         55          0x80000001  2048       0x2002      2			

The output is well laid out.

Line 3 - The title shows us that we're looking at an OSPFv3 router, the router's RID and the PID.

Line 5 - Type 1: Router LSAs. For the Advertising Routers we have 1.1.1.1 for R-1 (the router advertises to itself) and 2.2.2.2 for R-2. This is what we want to see as there are no other adjacent OSPFv3 routers in the same area.

Line 11 - Type 2: Network LSA - Here we only see R-2 as it's the only other OSPFv3 router in the same area as R-1.

Line 16 - Type 3: Inter-Area Prefix LSA - Here we can see all of the prefixes learned from the Advertising Router with a RID of 2.2.2.2 (R-2).

Line 25 - Type 8: Link LSA - Here we can see the routers on the link and the interfaces that connect them.

Line 31 - Type 4: Intra-Area Router LSA - Here we can see what routers are within the same area. The Ref-lstype field tells us what LSA type the information was learned from. The 1 in 0x2001 refers to a Type 1: Router LSA and the 2 in 0x2002 refers to a Type 2: Network LSA.

Now that we've examined the database summary, let's take a closer look at specific LSA types within the database. The show ipv6 ospf database router command will show more detailed information about the Type 1: Router LSA.

R-1#show ipv6 ospf database router

          OSPFv3 Router with ID (1.1.1.1) (Process ID 6)

              Router Link States (Area 1)

LS age: 627
Options: (V6-Bit, E-Bit, R-Bit, DC-Bit)
LS Type: Router Links
Link State ID: 0
Advertising Router: 1.1.1.1
LS Seq Number: 80000002
Checksum: 0xEB02
Length: 40
Number of Links: 1

  Link connected to: a Transit Network
    Link Metric: 1
    Local Interface ID: 2
    Neighbor (DR) Interface ID: 2
    Neighbor (DR) Router ID: 2.2.2.2


Routing Bit Set on this LSA
LS age: 628
Options: (V6-Bit, E-Bit, R-Bit, DC-Bit)
LS Type: Router Links
Link State ID: 0
Advertising Router: 2.2.2.2
LS Seq Number: 80000002
Checksum: 0xD018
Length: 40
Area Border Router
Number of Links: 1

  Link connected to: a Transit Network
    Link Metric: 1
    Local Interface ID: 2
    Neighbor (DR) Interface ID: 2
    Neighbor (DR) Router ID: 2.2.2.2

By where you are now in the OSPFv3 lessons, most of the fields should be self-explanatory. If they're not, please take the time to review previous lessons until it "clicks".

Note that the link is connected to a Transit Network. This means it’s receiving its LSA information from a Designated Router (DR). Therefor, the DR’s RID is listed. If this were a point-to-point network, the neighboring router’s RID would be listed. (In our lab the neighboring router happens to also be the neighboring router.)

Also note there is no prefix information here. Prefix information is sent in the Type 9: Intra-Area Prefix LSA.

Let's examine the Type 9: Intra-Area Prefix LSA next:

R-1#show ipv6 ospf database prefix

          OSPFv3 Router with ID (1.1.1.1) (Process ID 6)

              Intra Area Prefix Link States (Area 1)

LS age: 1366
LS Type: Intra-Area-Prefix-LSA
Link State ID: 0
Advertising Router: 1.1.1.1
LS Seq Number: 80000003
Checksum: 0x94BA
Length: 52
Referenced LSA Type: 2001
Referenced Link State ID: 0
Referenced Advertising Router: 1.1.1.1
Number of Prefixes: 1
Prefix Address: 2001:1::1
Prefix Length: 128, Options: LA, Metric: 0

LS age: 1367
LS Type: Intra-Area-Prefix-LSA
Link State ID: 2048
Advertising Router: 2.2.2.2
LS Seq Number: 80000001
Checksum: 0xCFA8
Length: 44
Referenced LSA Type: 2002
Referenced Link State ID: 2
Referenced Advertising Router: 2.2.2.2
Number of Prefixes: 1
Prefix Address: 2001:12::
Prefix Length: 64, Options: None, Metric: 0

In this output we see Global Unicast Addresses (GUAs).

We can find the Link Local Addresses (LLAs) in the Type 8: Link LSA by using the show ipv6 ospf database link command:

R-1#show ipv6 ospf database link

          OSPFv3 Router with ID (1.1.1.1) (Process ID 6)

              Link (Type-8) Link States (Area 1)

LS age: 1809
Options: (V6-Bit, E-Bit, R-Bit, DC-Bit)
LS Type: Link-LSA (Interface: GigabitEthernet0/0)
Link State ID: 2 (Interface ID)
Advertising Router: 1.1.1.1
LS Seq Number: 80000002
Checksum: 0x6244
Length: 56
Router Priority: 1
Link Local Address: FE80::E5E:FAFF:FEDD:2400
Number of Prefixes: 1
Prefix Address: 2001:12::
Prefix Length: 64, Options: None

LS age: 1809
Options: (V6-Bit, E-Bit, R-Bit, DC-Bit)
LS Type: Link-LSA (Interface: GigabitEthernet0/0)
Link State ID: 2 (Interface ID)
Advertising Router: 2.2.2.2
LS Seq Number: 80000002
Checksum: 0xBDD0
Length: 56
Router Priority: 1
Link Local Address: FE80::E5E:FAFF:FE0A:C00
Number of Prefixes: 1
Prefix Address: 2001:12::
Prefix Length: 64, Options: None

Here we can see the GUA prefixes and the LLAs.

R-2 should have similar output to R-1, except it should have some additional output of interest since it's an Area Border Router (ABR).

R-2#show ipv6 ospf database

            OSPFv3 Router with ID (2.2.2.2) (Process ID 6)

                Router Link States (Area 0)

ADV Router       Age         Seq#        Fragment ID  Link count  Bits
 2.2.2.2         223         0x80000004  0            1           B
 3.3.3.3         177         0x80000004  0            1           B

                Net Link States (Area 0)

ADV Router       Age         Seq#        Link ID    Rtr count
 3.3.3.3         177         0x80000002  2          2

                Inter Area Prefix Link States (Area 0)

ADV Router       Age         Seq#        Prefix
 2.2.2.2         223         0x80000002  2001:12::/64
 2.2.2.2         223         0x80000002  2001:1::1/128
 3.3.3.3         177         0x80000002  2001:34::/64
 3.3.3.3         177         0x80000002  2001:4::4/128

                Link (Type-8) Link States (Area 0)

ADV Router       Age         Seq#        Link ID    Interface
 2.2.2.2         223         0x80000003  3          Gi0/1
 3.3.3.3         423         0x80000003  2          Gi0/1

                Intra Area Prefix Link States (Area 0)

ADV Router       Age         Seq#        Link ID    Ref-lstype  Ref-LSID
 2.2.2.2         223         0x80000004  0          0x2001      0
 3.3.3.3         177         0x80000004  0          0x2001      0
 3.3.3.3         177         0x80000002  2048       0x2002      2

                Router Link States (Area 1)

ADV Router       Age         Seq#        Fragment ID  Link count  Bits
 1.1.1.1         205         0x80000003  0            1           None
 2.2.2.2         223         0x80000003  0            1           B

                Net Link States (Area 1)

ADV Router       Age         Seq#        Link ID    Rtr count
 2.2.2.2         223         0x80000002  2          2

                Inter Area Prefix Link States (Area 1)

ADV Router       Age         Seq#        Prefix
 2.2.2.2         223         0x80000002  2001:2::2/128
 2.2.2.2         223         0x80000002  2001:23::/64
 2.2.2.2         223         0x80000002  2001:3::3/128
 2.2.2.2         223         0x80000002  2001:4::4/128
 2.2.2.2         223         0x80000002  2001:34::/64

                Link (Type-8) Link States (Area 1)

ADV Router       Age         Seq#        Link ID    Interface
 1.1.1.1         205         0x80000003  2          Gi0/0
 2.2.2.2         223         0x80000003  2          Gi0/0

                Intra Area Prefix Link States (Area 1)

ADV Router       Age         Seq#        Link ID    Ref-lstype  Ref-LSID
 1.1.1.1         205         0x80000004  0          0x2001      0
 2.2.2.2         223         0x80000002  2048       0x2002      2

Since R-2 borders two areas, the database summary lists the LSAs by area.

Notice how quickly the database has grown. R-2's database is significantly larger than R-1. As mentioned earlier, techniques like using OSPFv3's Stub areas are useful to help reduce OSPFv3's overhead.

If you have a topology that differs from the one in this lab (maybe you have an ASBR and thus have Type 4: Inter-Area Router LSAs) you may want to lookup other database show commands:

To continue reading, please login or become a member for full access...