苏志辉技术博客

  IT博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  11 随笔 :: 5 文章 :: 1 评论 :: 0 Trackbacks

==============================
 ★ Link id表示那里的链路状态情况;ADV router表示LSA是谁公告的;
 ★ 可通过“ip ospf database”查看链路状态数据库。
==============================================
1.Router LSA:
   每一个路由器都会产生,通告自己路由器所有接口的状态;在域内泛洪。Link id(为router id)一般等于ADV router,即产生并公告。
----------------------------------------------
2.Network LSA:
   由网络中的DR产生(DR为为路由器的接口特性),通告本域内每个DR下所属的DRother的router id(包括DR自己的),由DR公告,Link id为DR路由器接口ip地址(即通告所有DR接口下的DRother的router id);在域内泛洪。
  注意:一个区域可由多个DR,一个网段一个DR(路由器分隔网段)
----------------------------------------------
3.Network Summary LSA:
   由本域内同时为area 0的ABR路由器始发,学习其它区域的LSA,只通告到已知网段的最优路径(是本域内路由器到ABR的最优路径,到最终目的地的总的路径其不管,所以当有多个ABR时,容易引起次优路径的问题,用设置cost值可解决,域内路由器收到后直接加入路由表RIP  的方法)link id为某一网段(表示某一网段的状态);AS中泛洪。   
----------------------------------------------
4.ASBR Summary LSA:
   本域内由ABR始发,公告(即到最后的ABR时被替换表示要去ASBR就找ABR),通告ASBR的router id主机路由,ASBR的router id为link id。, AS中泛洪。有几个ASBR就有几个4类。
----------------------------------------------
5.External LSA:
   ASBR公告,以link id为外面AS域的子网号,通告ASBR外面的子网,由ASBR公告(要去外网找ASBR), AS内泛洪
----------------------------------------------
7.NSSA External LSA:
   同5,只是在区域为非纯末梢区域(not so stub by area)内公告并泛洪,到达ABR时变为5类通告给其它区域。     
----------------------------------------------
11.Tag LSA:标记路由
-------------------------------------------------------
实验拓扑如下:
                                      R1
                                      |f0/0
                                      |
                                      |
                     ---------------------------
                      |                             |
                      |(f0/0)                     |(f0/0)
                      R2                          R3
                      |(s1/2)                     |(s1/1)
                      |                             |
                      |(s1/2)                     |(s1/1)
                      R4                          R5
-------------------------------------------------------
具体配置如下:
R1#show run
interface Loopback0
 ip address 1.1.1.1 255.255.255.0
 ip ospf network point-to-point
!
interface FastEthernet0/0
 ip address 123.1.1.1 255.255.255.0
 duplex auto
 speed auto
!
router ospf 100
 router-id 1.1.1.1
 log-adjacency-changes
 network 1.1.1.1 0.0.0.0 area 0
 network 123.1.1.1 0.0.0.0 area 0
!
-------------------------
R2#show run
interface Loopback0
 ip address 2.2.2.2 255.255.255.0
!
interface FastEthernet0/0
 ip address 123.1.1.2 255.255.255.0
 duplex auto
 speed auto
!
interface Serial1/2
 ip address 24.1.1.2 255.255.255.0
 serial restart_delay 0
!
router ospf 200
 router-id 2.2.2.2
 log-adjacency-changes
 network 24.1.1.2 0.0.0.0 area 1
 network 123.1.1.2 0.0.0.0 area 0
!
-------------------------
R3#show run
interface Loopback0
 ip address 3.3.3.3 255.255.255.0
!
interface FastEthernet0/0
 ip address 123.1.1.3 255.255.255.0
 duplex auto
 speed auto
!
interface Serial1/1
 ip address 35.1.1.3 255.255.255.0
 serial restart_delay 0
!
router ospf 300
 router-id 3.3.3.3
 log-adjacency-changes
 area 2 nssa
 network 35.1.1.3 0.0.0.0 area 2
 network 123.1.1.3 0.0.0.0 area 0
!
-------------------------
R4#show run
interface Loopback0
 ip address 4.4.4.4 255.255.255.0
 ip ospf network point-to-point
!
interface Serial1/2
 ip address 24.1.1.4 255.255.255.0
 serial restart_delay 0
!
router ospf 400
 router-id 4.4.4.4
 log-adjacency-changes
 network 4.4.4.4 0.0.0.0 area 1
 network 24.1.1.4 0.0.0.0 area 1
!
-------------------------
R5#show run
interface Loopback0
 ip address 5.5.5.5 255.255.255.0
 ip ospf network point-to-point
!
interface Loopback1
 ip address 55.55.55.55 255.255.255.0
 ip ospf network point-to-point
!
interface Serial1/1
 ip address 35.1.1.5 255.255.255.0
 serial restart_delay 0
!
router ospf 500
 router-id 5.5.5.5
 log-adjacency-changes
 area 2 nssa default-information-originate
 redistribute static
 network 5.5.5.5 0.0.0.0 area 2
 network 35.1.1.5 0.0.0.0 area 2
!
ip route 0.0.0.0 0.0.0.0 Loopback1
-------------------------------------------------------
查看LSA数据库
R1#show ip ospf database

            OSPF Router with ID (1.1.1.1) (Process ID 100)

                Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count
1.1.1.1         1.1.1.1         11          0x80000002 0x006CAA 2
2.2.2.2         2.2.2.2         11          0x80000002 0x0067B9 1
3.3.3.3         3.3.3.3         12          0x80000002 0x002FE6 1

                Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
123.1.1.3       3.3.3.3         12          0x80000001 0x00EFA1

                Summary Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
4.4.4.0         2.2.2.2         26          0x80000001 0x00499E
5.5.5.0         3.3.3.3         17          0x80000001 0x0007D9
24.1.1.0        2.2.2.2         61          0x80000001 0x007F5B
35.1.1.0        3.3.3.3         48          0x80000001 0x00D1F9

                Type-5 AS External Link States

Link ID         ADV Router      Age         Seq#       Checksum Tag
0.0.0.0         3.3.3.3         16          0x80000001 0x00C9C9 0
------------------
R2#show ip ospf database

            OSPF Router with ID (2.2.2.2) (Process ID 200)

                Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count
1.1.1.1         1.1.1.1         40          0x80000002 0x006CAA 2
2.2.2.2         2.2.2.2         40          0x80000002 0x0067B9 1
3.3.3.3         3.3.3.3         40          0x80000002 0x002FE6 1

                Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
123.1.1.3       3.3.3.3         41          0x80000001 0x00EFA1

                Summary Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
4.4.4.0         2.2.2.2         53          0x80000001 0x00499E
5.5.5.0         3.3.3.3         45          0x80000001 0x0007D9
24.1.1.0        2.2.2.2         88          0x80000001 0x007F5B
35.1.1.0        3.3.3.3         76          0x80000001 0x00D1F9

                Router Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum Link count
2.2.2.2         2.2.2.2         68          0x80000003 0x0066E4 2
4.4.4.4         4.4.4.4         68          0x80000002 0x00E342 3

                Summary Net Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum
1.1.1.0         2.2.2.2         25          0x80000001 0x003DF2
5.5.5.0         2.2.2.2         25          0x80000001 0x002FB4
35.1.1.0        2.2.2.2         25          0x80000001 0x00F9D4
123.1.1.0       2.2.2.2         30          0x80000003 0x00F6BD

                Summary ASB Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum
3.3.3.3         2.2.2.2         25          0x80000001 0x00BE68

                Type-5 AS External Link States

Link ID         ADV Router      Age         Seq#       Checksum Tag
0.0.0.0         3.3.3.3         45          0x80000001 0x00C9C9 0
R2#
------------------
R3#show ip ospf database

            OSPF Router with ID (3.3.3.3) (Process ID 300)

                Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count
1.1.1.1         1.1.1.1         50          0x80000002 0x006CAA 2
2.2.2.2         2.2.2.2         50          0x80000002 0x0067B9 1
3.3.3.3         3.3.3.3         50          0x80000002 0x002FE6 1

                Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
123.1.1.3       3.3.3.3         50          0x80000001 0x00EFA1

                Summary Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
4.4.4.0         2.2.2.2         63          0x80000001 0x00499E
5.5.5.0         3.3.3.3         55          0x80000001 0x0007D9
24.1.1.0        2.2.2.2         98          0x80000001 0x007F5B
35.1.1.0        3.3.3.3         85          0x80000001 0x00D1F9

                Router Link States (Area 2)

Link ID         ADV Router      Age         Seq#       Checksum Link count
3.3.3.3         3.3.3.3         69          0x80000002 0x0043DD 2
5.5.5.5         5.5.5.5         70          0x80000002 0x001FD8 3

                Summary Net Link States (Area 2)

Link ID         ADV Router      Age         Seq#       Checksum
1.1.1.0         3.3.3.3         35          0x80000001 0x00C461
4.4.4.0         3.3.3.3         35          0x80000001 0x00DA02
24.1.1.0        3.3.3.3         35          0x80000001 0x0011BE
123.1.1.0       3.3.3.3         39          0x80000003 0x007E2C

                Type-7 AS External Link States (Area 2)

Link ID         ADV Router      Age         Seq#       Checksum Tag
0.0.0.0         5.5.5.5         71          0x80000002 0x00F689 0

                Type-5 AS External Link States

Link ID         ADV Router      Age         Seq#       Checksum Tag
0.0.0.0         3.3.3.3         54          0x80000001 0x00C9C9 0
R3#
------------------
R4#show ip ospf database

            OSPF Router with ID (4.4.4.4) (Process ID 400)

                Router Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum Link count
2.2.2.2         2.2.2.2         86          0x80000003 0x0066E4 2
4.4.4.4         4.4.4.4         85          0x80000002 0x00E342 3

                Summary Net Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum
1.1.1.0         2.2.2.2         43          0x80000001 0x003DF2
5.5.5.0         2.2.2.2         43          0x80000001 0x002FB4
35.1.1.0        2.2.2.2         43          0x80000001 0x00F9D4
123.1.1.0       2.2.2.2         47          0x80000003 0x00F6BD

                Summary ASB Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum
3.3.3.3         2.2.2.2         43          0x80000001 0x00BE68

                Type-5 AS External Link States
         
Link ID         ADV Router      Age         Seq#       Checksum Tag
0.0.0.0         3.3.3.3         62          0x80000001 0x00C9C9 0
R4#
------------------
R5#show ip ospf database

            OSPF Router with ID (5.5.5.5) (Process ID 500)

                Router Link States (Area 2)

Link ID         ADV Router      Age         Seq#       Checksum Link count
3.3.3.3         3.3.3.3         84          0x80000002 0x0043DD 2
5.5.5.5         5.5.5.5         84          0x80000002 0x001FD8 3

                Summary Net Link States (Area 2)

Link ID         ADV Router      Age         Seq#       Checksum
1.1.1.0         3.3.3.3         50          0x80000001 0x00C461
4.4.4.0         3.3.3.3         50          0x80000001 0x00DA02
24.1.1.0        3.3.3.3         50          0x80000001 0x0011BE
123.1.1.0       3.3.3.3         54          0x80000003 0x007E2C

                Type-7 AS External Link States (Area 2)

Link ID         ADV Router      Age         Seq#       Checksum Tag
0.0.0.0         5.5.5.5         85          0x80000002 0x00F689 0
R5#
-------------------------------------------------------
查看路由信息
------------------
R1# show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is 123.1.1.3 to network 0.0.0.0

     1.0.0.0/24 is subnetted, 1 subnets
C       1.1.1.0 is directly connected, Loopback0
     35.0.0.0/24 is subnetted, 1 subnets
O IA    35.1.1.0 [110/65] via 123.1.1.3, 00:04:51, FastEthernet0/0
     4.0.0.0/24 is subnetted, 1 subnets
O IA    4.4.4.0 [110/66] via 123.1.1.2, 00:04:51, FastEthernet0/0
     5.0.0.0/24 is subnetted, 1 subnets
O IA    5.5.5.0 [110/66] via 123.1.1.3, 00:04:51, FastEthernet0/0
     24.0.0.0/24 is subnetted, 1 subnets
O IA    24.1.1.0 [110/65] via 123.1.1.2, 00:04:51, FastEthernet0/0
     123.0.0.0/24 is subnetted, 1 subnets
C       123.1.1.0 is directly connected, FastEthernet0/0
O*E2 0.0.0.0/0 [110/1] via 123.1.1.3, 00:04:51, FastEthernet0/0
R1#
------------------
R2#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is 123.1.1.3 to network 0.0.0.0

     1.0.0.0/24 is subnetted, 1 subnets
O       1.1.1.0 [110/2] via 123.1.1.1, 00:04:57, FastEthernet0/0
     35.0.0.0/24 is subnetted, 1 subnets
O IA    35.1.1.0 [110/65] via 123.1.1.3, 00:04:57, FastEthernet0/0
     2.0.0.0/24 is subnetted, 1 subnets
C       2.2.2.0 is directly connected, Loopback0
     4.0.0.0/24 is subnetted, 1 subnets
O       4.4.4.0 [110/65] via 24.1.1.4, 00:05:25, Serial1/2
     5.0.0.0/24 is subnetted, 1 subnets
O IA    5.5.5.0 [110/66] via 123.1.1.3, 00:04:57, FastEthernet0/0
     24.0.0.0/24 is subnetted, 1 subnets
C       24.1.1.0 is directly connected, Serial1/2
     123.0.0.0/24 is subnetted, 1 subnets
C       123.1.1.0 is directly connected, FastEthernet0/0
O*E2 0.0.0.0/0 [110/1] via 123.1.1.3, 00:05:00, FastEthernet0/0
R2#
------------------
R3#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is 35.1.1.5 to network 0.0.0.0

     1.0.0.0/24 is subnetted, 1 subnets
O       1.1.1.0 [110/2] via 123.1.1.1, 00:05:04, FastEthernet0/0
     35.0.0.0/24 is subnetted, 1 subnets
C       35.1.1.0 is directly connected, Serial1/1
     3.0.0.0/24 is subnetted, 1 subnets
C       3.3.3.0 is directly connected, Loopback0
     4.0.0.0/24 is subnetted, 1 subnets
O IA    4.4.4.0 [110/66] via 123.1.1.2, 00:05:04, FastEthernet0/0
     5.0.0.0/24 is subnetted, 1 subnets
O       5.5.5.0 [110/65] via 35.1.1.5, 00:05:24, Serial1/1
     24.0.0.0/24 is subnetted, 1 subnets
O IA    24.1.1.0 [110/65] via 123.1.1.2, 00:05:04, FastEthernet0/0
     123.0.0.0/24 is subnetted, 1 subnets
C       123.1.1.0 is directly connected, FastEthernet0/0
O*N2 0.0.0.0/0 [110/1] via 35.1.1.5, 00:05:05, Serial1/1
R3#
------------------
R4# show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is 24.1.1.2 to network 0.0.0.0

     1.0.0.0/24 is subnetted, 1 subnets
O IA    1.1.1.0 [110/66] via 24.1.1.2, 00:05:09, Serial1/2
     35.0.0.0/24 is subnetted, 1 subnets
O IA    35.1.1.0 [110/129] via 24.1.1.2, 00:05:09, Serial1/2
     4.0.0.0/24 is subnetted, 1 subnets
C       4.4.4.0 is directly connected, Loopback0
     5.0.0.0/24 is subnetted, 1 subnets
O IA    5.5.5.0 [110/130] via 24.1.1.2, 00:05:09, Serial1/2
     24.0.0.0/24 is subnetted, 1 subnets
C       24.1.1.0 is directly connected, Serial1/2
     123.0.0.0/24 is subnetted, 1 subnets
O IA    123.1.1.0 [110/65] via 24.1.1.2, 00:05:13, Serial1/2
O*E2 0.0.0.0/0 [110/1] via 24.1.1.2, 00:05:04, Serial1/2
R4#
------------------
R5#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is 0.0.0.0 to network 0.0.0.0

     1.0.0.0/24 is subnetted, 1 subnets
O IA    1.1.1.0 [110/66] via 35.1.1.3, 00:05:12, Serial1/1
     35.0.0.0/24 is subnetted, 1 subnets
C       35.1.1.0 is directly connected, Serial1/1
     4.0.0.0/24 is subnetted, 1 subnets
O IA    4.4.4.0 [110/130] via 35.1.1.3, 00:05:12, Serial1/1
     55.0.0.0/24 is subnetted, 1 subnets
C       55.55.55.0 is directly connected, Loopback1
     5.0.0.0/24 is subnetted, 1 subnets
C       5.5.5.0 is directly connected, Loopback0
     24.0.0.0/24 is subnetted, 1 subnets
O IA    24.1.1.0 [110/129] via 35.1.1.3, 00:05:12, Serial1/1
     123.0.0.0/24 is subnetted, 1 subnets
O IA    123.1.1.0 [110/65] via 35.1.1.3, 00:05:17, Serial1/1
S*   0.0.0.0/0 is directly connected, Loopback1
R5#
-------------------------------------------------------

posted on 2009-05-11 16:04 苏志辉 阅读(1410) 评论(0)  编辑 收藏 引用 所属分类: CCNP
只有注册用户登录后才能发表评论。