TCP/IP 7.1.3链路状态数据库 (1)

7.1.3 链路状态数据库
LSA 描述一个 OSPF 区域网络 top 的结果
 
Show ip ospf database 只显示 LSA 头部
Show ip ospf database database-summary 显示一个链路状态数据库当中局域区域和 LSA 类型的 LSA 通过的数量
 
LSA 的老化时间是 1 个小时,到了时间就删。
刷新时间是 30min ,序列号加 1 ,老化时间变成 0 ,同时如果原有的被破坏还可以替换
 
刷新有个机制让让他们不会一起泛洪 ~LSA 组步调
 
 
关于 LSA 类别的实验
Top 如下
Net top 配置都在附件中能找到
 
1、  LSA 的类型
路由器 LSA Router LSA
产生:每一台路由器( OSPF )都会产生路由器 LSA 通告
内容:路由器所有的链路或接口,链路和接口的状态和每条链路方向出站的代价,链路上已知的邻居
扩散范围:本区域
查看命令: show ip ospf database router
图片表述:
命令查看:
R1#sh ip ospf database router        
 
            OSPF Router with ID (1.1.1.1) (Process ID 1)
 
                Router Link States (Area 1)
 
  LS age: 749
  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: 80000003
  Checksum: 0x5205
  Length: 60
  Number of Links: 3
 
    Link connected to: another Router (point-to-point)
     (Link ID) Neighboring Router ID: 2.2.2.2
     (Link Data) Router Interface address: 10.2.2.1
      Number of TOS metrics: 0
       TOS 0 Metrics: 64
 
    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 10.2.2.0
     (Link Data) Network Mask: 255.255.255.0
      Number of TOS metrics: 0
       TOS 0 Metrics: 64
 
    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 10.1.1.1
     (Link Data) Network Mask: 255.255.255.255
      Number of TOS metrics: 0
       TOS 0 Metrics: 1
 
 
  Routing Bit Set on this LSA
  LS age: 743
  Options: (No TOS-capability, DC)
  LS Type: Router Links
  Link State ID: 2.2.2.2
  Advertising Router: 2.2.2.2
  LS Seq Number: 80000002
  Checksum: 0x9ED1
  Length: 48
  Area Border Router
  Number of Links: 2
 
    Link connected to: another Router (point-to-point)
     (Link ID) Neighboring Router ID: 1.1.1.1
     (Link Data) Router Interface address: 10.2.2.2
      Number of TOS metrics: 0
       TOS 0 Metrics: 64
 
    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 10.2.2.0
     (Link Data) Network Mask: 255.255.255.0
      Number of TOS metrics: 0
       TOS 0 Metrics: 64
         
  Routing Bit Set on this LSA 的意思是:到达这个目的地的路由在路由选择表中
 
网络LSA Network LSA
产生:多路访问网络中的DR 产生网络LSA
内容:描述一个多路访问网络和与之相连的所有路由器
查看命令:show ip ospf database network
泛洪范围:本区域
图片解析:
命令查看:
R3#sh ip ospf da net
 
            OSPF Router with ID (3.3.3.3) (Process ID 1)
 
                Net Link States (Area 0)
 
  Routing Bit Set on this LSA
  LS age: 62
  Options: (No TOS-capability, DC)
  LS Type: Network Links
  Link State ID: 192.168.1.2 (address of Designated Router)
  Advertising Router: 3.3.3.3
  LS Seq Number: 80000003
  Checksum: 0x4C4B
  Length: 36
  Network Mask: /24
        Attached Router: 3.3.3.3
        Attached Router: 2.2.2.2
        Attached Router: 4.4.4.4
网络汇总LSA :(Network Summary LSA
产生:ABR 产生
内容:发送网络汇总LSA 到一个区域,通告区域外部的目的地址
泛洪范围:所有ospf 区域
查看命令:show ip ospf database summary
图片解析:
注意这张图片你可以清楚的看明白,这边给出的是度量!度量(只有在距离矢量的情况下才会直接给路由的)!不再是链路的状态!所以OSPF 在多区域的时候其实不是纯粹的链路状态协议
这边区域之就是距离矢量
这边有放环机制,这机制就是区域之间只能通过区域0 进行数据交换。防止了大家相互说的一个情况(这个容易形成环路)
命令查看:
R2#sh ip ospf database summary
 
            OSPF Router with ID (2.2.2.2) (Process ID 1)
 
                Summary Net Link States (Area 0)
 
  LS age: 722
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 10.1.1.1 (summary Network Number)
  Advertising Router: 2.2.2.2
  LS Seq Number: 80000002
  Checksum: 0x34B1
  Length: 28
  Network Mask: /32
        TOS: 0  Metric: 65
 
  LS age: 722
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 10.2.2.0 (summary Network Number)
  Advertising Router: 2.2.2.2
  LS Seq Number: 80000002
  Checksum: 0x1DC8
  Length: 28
  Network Mask: /24
        TOS: 0  Metric: 64
 
  Routing Bit Set on this LSA
  LS age: 613
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 172.16.1.0 (summary Network Number)
  Advertising Router: 4.4.4.4
  LS Seq Number: 80000002
  Checksum: 0x12D
  Length: 28
  Network Mask: /24
        TOS: 0  Metric: 64
 
  Routing Bit Set on this LSA
  LS age: 613
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 172.16.2.1 (summary Network Number)
  Advertising Router: 4.4.4.4
  LS Seq Number: 80000002
  Checksum: 0x73F7
  Length: 28
  Network Mask: /32
        TOS: 0  Metric: 1
 
 
                Summary Net Link States (Area 1)
 
  LS age: 471
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 172.16.1.0 (summary Network Number)
  Advertising Router: 2.2.2.2
  LS Seq Number: 80000002
  Checksum: 0x47ED
  Length: 28
  Network Mask: /24
        TOS: 0  Metric: 65
 
  LS age: 471
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 172.16.2.1 (summary Network Number)
  Advertising Router: 2.2.2.2
  LS Seq Number: 80000002
  Checksum: 0xB9B8
  Length: 28
  Network Mask: /32
        TOS: 0  Metric: 2
 
  LS age: 724
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 192.168.1.0 (summary Network Number)
  Advertising Router: 2.2.2.2
  LS Seq Number: 80000004
  Checksum: 0x9432
  Length: 28
  Network Mask: /24
        TOS: 0  Metric: 1
 
  LS age: 725
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 192.168.2.1 (summary Network Number)
  Advertising Router: 2.2.2.2
  LS Seq Number: 80000002
  Checksum: 0x8D38
  Length: 28
  Network Mask: /32
        TOS: 0  Metric: 2
 
 
 
 
 
注意:通告的是这条LSA 的目的地所耗费的代价!而且是其中一条最低的代价,只有一个!
路由器收到这个LSA 只是简单的加上从他到那台ABR 路由器将之间的路由的代价,并将这个代价放在LSA 通告中!这个就是距离矢量
距离矢量的算法来查找域间路由
 

你可能感兴趣的:(LSA详解)