区域内的路由器不需要了解他们所在区域外部的拓扑细节.

路由器仅仅需要和它所在区域的其他路由器具有相同的链路状态数据库.

链路状态数据包的减少也就意味着处理较少的lsa,从而也就降低了对路由器cpu的消耗.

由于链路状态数据库只需要在一个区域内进行维护,因此,大量的lsa泛红扩散也就被限制在一个区域里面了.

区域是通过一个32位的区域id(area id)来识别的.

lsa类型

传播范围

通告者

具体内容

lsa1:描述路由器的直连信息:网段,邻居.

lsa2:在ma网络当中,网络的掩码,网络当中的邻居(dr公告)

lsa3:描述域间路由,目标网络前缀和掩码,cost(abr公告)

lsa4:描述asbr的位置(abr公告)

lsa5:描述普通区域内容外部路由器(asbr公告)

lsa6:mospf组播路由器更新(cisco不支持)

lsa7:描述nssa区域内的外部路由器(asbr公告)

lsa8:bgp相关

lsa9,10,11:isp mpls te(流量工程)相关.

tcp/ip_ospf案例研究3 lsa

r3:

int f1/0

ip ospf 110 area 0

r5:

int f1/0

ip ospf 110 area 0

r1:

router ospf 110

network 11.1.1.1 0.0.0.0 area 0

network 10.1.1.0 0.0.0.255 area 0

int s0/0

ip ospf network point-to-multipoint

r3:

router ospf 110

network 10.1.1.0 0.0.0.255 area 0

network 33.1.1.1 0.0.0.0 area 0

int s0/1

ip ospf network point-to-multipoint

r4:

router ospf 110

network 44.1.1.1 0.0.0.0 area 0

network 10.1.1.0 0.0.0.255 area 0

int f1/0

ip ospf 110 area 2

int s0/0

ip ospf network point-to-multipoint

r1:

int f1/0

ip ospf 110 area 2

r2:

router ospf 110

network 0.0.0.0 0.0.0.0 area 0

type-1 routerlsa

通告者(产生者) rid

传播范围 区域内

内容 直连信息,link类型,cost

link id rid

查看命令 show ip ospf data router

type-2 network lsa

通告者(产生者) dr rid

传播范围 区域内

内容 ma网络的链路,子网掩码

link id dr ip

查看命令 show ip ospf database network

type-3 summary lsa

通告者 abr rid(穿越不同区域的abr时会变化)传播范围 整个域内

内容 子网和链路掩码

link id 路由

查看命令 show ip ospf data summary

type-4 summary asb lsa

通告者 abr rid

传播范围 整个区域(除本区域)

内容 asbr的位置

link id asbr rid

查看命令 show ip ospf data asbr-symmary

type-5 extemal lsa

通告者 asbr rid

传播范围 整个区域(除了nssa,stub)

内容 域外路由

link id 外部路由

查看命令 show ip ospf data extenmal

r3:

show ip ospf data(lsa头部)

show ip ospf data router self-originate(自己产生的lsa)

r5:

show ip ospf data router self-originate

r3:

int f1/0

ip ospf network point-to-point

link type

stub network link

1.该网段没有ospf邻居

2.该网段只有一个ospf邻居

3.loopback接口,即不超过一个邻居的状态

point-to-point link

1.p2p的网络类型

2.点到多点网络类型即无dr时

transit link

1.广播网络类型

2.nbma网络类型即有dr时

virtual link

虚链路

注解*邻居两端link type不同也可建立邻居,但却不可传递路由

lsa type1:router lsa

one router lsa (type 1)for every router in an area

描述直连信息 includes list of directly attached links

each link identified by ip prefix assigned to link and link type

由源路由器id作为标识-identified by the router id of the originating router

仅在区域内泛洪,并不穿越abr-floods within its area only;does not cross abr

区域内spf算法:每台路由器(已经被标识)利用接口下的cost(100m/bw)计算到达目标网络的最小metric.设备的数量决定了lsa type=1的数量

show ip ospf inter brief;show ip ospf data router;ip ospf cost x(数据出接口或者路由的入接口)

一类lsa的link id和adv router为rid

show ip ospf database router

lsa type 2:network lsa

one network(type 2)lsa for each transit broadcast or nbma network in an area (即在需要dr的链路上存在类型2的lsa)

includes list of attached routers on the transit link

includes subnet mask of link

由广播网络的dr通告-advertised by the dr of the broadcast network

仅在区域内泛洪,并不穿越abr-floods within its area only;does not cross abr

r3:

show ip ospf data network self-originate

int f1/0

ip ospf network broadcast

r5:

show ip ospf data network self-originate

r4:

int s0/2

ip ospf network point-multpoint

las type 3:summary lsa

type 3 lsas area used to flood network information to areas outside the originating area(interarea)

describes network number and mask of link.

advertised by the abr of originating area

regenerated by subsequent abrs to flood throughout the autonomous system.

by default.routes area not summarized,and type 3 lsa is advertised for every subnet.

r5:

show ip ospf data summary

lsa type 3:summary lsa

由谁产生:abr

范围:泛洪到整个ospf区域

内容:描述子网号和链路的掩码(即域间路由),默认情况下路由不被汇总

link id:区域间的路由

adv router:abr rid

show ip ospf data summary,其中metric值是abr到目标网段的cost,总的cost为本路由器到abr的cost+abr到目标网段的cost

r3:

show ip ospf database summary self-originate

r5:

show ip ospf data summary