查看ospf数据库
r1#show ip ospf database
            OSPF Router with ID (172.16.61.1) (Process ID 8)
 
                Router Link States (Area 0)
 
Link ID         ADV Router      Age         Seq#       Checksum Link count
172.16.61.1     172.16.61.1     323         0x80000003 0x00facd 1
172.16.22.2     172.16.22.2     323         0x80000003 0x00bf52 1
 
                Net Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum
172.16.12.1     172.16.61.1     323         0x80000001 0x007156
 
                Summary Net Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum
172.16.41.0     172.16.61.1     318         0x80000001 0x0097d6
172.16.61.0     172.16.61.1     318         0x80000002 0x00b8a0
172.16.23.0     172.16.22.2     313         0x80000003 0x00663e
172.16.22.2     172.16.22.2     308         0x8000000d 0x00b5f2
 
                Summary ASB Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum
172.16.35.3     172.16.22.2     308         0x8000000c 0x00a3e7
 
                Router Link States (Area 10)
 
Link ID         ADV Router      Age         Seq#       Checksum Link count
172.16.61.1     172.16.61.1     348         0x80000002 0x00591f 2
172.16.41.4     172.16.41.4     348         0x80000002 0x005037 2
 
                Summary Net Link States (Area 10)
Link ID         ADV Router      Age         Seq#       Checksum
172.16.61.0     172.16.61.1     318         0x80000001 0x00ba9f
172.16.12.0     172.16.61.1     318         0x80000002 0x004257
0.0.0.0         172.16.61.1     318         0x80000003 0x004a17
172.16.23.0     172.16.61.1     303         0x80000004 0x00621a
172.16.22.2     172.16.61.1     303         0x80000005 0x00c3c5
 
                Router Link States (Area 30)
 
Link ID         ADV Router      Age         Seq#       Checksum Link count
172.16.61.1     172.16.61.1     352         0x80000002 0x00cc6d 2
172.16.61.6     172.16.61.6     352         0x80000002 0x008da3 2
 
                Summary Net Link States (Area 30)
Link ID         ADV Router      Age         Seq#       Checksum
0.0.0.0         172.16.61.1     318         0x80000001 0x004e15
注:在骨干区域的ABR路由器可以看出其数据库中包括了所有的路由条目
 
r2#show ip ospf database
            OSPF Router with ID (172.16.22.2) (Process ID 8)
 
                Router Link States (Area 0)
 
Link ID         ADV Router      Age         Seq#       Checksum Link count
172.16.22.2     172.16.22.2     488         0x80000003 0x00bf52 1
172.16.61.1     172.16.61.1     488         0x80000003 0x00facd 1
 
                Net Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum
172.16.12.1     172.16.61.1     488         0x80000001 0x007156
 
                Summary Net Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum
172.16.41.0     172.16.61.1     483         0x80000001 0x0097d6
172.16.61.0     172.16.61.1     483         0x80000002 0x00b8a0
172.16.23.0     172.16.22.2     478         0x80000003 0x00663e
172.16.22.2     172.16.22.2     473         0x8000000d 0x00b5f2
 
                Summary ASB Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum
172.16.35.3     172.16.22.2     473         0x8000000c 0x00a3e7
 
                Router Link States (Area 20)
 
Link ID         ADV Router      Age         Seq#       Checksum Link count
172.16.22.2     172.16.22.2     520         0x80000002 0x007775 2
172.16.35.3     172.16.35.3     520         0x80000003 0x0006d7 2
 
                Summary Net Link States (Area 20)
Link ID         ADV Router      Age         Seq#       Checksum
172.16.12.0     172.16.22.2     478         0x80000001 0x005070
172.16.41.0     172.16.22.2     478         0x80000002 0x00abe6
172.16.61.0     172.16.22.2     478         0x80000003 0x00ccb0
172.16.22.2     172.16.22.2     478         0x80000004 0x00c7e9
 
                Type-7 AS External Link States (Area 20)
Link ID         ADV Router      Age         Seq#       Checksum Tag
172.16.35.0     172.16.35.3     533         0x80000001 0x00b54f 0
 
                Router Link States (Area 40)
 
Link ID         ADV Router      Age         Seq#       Checksum Link count
172.16.22.2     172.16.22.2     534         0x80000001 0x004c88 1
 
                Summary Net Link States (Area 40)
Link ID         ADV Router      Age         Seq#       Checksum
172.16.23.0     172.16.22.2     478         0x80000003 0x00663e
172.16.12.0     172.16.22.2     478         0x80000005 0x004874
172.16.41.0     172.16.22.2     478         0x80000006 0x00a3ea
172.16.61.0     172.16.22.2     478         0x80000007 0x00c4b4
 
                Summary ASB Link States (Area 40)
Link ID         ADV Router      Age         Seq#       Checksum
172.16.22.2     172.16.22.2     478         0x80000001 0x00b5fe
172.16.35.3     172.16.22.2     473         0x8000000b 0x00a5e6
 
                Type-5 AS External Link States
Link ID         ADV Router      Age         Seq#       Checksum Tag
0.0.0.0         172.16.35.3     533         0x80000001 0x00826d 1
172.16.35.0     172.16.22.2     520         0x80000001 0x00db42 1
注:R2是一个ABR路由器,与其相连接的两个区域分别是骨干区域和NSSA区域,所以数据库中学习到了所有的路由信息。
r3#show ip ospf database
            OSPF Router with ID (172.16.35.3) (Process ID 8)
 
                Router Link States (Area 20)
 
Link ID         ADV Router      Age         Seq#       Checksum Link count
172.16.35.3     172.16.35.3     615         0x80000003 0x0006d7 2
172.16.22.2     172.16.22.2     615         0x80000002 0x007775 2
 
                Summary Net Link States (Area 20)
Link ID         ADV Router      Age         Seq#       Checksum
172.16.12.0     172.16.22.2     572         0x80000001 0x005070
172.16.41.0     172.16.22.2     572         0x80000002 0x00abe6
172.16.61.0     172.16.22.2     572         0x80000003 0x00ccb0
172.16.22.2     172.16.22.2     572         0x80000004 0x00c7e9
 
                Type-7 AS External Link States (Area 20)
Link ID         ADV Router      Age         Seq#       Checksum Tag
172.16.35.0     172.16.35.3     628         0x80000001 0x00b54f 0
 
                Type-5 AS External Link States
Link ID         ADV Router      Age         Seq#       Checksum Tag
0.0.0.0         172.16.35.3     628         0x80000001 0x00826d 1
r4#show ip ospf database
            OSPF Router with ID (172.16.41.4) (Process ID 8)
 
                Router Link States (Area 10)
 
Link ID         ADV Router      Age         Seq#       Checksum Link count
172.16.41.4     172.16.41.4     654         0x80000002 0x005037 2
172.16.61.1     172.16.61.1     654         0x80000002 0x00591f 2
 
                Summary Net Link States (Area 10)
Link ID         ADV Router      Age         Seq#       Checksum
172.16.61.0     172.16.61.1     624         0x80000001 0x00ba9f
172.16.12.0     172.16.61.1     624         0x80000002 0x004257
0.0.0.0         172.16.61.1     624         0x80000003 0x004a17
172.16.23.0     172.16.61.1     610         0x80000004 0x00621a
172.16.22.2     172.16.61.1     610         0x80000005 0x00c3c5
注:因为在R4stub区域内所以会学习到区域内和区域间的路由信息。
r6#show ip ospf database
            OSPF Router with ID (172.16.61.6) (Process ID 8)
 
                Router Link States (Area 30)
 
Link ID         ADV Router      Age         Seq#       Checksum Link count
172.16.61.6     172.16.61.6     746         0x80000002 0x008da3 2
172.16.61.1     172.16.61.1     746         0x80000002 0x00cc6d 2
 
                Summary Net Link States (Area 30)
Link ID         ADV Router      Age         Seq#       Checksum
0.0.0.0         172.16.61.1     712         0x80000001 0x004e15
注:因为在Totally stub 区域内只有本区域内的路由数据信息