ospf特殊区域.docx
《ospf特殊区域.docx》由会员分享,可在线阅读,更多相关《ospf特殊区域.docx(15页珍藏版)》请在冰点文库上搜索。
ospf特殊区域
OSPF(stub,totallynssa,virtual-link)
实验目的:
1、配置stub,totallynssa和虚链路
2、熟悉stub,totallynssa和虚链路的作用
实验拓扑1:
实验拓扑2(加入Area3):
实验步骤:
加入Area3之前(拓扑1),配置如“ospf-LSA”的ospf配置+重分布(ospf和eigrp的重分布)。
在区域2配置totallyNSSA
R3
R3(config)#routerospf110
R3(config-router)#area2nssano-redistributionno-summary
R3(config-router)#exit
R3(config)#^Z
R3#wr
Buildingconfiguration...
[OK]
R4
R4(config)#routerospf110
R4(config-router)#area2nssa
R4(config-router)#exit
*Mar100:
56:
06.683:
%OSPF-5-ADJCHG:
Process110,Nbr33.33.33.33onSerial0/0fromLOADINGtoFULL,LoadingDone
R4(config)#^Z
R4#wr
Buildingconfiguration...
*Mar100:
56:
13.523:
%SYS-5-CONFIG_I:
Configuredfromconsolebyconsole[OK]
totallyNSSA配置后,LSA信息显示如下
R1的5类和7类LSA被过滤。
R2的5类和7类LSA被过滤。
R3的5类和7类LSA被过滤,且区域2中有一条3类默认。
(注:
此时R3路由表中没有3类默认)
R4的5类和7类LSA被过滤,且区域2中有一条3类默认(来自33.33.33.33)。
(注:
R4路由表中有3类默认)
加入Area3(拓扑2),在区域3配置stub
R6
R6(config)#interfaces0/0
R6(config-if)#ipaddress14.1.1.1255.255.255.252
R6(config-if)#noshut
R6(config-if)#exit
R6(config)#interfacel0
R6(config-if)#ipaddress6.6.6.6255.255.255.0
R6(config-if)#exit
R6(config)#routerospf100
R6(config-router)#router-id66.66.66.66
R6(config-router)#network6.6.6.00.0.0.255area3
R6(config-router)#network14.1.1.00.0.0.3area3
R6(config-router)#exit
R6(config)#^Z
R6#R6#wr
*Mar100:
08:
39.131:
%SYS-5-CONFIG_I:
Configuredfromconsolebyconsolewr
Buildingconfiguration...
[OK]
R6(config)#routerospf100
R6(config-router)#area3stub
R6(config-router)#exit
R6(config)#^Z
R6#wr
Buildingconfiguration...
*Mar100:
11:
43.679:
%SYS-5-CONFIG_I:
Configuredfromconsolebyconsole[OK]
R1
R1(config)#interfaces1/0
R1(config-if)#ipaddress14.1.1.2255.255.255.252
R1(config-if)#noshut
R1(config-if)#exit
R1(config)#routerospf110
R1(config-router)#network14.1.1.00.0.0.3area3
R1(config-router)#exit
R1(config)#^Z
R1#wr
Buildingconfiguration...
[OK]
R1(config)#routerospf110
R1(config-router)#area3stub
R1(config-router)#exit
R1#wr
Buildingconfiguration...
*Mar100:
14:
32.315:
%SYS-5-CONFIG_I:
Configuredfromconsolebyconsole[OK]
配置virtual-link
R1
R1(config)#routerospf110
R1(config-router)#area1virtual-link22.22.22.22(目标routerID)
R1(config-router)#exit
R1(config)#^Z
R1#wr
Buildingconfiguration...
[OK]
R2
R2(config)#routerospf110
R2(config-router)#area1virtual-link11.11.11.11(目标routerID)
R2(config-router)#^Z
R2(config-router)#exit
R2(config)#^Z
R2#wr
Buildingconfiguration...
*Mar101:
13:
36.663:
%SYS-5-CONFIG_I:
Configuredfromconsolebyconsole[OK]
检验虚链路畅通与否(ping回环口):
R6
区域3的stub和virtual-link配置后LSA信息如下:
R1的5类7类被过滤,且有一条3类的默认路由。
R1路由表
R6的5类7类被过滤,且有一条来自11.11.11.11的3类的默认路由。
R6路由表
R2的5类7类被过滤,区域0的3类1.1.1.1和10.1.1.0,6.6.6.6和14.1.1.0来自于11.11.11.11,这是加入区域3,建立虚链路之后R1作为ABR,因此会有这样一条信息。
区域0的1类有一条11.11.11.11来自于11.11.11.11。
在区域1的3类6.6.6.6和14.1.1.0来自于11.11.11.11,也是由于建立了虚链路的结果。
4类多了一条33.33.33.33来自于11.11.11.11。
R3的5类和7类LSA被过滤,区域0的1类11.11.11.11来自于本身,3类1.1.1.1,6.6.6.6,10.1.1.0和14.1.1.0来自于11.11.11.11,这也是建立了虚链路的结果。
R4的5类和7类LSA被过滤,没有4类LSA。
实验中要注意的问题:
1、在此实验中,建立虚链路时,使用的routerID(22.22.22.22和11.11.11.11)为目标routerID。
2、TotallyNSSA在区域2,R3和R4上面配置。
3、如果用NSSA,要在链接外网的路由器上面下放7类默认。
4、在实验中,使用stub之前使用了totallyNSSA,那么5类LSA
在区域2(R4)就已经被过滤;
5、7类LSA的是通过ASBR生成的(来自于外部),会出现ospf数据库中有7类,而路由表中没有的情况,是正常的,不然的话R3哪来的7类。
6、下放的3类默认只下放到本区域内。
7、virtual-link之间(R1与R2之间)不允许stub,stub也不能在virtual-link中跨物理区域设置(eg:
R6ospf进程#area3stub,R2ospf进程#area3stub),如此,R6不通。
(R6的stub可以设置在区域1中,R2的stub可以设置在区域3中,但这样不构成ospfstub,在ospf中,stub是区域概念,stub要配置在同一区域)。
除了用virtual-link,还有另外一种方法:
tunnel,不同的是tunnel要有源和目的,还要选择模式,之后给tunnel配上IP地址,宣告到相应区域。
实验总结:
除了stub和totallyNSSA,还有另外两种特殊区域,归纳如下
特殊区域
作用
是否下放默认路由
Stub
过滤5类LSA
是,3类,seedcost为1
Totallystub
过滤5类和3类LSA
是,3类,seedcost为1
NSSA
过滤5类变成7类
否,defaultLSA7,手动配置,cost=1
TotallyNSSA
过滤3、5、7类LSA
No-summary:
LSA3下放,cost=1
检验用到的命令:
showipinterfacebrief查看接口状态
showipospfneighbor查看ospf邻居
showipospfneighbordetail查看ospf邻居的详细信息
showcdpneighbors查看邻居(设备)
showcdpneighborsdetail查看邻居详细信息(设备)
showiproute查看路由表
showiprouteospf查看ospf路由表
showipospfdatabase查看ospfLSA信息
showipospfdatabaserouter查看ospfLSA详细信息