发新话题
打印

[网络转载] OSPF summary-address命令浅析

OSPF summary-address命令浅析

路由协议IGP/BGP


OSPF summary-address命令浅析


Document ID: 00001




目录


提要


正文


TOPO如下


基本配置如下


验证


附注




提要:


讨论OSPF中的外部汇总命令summary-address的作用以及使用地点。


cisco文档关于summary-address的解释



summary-address {{ip-address mask} | {prefix mask}} [not-advertise] [tag tag]



Multiple groups of addresses can be summarized for a given level. Routes learned from other routing protocols can also be summarized. The metric used to advertise the summary is the smallest metric of all the more specific routes. This command helps reduce the size of the routing table.



Using this command for OSPF causes an OSPF Autonomous System Boundary Router (ASBR) to advertise one external route as an aggregate for all redistributed routes that are covered by the address. For OSPF, this command summarizes only routes from other routing protocols that are being redistributed into OSPF.


OSPF does not support the summary-address 0.0.0.0 0.0.0.0 command.



正文



一般而言,summary-address的作用是用于在普通及骨干区域的ASBR上汇总重分布的外部路由,可是在NSSA区域,在ABR和ASBR上都可以汇总重分布的外部路由, 其中存在细微差别,下面以具体实验为例讲述:



TOPO如下



基本配置如下


l        R1


l        R2


l    R3



R1


hostname r1


!


interface Serial1/0



ip address 12.1.1.1 255.255.255.0


!


router ospf 10



router-id 1.1.1.1


network 12.1.1.0 0.0.0.255 area 0


!


End




R2


hostname r2


!


interface Serial1/0



ip address 23.1.1.2 255.255.255.0


!


interface Serial2/0



ip address 12.1.1.2 255.255.255.0


!


router ospf 10



router-id 2.2.2.2



network 12.1.1.0 0.0.0.255 area 0



network 23.1.1.0 0.0.0.255 area 1


!


End




R3


hostname r3


!


interface Loopback0



ip address 4.4.4.4 255.255.255.0


!


interface Loopback1



ip address 5.5.5.5 255.255.255.0


!


interface Serial2/0



ip address 23.1.1.3 255.255.255.0


!


router ospf 10



router-id 3.3.3.3



area 1 nssa



redistribute connected subnets



network 23.1.1.0 0.0.0.255 area 1


!


End





验证



首先,我们在R3ASBR)上对外部路由4.4.4.0/24做外部汇总为4.0.0.0/8



r3(config-router)#summary-address 4.0.0.0 255.0.0.0



然后,在R2
(ABR)上对外部路由5.5.5.0/24做外部汇总为5.0.0.0/8



r2(config-router)#summary-address 5.0.0.0 255.0.0.0



查看R2数据库中Forward Address信息



r2#sh ip ospf data external




OSPF Router with ID (2.2.2.2) (Process ID 10)




Type-5 AS External Link States




LS age: 780



Options: (No TOS-capability, DC)



LS Type: AS External Link



Link State ID: 4.0.0.0 (External Network Number )



Advertising Router: 2.2.2.2



LS Seq Number: 80000001



Checksum: 0xB8BF



Length: 36



Network Mask: /8



Metric Type: 2 (Larger than any link state path)



TOS: 0



Metric: 20



Forward Address: 23.1.1.3



External Route Tag: 0




LS age: 76



Options: (No TOS-capability, DC)



LS Type: AS External Link



Link State ID: 5.0.0.0 (External Network Number )



Advertising Router: 2.2.2.2



LS Seq Number: 80000001



Checksum: 0x6A29



Length: 36



Network Mask: /8



Metric Type: 2 (Larger than any link state path)



TOS: 0



Metric: 20




Forward Address: 0.0.0.0



External Route Tag: 0



可以看到,当summary-address在R2(ABR)上作NSSA外部路由汇总时,可以将Forward Address变为0.0.0.0,具体全零Forward Address的作用,大家可以参考one-tom论坛日历事务: OSPF在转换LSA 5时的转发地址抑制



附注





如果外部路由汇总时加上[not-advertise]参数时,它起到“prevent the type 7 LSAs from being translated outside the NSSA”的作用,即不将类型7 的LSA转换成类型5通告到骨干区域,实现了路由过滤,这里就不再赘述。


TOP

这么好的文章怎么没人回帖,原来是英文都看不懂,以后翻译成中文就好拉

TOP

发新话题