OSPF五种常见LSA

2018年6月23日11:43:06 发表评论 172 views
##OSPF 的序列号取值范围:
0x80000001 Min
0x7FFFFFFF Max
##OSPF定义了两种确认机制:
显示确认,使用专有的报文进行确认
隐式确认,(基于序列号的确认机制)收到一份报文,然后向发送者回复一份序列号相同的报文。 仅有ospf支持这种确认机制。dbd报文
##OSPF建议:
     1、一台ABR最多关联3个区域
     2、单个区域内最多包含50台路由器
     3、一台路由邻居最多不超过60个
OSPF LSAs
     1、Router LSA
     2、Network LSA
     3、Summary LSA
     4、Summary ASB LSA
     5、External LSA
##Router LSA
     1、仅在本区域内传播不能穿越ABR
     2、每台属于一个区域的路由器都会基于该区域通告一条1类LSA
     3、一个区域内只发一个一类LSA,包含纯拓扑信息,包含所有宣告进此区域的直连链路、前缀、掩码、网络类型及度量值
     Link-ID:通告该LSA的路由器的RID
     ADV Router:通告该LSA的路由器的RID
R1#sh ip os database
            OSPF Router with ID (91.1.1.1) (Process ID 110)
                Router Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum Link count
91.1.1.1        91.1.1.1        17          0x80000003 0x0058F8 3
92.2.2.2        92.2.2.2        18          0x80000002 0x00F751 3
R1#
R1# sh ip os da router
            OSPF Router with ID (91.1.1.1) (Process ID 110)
                Router Link States (Area 0)
  LS age: 109
  Options: (No TOS-capability, DC)
  LS Type: Router Links
  Link State ID: 91.1.1.1
  Advertising Router: 91.1.1.1
  LS Seq Number: 80000003
  Checksum: 0x58F8
  Length: 60
  Number of Links: 3
    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 1.1.1.1
     (Link Data) Network Mask: 255.255.255.255
      Number of TOS metrics: 0
       TOS 0 Metrics: 1
    Link connected to: another Router (point-to-point)
     (Link ID) Neighboring Router ID: 92.2.2.2
     (Link Data) Router Interface address: 12.1.1.1
      Number of TOS metrics: 0
       TOS 0 Metrics: 64
    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 12.1.1.0
     (Link Data) Network Mask: 255.255.255.0
      Number of TOS metrics: 0
       TOS 0 Metrics: 64
  LS age: 111
  Options: (No TOS-capability, DC)
  LS Type: Router Links
  Link State ID: 92.2.2.2
  Advertising Router: 92.2.2.2
  LS Seq Number: 80000002
  Checksum: 0xF751
  Length: 60
  Number of Links: 3
    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 2.2.2.2
     (Link Data) Network Mask: 255.255.255.255
      Number of TOS metrics: 0
       TOS 0 Metrics: 1
    Link connected to: another Router (point-to-point)
     (Link ID) Neighboring Router ID: 91.1.1.1
     (Link Data) Router Interface address: 12.1.1.2
      Number of TOS metrics: 0
       TOS 0 Metrics: 64
    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 12.1.1.0
     (Link Data) Network Mask: 255.255.255.0
      Number of TOS metrics: 0
       TOS 0 Metrics: 64
R1#
##Network LSA
     1、同区域内传播
     2、通告者:MA网段中的DR
     3、纯拓扑信息,包含了该MA网段直连的所有路由器的RID信息,该MA网段的掩码
Link-ID 该网段DR接口的IP地址
ADV Router :该DR的RID
R1#sh ip os da
            OSPF Router with ID (91.1.1.1) (Process ID 110)
                Router Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum Link count
91.1.1.1        91.1.1.1        461         0x80000005 0x001F47 4
92.2.2.2        92.2.2.2        462         0x80000004 0x00B4A8 4
                Net Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum
100.1.1.2       92.2.2.2        462         0x80000001 0x00C2EB
R1#
R1#sh  ip os da router
            OSPF Router with ID (91.1.1.1) (Process ID 110)
                Router Link States (Area 0)
  LS age: 470
  Options: (No TOS-capability, DC)
  LS Type: Router Links
  Link State ID: 91.1.1.1
  Advertising Router: 91.1.1.1
  LS Seq Number: 80000005
  Checksum: 0x1F47
  Length: 72
  Number of Links: 4
    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 1.1.1.1
     (Link Data) Network Mask: 255.255.255.255
      Number of TOS metrics: 0
       TOS 0 Metrics: 1
    Link connected to: a Transit Network
     (Link ID) Designated Router address: 100.1.1.2
     (Link Data) Router Interface address: 100.1.1.1
      Number of TOS metrics: 0
       TOS 0 Metrics: 10
    Link connected to: another Router (point-to-point)
     (Link ID) Neighboring Router ID: 92.2.2.2
     (Link Data) Router Interface address: 12.1.1.1
      Number of TOS metrics: 0
       TOS 0 Metrics: 64
    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 12.1.1.0
     (Link Data) Network Mask: 255.255.255.0
      Number of TOS metrics: 0
       TOS 0 Metrics: 64
  LS age: 471
  Options: (No TOS-capability, DC)
  LS Type: Router Links
  Link State ID: 92.2.2.2
  Advertising Router: 92.2.2.2
  LS Seq Number: 80000004
  Checksum: 0xB4A8
  Length: 72
  Number of Links: 4
    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 2.2.2.2
     (Link Data) Network Mask: 255.255.255.255
      Number of TOS metrics: 0
       TOS 0 Metrics: 1
    Link connected to: a Transit Network
     (Link ID) Designated Router address: 100.1.1.2
     (Link Data) Router Interface address: 100.1.1.2
      Number of TOS metrics: 0
       TOS 0 Metrics: 10
    Link connected to: another Router (point-to-point)
     (Link ID) Neighboring Router ID: 91.1.1.1
     (Link Data) Router Interface address: 12.1.1.2
      Number of TOS metrics: 0
       TOS 0 Metrics: 64
    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 12.1.1.0
     (Link Data) Network Mask: 255.255.255.0
      Number of TOS metrics: 0
       TOS 0 Metrics: 64
R1#
R1#sh ip os da network
            OSPF Router with ID (91.1.1.1) (Process ID 110)
                Net Link States (Area 0)
  Routing Bit Set on this LSA
  LS age: 482
  Options: (No TOS-capability, DC)
  LS Type: Network Links
  Link State ID: 100.1.1.2 (address of Designated Router)
  Advertising Router: 92.2.2.2
  LS Seq Number: 80000001
  Checksum: 0xC2EB
  Length: 32
  Network Mask: /24
        Attached Router: 92.2.2.2
        Attached Router: 91.1.1.1
R1#
##Summary LSA (Summary Network LSA)
     1、传播范围: 除了该区域外的整个OSPF路由选择域
     2、通告者:ABR
     3、包含内容:一条3类LSA包含一条OSPF域间路由,
O IA
     Link-ID :3类LSA路由的前缀
     ADV Router : ABR的RID 。 3类LSA在OSPF路由选择域内传递的时候,为了保证可达性,每跨越一个ABR都会自动改写为该ABR的RID

R3#sh ip os database
            OSPF Router with ID (93.3.3.3) (Process ID 110)
                Router Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum Link count
91.1.1.1        91.1.1.1        936         0x80000002 0x00ED72 2
93.3.3.3        93.3.3.3        935         0x80000002 0x001E1C 3
                Summary Net Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum
1.1.1.1         91.1.1.1        1048        0x80000001 0x001ABF
2.2.2.2         91.1.1.1        1048        0x80000001 0x00507B
4.4.4.4         91.1.1.1        236         0x80000001 0x00760D
12.1.1.0        91.1.1.1        1048        0x80000001 0x000D83
24.1.1.0        91.1.1.1        298         0x80000001 0x00D4A5
100.1.1.0       91.1.1.1        1048        0x80000001 0x0072FB
R3#
R3#sh ip os da sum
            OSPF Router with ID (93.3.3.3) (Process ID 110)
                Summary Net Link States (Area 1)
  Routing Bit Set on this LSA
  LS age: 1075
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 1.1.1.1 (summary Network Number)
  Advertising Router: 91.1.1.1
  LS Seq Number: 80000001
  Checksum: 0x1ABF
  Length: 28
  Network Mask: /32
        TOS: 0  Metric: 1
  Routing Bit Set on this LSA
  LS age: 1075
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 2.2.2.2 (summary Network Number)
  Advertising Router: 91.1.1.1
  LS Seq Number: 80000001
  Checksum: 0x507B
  Length: 28
  Network Mask: /32
        TOS: 0  Metric: 11
  Routing Bit Set on this LSA
  LS age: 264
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 4.4.4.4 (summary Network Number)
  Advertising Router: 91.1.1.1
  LS Seq Number: 80000001
  Checksum: 0x760D
  Length: 28
  Network Mask: /32
        TOS: 0  Metric: 75
  Routing Bit Set on this LSA
  LS age: 1076
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 12.1.1.0 (summary Network Number)
  Advertising Router: 91.1.1.1
  LS Seq Number: 80000001
  Checksum: 0xD83
  Length: 28
  Network Mask: /24
        TOS: 0  Metric: 64
  Routing Bit Set on this LSA
  LS age: 326
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 24.1.1.0 (summary Network Number)
  Advertising Router: 91.1.1.1
  LS Seq Number: 80000001
  Checksum: 0xD4A5
  Length: 28
  Network Mask: /24
        TOS: 0  Metric: 74
  Routing Bit Set on this LSA
  LS age: 1076
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 100.1.1.0 (summary Network Number)
  Advertising Router: 91.1.1.1
  LS Seq Number: 80000001
  Checksum: 0x72FB
  Length: 28
  Network Mask: /24
        TOS: 0  Metric: 10
R3#
======
R1#sh ip os da ta
            OSPF Router with ID (91.1.1.1) (Process ID 110)
                Router Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum Link count
91.1.1.1        91.1.1.1        1126        0x80000008 0x001C46 4
92.2.2.2        92.2.2.2        381         0x80000008 0x00AFA8 4
                Net Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum
100.1.1.2       92.2.2.2        459         0x80000002 0x00C0EC
                Summary Net Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum
3.3.3.3         91.1.1.1        1008        0x80000001 0x004051
4.4.4.4         92.2.2.2        315         0x80000001 0x00F395
13.1.1.0        91.1.1.1        1121        0x80000001 0x00FF8F
24.1.1.0        92.2.2.2        377         0x80000001 0x00522E
                Router Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum Link count
91.1.1.1        91.1.1.1        1013        0x80000002 0x00ED72 2
93.3.3.3        93.3.3.3        1016        0x80000002 0x001E1C 3
                Summary Net Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum
1.1.1.1         91.1.1.1        1128        0x80000001 0x001ABF
2.2.2.2         91.1.1.1        1128        0x80000001 0x00507B
4.4.4.4         91.1.1.1        315         0x80000001 0x00760D
12.1.1.0        91.1.1.1        1128        0x80000001 0x000D83
24.1.1.0        91.1.1.1        377         0x80000001 0x00D4A5
100.1.1.0       91.1.1.1        1128        0x80000001 0x0072FB
R1#
R1#sh  ip os da sum mary
            OSPF Router with ID (91.1.1.1) (Process ID 110)
                Summary Net Link States (Area 0)
  LS age: 1020
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 3.3.3.3 (summary Network Number)
  Advertising Router: 91.1.1.1
  LS Seq Number: 80000001
  Checksum: 0x4051
  Length: 28
  Network Mask: /32
        TOS: 0  Metric: 65
  Routing Bit Set on this LSA
  LS age: 326
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 4.4.4.4 (summary Network Number)
  Advertising Router: 92.2.2.2
  LS Seq Number: 80000001
  Checksum: 0xF395
  Length: 28
  Network Mask: /32
        TOS: 0  Metric: 65
  LS age: 1134
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 13.1.1.0 (summary Network Number)
  Advertising Router: 91.1.1.1
  LS Seq Number: 80000001
  Checksum: 0xFF8F
  Length: 28
  Network Mask: /24
        TOS: 0  Metric: 64
  Routing Bit Set on this LSA
  LS age: 390
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 24.1.1.0 (summary Network Number)
  Advertising Router: 92.2.2.2
  LS Seq Number: 80000001
  Checksum: 0x522E
  Length: 28
  Network Mask: /24
        TOS: 0  Metric: 64
                Summary Net Link States (Area 1)
  LS age: 1140
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 1.1.1.1 (summary Network Number)
  Advertising Router: 91.1.1.1
  LS Seq Number: 80000001
  Checksum: 0x1ABF
  Length: 28
  Network Mask: /32
        TOS: 0  Metric: 1
  LS age: 1140
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 2.2.2.2 (summary Network Number)
  Advertising Router: 91.1.1.1
  LS Seq Number: 80000001
  Checksum: 0x507B
  Length: 28
  Network Mask: /32
        TOS: 0  Metric: 11
  LS age: 328
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 4.4.4.4 (summary Network Number)
  Advertising Router: 91.1.1.1
  LS Seq Number: 80000001
  Checksum: 0x760D
  Length: 28
  Network Mask: /32
        TOS: 0  Metric: 75
  LS age: 1141
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 12.1.1.0 (summary Network Number)
  Advertising Router: 91.1.1.1
  LS Seq Number: 80000001
  Checksum: 0xD83
  Length: 28
  Network Mask: /24
        TOS: 0  Metric: 64
  LS age: 390
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 24.1.1.0 (summary Network Number)
  Advertising Router: 91.1.1.1
  LS Seq Number: 80000001
  Checksum: 0xD4A5
  Length: 28
  Network Mask: /24
        TOS: 0  Metric: 74
  LS age: 1142
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 100.1.1.0 (summary Network Number)
  Advertising Router: 91.1.1.1
  LS Seq Number: 80000001
  Checksum: 0x72FB
  Length: 28
  Network Mask: /24
        TOS: 0  Metric: 10
R1#
==============
R4#sh ip os da
            OSPF Router with ID (94.4.4.4) (Process ID 110)
                Router Link States (Area 2)
Link ID         ADV Router      Age         Seq#       Checksum Link count
92.2.2.2        92.2.2.2        391         0x80000004 0x001922 2
94.4.4.4        94.4.4.4        390         0x80000002 0x00B45E 3
                Summary Net Link States (Area 2)
Link ID         ADV Router      Age         Seq#       Checksum
1.1.1.1         92.2.2.2        453         0x80000002 0x005E6C
2.2.2.2         92.2.2.2        453         0x80000002 0x00CB05
3.3.3.3         92.2.2.2        453         0x80000002 0x0084FD
12.1.1.0        92.2.2.2        453         0x80000002 0x00EC9E
13.1.1.0        92.2.2.2        453         0x80000002 0x00443C
100.1.1.0       92.2.2.2        453         0x80000002 0x005217
R4#
R4#sh ip os da summary
            OSPF Router with ID (94.4.4.4) (Process ID 110)
                Summary Net Link States (Area 2)
  Routing Bit Set on this LSA
  LS age: 463
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 1.1.1.1 (summary Network Number)
  Advertising Router: 92.2.2.2
  LS Seq Number: 80000002
  Checksum: 0x5E6C
  Length: 28
  Network Mask: /32
        TOS: 0  Metric: 11
  Routing Bit Set on this LSA
  LS age: 463
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 2.2.2.2 (summary Network Number)
  Advertising Router: 92.2.2.2
  LS Seq Number: 80000002
  Checksum: 0xCB05
  Length: 28
  Network Mask: /32
        TOS: 0  Metric: 1
  Routing Bit Set on this LSA
  LS age: 464
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 3.3.3.3 (summary Network Number)
  Advertising Router: 92.2.2.2
  LS Seq Number: 80000002
  Checksum: 0x84FD
  Length: 28
  Network Mask: /32
        TOS: 0  Metric: 75
  Routing Bit Set on this LSA
  LS age: 464
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 12.1.1.0 (summary Network Number)
  Advertising Router: 92.2.2.2
  LS Seq Number: 80000002
  Checksum: 0xEC9E
  Length: 28
  Network Mask: /24
        TOS: 0  Metric: 64
  Routing Bit Set on this LSA
  LS age: 464
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 13.1.1.0 (summary Network Number)
  Advertising Router: 92.2.2.2
  LS Seq Number: 80000002
  Checksum: 0x443C
  Length: 28
  Network Mask: /24
        TOS: 0  Metric: 74
  Routing Bit Set on this LSA
  LS age: 464
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 100.1.1.0 (summary Network Number)
  Advertising Router: 92.2.2.2
  LS Seq Number: 80000002
  Checksum: 0x5217
  Length: 28
  Network Mask: /24
        TOS: 0  Metric: 10
R4#
##Summary ASB LSA
     1、传递范围:除了ASBR所在区域之外的整个路由选择域
     2、通告者:和ASBR在同一个区域的ABR路由器
     3、包含内容: 纯拓扑信息,表述了ASBR所在位置
     Link-ID:ASBR的RID
     ADV Router :通告者ABR的RID,并且该值每跨越一个ABR都会自动改变,同3类LSA
##External LSA
     1、传递范围: 整个OSPF路由选择域
     2、通告者: ASBR
     3、包含内容: 纯路由信息,一条OSPF域外路由对应一条5类LSA
     Link-ID 域外路由的路由前缀
     ADV Router ASBR的RID ,
该LSA在OSPF域内传递时,ADV Router 不会发生任何改变。

R4#sh ip os database
            OSPF Router with ID (94.4.4.4) (Process ID 110)
                Router Link States (Area 2)
Link ID         ADV Router      Age         Seq#       Checksum Link count
92.2.2.2        92.2.2.2        1133        0x80000011 0x00FE2F 2
94.4.4.4        94.4.4.4        1919        0x8000000F 0x00A063 3
                Summary Net Link States (Area 2)
Link ID         ADV Router      Age         Seq#       Checksum
1.1.1.1         92.2.2.2        1133        0x8000000F 0x004479
2.2.2.2         92.2.2.2        1133        0x8000000F 0x00B112
3.3.3.3         92.2.2.2        1133        0x8000000F 0x006A0B
12.1.1.0        92.2.2.2        1133        0x8000000F 0x00D2AB
13.1.1.0        92.2.2.2        1133        0x8000000F 0x002A49
100.1.1.0       92.2.2.2        1133        0x8000000F 0x003824
Type-5 AS External Link States
Link ID         ADV Router      Age         Seq#       Checksum Tag
5.5.5.0         94.4.4.4        1919        0x80000002 0x008B9A 0
45.1.1.0        94.4.4.4        1919        0x80000002 0x00DD28 0
R4#
R4#sh ip os da ex
            OSPF Router with ID (94.4.4.4) (Process ID 110)
                Type-5 AS External Link States
  LS age: 1994
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 5.5.5.0 (External Network Number )
  Advertising Router: 94.4.4.4
  LS Seq Number: 80000002
  Checksum: 0x8B9A
  Length: 36
  Network Mask: /24
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 20
        Forward Address: 0.0.0.0
        External Route Tag: 0
  LS age: 1994
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 45.1.1.0 (External Network Number )
  Advertising Router: 94.4.4.4
  LS Seq Number: 80000002
  Checksum: 0xDD28
  Length: 36
  Network Mask: /24
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 20
        Forward Address: 0.0.0.0
        External Route Tag: 0
R4#
R2#sh ip os da ta
            OSPF Router with ID (92.2.2.2) (Process ID 110)
                Router Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum Link count
91.1.1.1        91.1.1.1        130         0x80000016 0x00FF54 4
92.2.2.2        92.2.2.2        1299        0x80000015 0x0095B5 4
                Net Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum
100.1.1.2       92.2.2.2        1299        0x8000000F 0x00A6F9
                Summary Net Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum
3.3.3.3         91.1.1.1        1869        0x8000000E 0x00265E
4.4.4.4         92.2.2.2        1299        0x8000000E 0x00D9A2
13.1.1.0        91.1.1.1        130         0x8000000F 0x00E39D
24.1.1.0        92.2.2.2        1299        0x8000000E 0x00383B
Summary ASB Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum
94.4.4.4        92.2.2.2        55          0x80000003 0x0041EB
                Router Link States (Area 2)
Link ID         ADV Router      Age         Seq#       Checksum Link count
92.2.2.2        92.2.2.2        1300        0x80000011 0x00FE2F 2
94.4.4.4        94.4.4.4        56          0x80000010 0x009E64 3
                Summary Net Link States (Area 2)
Link ID         ADV Router      Age         Seq#       Checksum
1.1.1.1         92.2.2.2        1300        0x8000000F 0x004479
2.2.2.2         92.2.2.2        1301        0x8000000F 0x00B112
3.3.3.3         92.2.2.2        1301        0x8000000F 0x006A0B
12.1.1.0        92.2.2.2        1301        0x8000000F 0x00D2AB
13.1.1.0        92.2.2.2        1301        0x8000000F 0x002A49
100.1.1.0       92.2.2.2        1301        0x8000000F 0x003824
                Type-5 AS External Link States
Link ID         ADV Router      Age         Seq#       Checksum Tag
5.5.5.0         94.4.4.4        58          0x80000003 0x00899B 0
45.1.1.0        94.4.4.4        58          0x80000003 0x00DB29 0
R2#
R2#sh ip os da asb
R2#sh ip os da asbr-summary
            OSPF Router with ID (92.2.2.2) (Process ID 110)
                Summary ASB Link States (Area 0)
  LS age: 79
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(AS Boundary Router)
  Link State ID: 94.4.4.4 (AS Boundary Router address)
  Advertising Router: 92.2.2.2
  LS Seq Number: 80000003
  Checksum: 0x41EB
  Length: 28
  Network Mask: /0
        TOS: 0  Metric: 64
R2# //R2上仅area0中存在ASB LSA
R1#sh ip os da
            OSPF Router with ID (91.1.1.1) (Process ID 110)
                Router Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum Link count
91.1.1.1        91.1.1.1        385         0x80000016 0x00FF54 4
92.2.2.2        92.2.2.2        1556        0x80000015 0x0095B5 4
                Net Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum
100.1.1.2       92.2.2.2        1556        0x8000000F 0x00A6F9
                Summary Net Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum
3.3.3.3         91.1.1.1        128         0x8000000F 0x00245F
4.4.4.4         92.2.2.2        1556        0x8000000E 0x00D9A2
13.1.1.0        91.1.1.1        385         0x8000000F 0x00E39D
24.1.1.0        92.2.2.2        1556        0x8000000E 0x00383B
                Summary ASB Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum
94.4.4.4        92.2.2.2        312         0x80000003 0x0041EB
                Router Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum Link count
91.1.1.1        91.1.1.1        135         0x80000010 0x00D180 2
93.3.3.3        93.3.3.3        42          0x80000010 0x00022A 3
                Summary Net Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum
1.1.1.1         91.1.1.1        392         0x8000000F 0x00FDCD
2.2.2.2         91.1.1.1        392         0x8000000F 0x003489
4.4.4.4         91.1.1.1        1392        0x8000000E 0x005C1A
12.1.1.0        91.1.1.1        392         0x8000000F 0x00F091
24.1.1.0        91.1.1.1        1633        0x8000000E 0x00BAB2
100.1.1.0       91.1.1.1        392         0x8000000F 0x00560A
                Summary ASB Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum
94.4.4.4        91.1.1.1        392         0x80000003 0x00C363
                Type-5 AS External Link States
Link ID         ADV Router      Age         Seq#       Checksum Tag
5.5.5.0         94.4.4.4        324         0x80000003 0x00899B 0
45.1.1.0        94.4.4.4        324         0x80000003 0x00DB29 0
R1#
R1#sh ip os da asbr-su
            OSPF Router with ID (91.1.1.1) (Process ID 110)
                Summary ASB Link States (Area 0)
  Routing Bit Set on this LSA
  LS age: 350
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(AS Boundary Router)
  Link State ID: 94.4.4.4 (AS Boundary Router address)
  Advertising Router: 92.2.2.2
  LS Seq Number: 80000003
  Checksum: 0x41EB
  Length: 28
  Network Mask: /0
        TOS: 0  Metric: 64
                Summary ASB Link States (Area 1)
  LS age: 423
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(AS Boundary Router)
  Link State ID: 94.4.4.4 (AS Boundary Router address)
  Advertising Router: 91.1.1.1
  LS Seq Number: 80000003
  Checksum: 0xC363
  Length: 28
  Network Mask: /0
        TOS: 0  Metric: 74
R1#
R1#    sh ip os da ex
            OSPF Router with ID (91.1.1.1) (Process ID 110)
                Type-5 AS External Link States
  Routing Bit Set on this LSA
  LS age: 396
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 5.5.5.0 (External Network Number )
  Advertising Router: 94.4.4.4
  LS Seq Number: 80000003
  Checksum: 0x899B
  Length: 36
  Network Mask: /24
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 20
        Forward Address: 0.0.0.0
        External Route Tag: 0
  Routing Bit Set on this LSA
  LS age: 396
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 45.1.1.0 (External Network Number )
  Advertising Router: 94.4.4.4
  LS Seq Number: 80000003
  Checksum: 0xDB29
  Length: 36
  Network Mask: /24
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 20
        Forward Address: 0.0.0.0
        External Route Tag: 0
R1#
R3#sh ip os database
            OSPF Router with ID (93.3.3.3) (Process ID 110)
                Router Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum Link count
91.1.1.1        91.1.1.1        240         0x80000010 0x00D180 2
93.3.3.3        93.3.3.3        145         0x80000010 0x00022A 3
                Summary Net Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum
1.1.1.1         91.1.1.1        497         0x8000000F 0x00FDCD
2.2.2.2         91.1.1.1        497         0x8000000F 0x003489
4.4.4.4         91.1.1.1        1496        0x8000000E 0x005C1A
12.1.1.0        91.1.1.1        497         0x8000000F 0x00F091
24.1.1.0        91.1.1.1        1737        0x8000000E 0x00BAB2
100.1.1.0       91.1.1.1        497         0x8000000F 0x00560A
                Summary ASB Link States (Area 1)
Link ID         ADV Router      Age         Seq#       Checksum
94.4.4.4        91.1.1.1        497         0x80000003 0x00C363
                Type-5 AS External Link States
Link ID         ADV Router      Age         Seq#       Checksum Tag
5.5.5.0         94.4.4.4        424         0x80000003 0x00899B 0
45.1.1.0        94.4.4.4        426         0x80000003 0x00DB29 0
R3#
R3#sh ip os da asb
            OSPF Router with ID (93.3.3.3) (Process ID 110)
                Summary ASB Link States (Area 1)
  Routing Bit Set on this LSA
  LS age: 506
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(AS Boundary Router)
  Link State ID: 94.4.4.4 (AS Boundary Router address)
  Advertising Router: 91.1.1.1
  LS Seq Number: 80000003
  Checksum: 0xC363
  Length: 28
  Network Mask: /0
        TOS: 0  Metric: 74
R3# sh ip os da ex
            OSPF Router with ID (93.3.3.3) (Process ID 110)
                Type-5 AS External Link States
  Routing Bit Set on this LSA
  LS age: 546
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 5.5.5.0 (External Network Number )
  Advertising Router: 94.4.4.4
  LS Seq Number: 80000003
  Checksum: 0x899B
  Length: 36
  Network Mask: /24
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 20
        Forward Address: 0.0.0.0
        External Route Tag: 0
  Routing Bit Set on this LSA
  LS age: 546
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 45.1.1.0 (External Network Number )
  Advertising Router: 94.4.4.4
  LS Seq Number: 80000003
  Checksum: 0xDB29
  Length: 36
  Network Mask: /24
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 20
        Forward Address: 0.0.0.0
        External Route Tag: 0
R3#
Seed Metric :种子度量值
     对于OSPF而言,如果将BGP路由重分发进入,则Seed Metric默认为1,所有其他外部路由缺省SeedMetric为20;
     重分发路由进OSPF指定metric-type 和metric值, 使用tag可以配合route-map等实现高级路由控制。

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: