关键词不能为空

当前您在: 主页 > 英语 >

OSPF LSA过滤简述

作者:高考题库网
来源:https://www.bjmy2z.cn/gaokao
2021-02-13 15:54
tags:

-

2021年2月13日发(作者:封口费)



1




OSPF LSA


过滤简述



OSPF


的过滤有两种,


一种是对路由表的过滤


,这种方式只对配置过滤的路由器起作用,不





LSA














路< /p>









filter -policy


import(VRP)


/distribute-list


in(IOS)



另一种是对


LSA


的 过滤


,这种方式其实并不是对


LSA


过 滤,只是阻止


LSA


的生成,没有了


L SA


,相应也会影响其他同区域或同自治域的路由器。



对路由表的过滤,适用所有运行


OSPF


的路 由器;其他命令都是阻止


LSA


的生成,


只能过滤


原本应该是本路由器产生的


LSA

< br>,


这种过滤只能在


LSA


生成者 上做过滤



ASBR



ASE/NSSA LSA


的生成者,


ABR



SUMMARY


LSA

的生成者,


NSSA


区域的


ABR



NSSA



ASE


的生成者,所以


我们很容易想到这种方式的过滤只能在< /p>


ABR



ASBR



NSSA


区域的


ABR

< p>
上。




2




OSPF



6


种过滤方式



2.1


filter- policy import



OSPF




只能用来过滤


OSPF


有效路由表里的路由,并不能阻止


LSA


的泛洪 。


(除此之外,以下的过滤方


式均是对


LSA


的过滤)


,


被过滤的路由在路由 表中为


inactive


状态。



对应


IOS


命令为


Router(config-router)#


distribute-list


1


in/distribute-list prefix


1


in



Users can define a route map to prevent OSPF routes from being added to the routing table.



对应


Junos


命令为


import policy



IOS


并不认为这是一种真正的


OSPF


过滤。




R1< /p>


路由器上配置两条静态路由,然后


import

< br>到


ospf


中。



ip route-static 11.11.11.11 255.255.255.255 NULL0



ip route-static 111.111.111.111 255.255.255.255 NULL0



查看


R2


的路由表



dis ip routing- table



Route Flags: R - relay, D - download to fib



- -------------------------------------------------- ---------------------------



Routing Tables: Public




Destinations : 13


Routes : 13



Destination/Mask


Proto


Pre


Cost


Flags NextHop


Interface



11.11.11.11/32


O_ASE


150


1


D


100.0.12.1


Serial0/0/0



111.111.111.111/32


O_ASE


150


1


D


100.0.12.1


Serial0/0/0



然后在


R2


上配置


filter-policy import


过滤掉


11.11.11.11/32

< p>
的路由不让其加入到


R2


的路由表


中。



ospf 1



filter-policy ip-prefix huawei import



#



ip ip-prefix huawei index 10 deny 11.11.11.11 32



ip ip-prefix huawei index 20 permit 0.0.0.0 0 less-equal 32



配置后查看


R2


的路由表:



dis ip routing-table



Route Flags: R - relay, D - download to fib



------------------------------------------------- -----------------------------



Routing Tables: Public




Destinations : 13


Routes : 13



Destination/Mask


Proto


Pre


Cost


Flags NextHop


Interface



111.111.111.111/32


O_ASE


150


1


D


100.0.12.1


Serial0/0/0



可以看到路 由表中已经没有了


11.11.11.11/32


的路由,但是


LSDB


中还是有的。



[R2]dis ospf lsdb




OSPF Process 1 with Router ID 2.2.2.2




Link State Database




AS External Database



Type


LinkState ID


AdvRouter


Age


Len


Sequence


Metric



External 11.11.11.11


111.111.111.111


200


36


80000001


1



External


111.111.111.111 111.111.111.111


189


36


80000001


1



2.2


filter-policy export[acl/ip-prefix]/import-route



OSPF



[route-policy]



,过滤彻底,所有


OSPF


域的路由器将不会收到被过滤的


ASE/NSSA LSA





该命令用来在


ASBR


上对


ASE/N SSA


过滤,可以对本台路由器


引入而产生的

< br>ASE/NSSA LSA


做过


对应

IOS


命令为


Router(config- router)#


distribute-list


x


out


[rip]/


redistribute


rip


route- map





R1


上配置


filter-policy export


的策略,拒绝


11.11.11.11/32



lsa


进入到


ospf


中。



ospf 1



filter-policy ip-prefix huawei export



import-route static



#



ip ip-prefix huawei index 10 deny 11.11.11.11 32



ip ip-prefix huawei index 20 permit 0.0.0.0 0 less-equal 32



配置后在


R1

< br>上查看


lsdb


,发现已经没有了


11.11.11.11/32



ase lsa




[R1]dis ospf lsdb




OSPF Process 1 with Router ID 111.111.111.111




Link State Database




AS External Database



Type


LinkState ID


AdvRouter


Age


Len


Sequence


Metric



External


111.111.111.111 1.1.1.1


10


36


80000001


1



R2



R3


也 同样没有了


11.11.11.11/32


< br>ase lsa


,当然也无法计算出路由来。



2.3


asbr-summary


not-advertise



OSP F





命令用来在


ASBR


上可以对自身产生的


ASE/NSSA


做过滤,阻止 本路由器产生符合特定条件的


ASE/NSSA



以及在


NSSA


区域的


AB R


上可以对


7



5



LSA


做过滤

< br>,阻止本路由器根据


NSSA


产生符合特定条件的


ASE




对应


IOS


命令为


Router(config -router)#summary-address 10.0.0.0 255.255.25.0 no advertise




NSSA


区域的


ABR


可以在


ABR


上对


Type7


< p>
5



LSA


进行二次过滤





R1< /p>


上配置


[R1-ospf-1]asbr-summary 11.11.11.11 255.255.255.255 not- advertise



配置后,查看


R 1



lsab


发现已经没有了


11.11.11.11/32



ase


lsa


,其他路由器也没有


11.11.1 1.11/32



ase lsa


,同样无法计算出路由,过滤彻底。



[R1-ospf-1]dis ospf lsdb




AS External Database



Type


LinkState ID


AdvRouter


Age


Len


Sequence


Metric



External


111.111.111.111 1.1.1.1


142


36


80000001


1



对于在


ABR


上配置

< br>7



5


时过滤时需要注意以下特 性:



ABR


全局路由表中只有存在< /p>


FA


地址的路由时,才会将


nssa- external


转换成


external

< br>lsa


,其


他路由器收到这个


e xternal



lsa


后,还要检查 是否有到达


fa


地址的路由,如果没有,不会参


与计算,所以在


ABR


上如果对


fa


地址路由(该种过滤无法通过配置


suppress-f a


来搞定,因为



ABR


上根本没有执行


nssa-external



external


)或


lsa


进行过滤,都会导致骨干区其他路由


器无法计算该路由。

如果确实需要进行过滤,


那么需要在


ABR


上配置


R2(config-router)#area 100


nssa translate type7 suppress- fa


命令。




在上图的组网中,如果想在


ABR


上做


Area


2


区域的


ASBR


地址的


LSA


过滤,(我司

< br>VRP5


命令



aera


视图下


abr-summary


100.0.15.0


255.255.255.0


not-advertise


,此时在


ABR


上仍旧


ASBR


FA


地址的路由和


nssa- external


路由,该路由器也会将


nssa- external


lsa


转换成

-


-


-


-


-


-


-


-



本文更新与2021-02-13 15:54,由作者提供,不代表本网站立场,转载请注明出处:https://www.bjmy2z.cn/gaokao/651130.html

OSPF LSA过滤简述的相关文章