OSPF地址汇总 area range address

基本配置后,查看R1的路由表,可以看出外部2.2.2.1,2.2.2.2,2.2.2.3明细路由和3.3.3.1,3.3.3.2,
3.3.3.3明细路由。

r1#
r1#show ip route
Codes: C – connected, S – static, R – RIP, M – mobile, B – BGP
      D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
      N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
      E1 – OSPF external type 1, E2 – OSPF external type 2
      i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
      ia – IS-IS inter area, * – candidate default, U – per-user static route
      o – ODR, P – periodic downloaded static route

Gateway of last resort is not set

   192.168.12.0/24 is directly connected, Ethernet0/0
    1.0.0.0/32 is subnetted, 1 subnets
      1.1.1.1 is directly connected, Loopback0
   192.168.13.0/24 is directly connected, Ethernet0/2
    2.0.0.0/32 is subnetted, 3 subnets
O IA    2.2.2.2 [110/11] via 192.168.12.2, 00:00:04, Ethernet0/0
O IA    2.2.2.3 [110/11] via 192.168.12.2, 00:00:04, Ethernet0/0
O IA    2.2.2.1 [110/11] via 192.168.12.2, 00:00:04, Ethernet0/0
    3.0.0.0/32 is subnetted, 3 subnets
O IA    3.3.3.3 [110/11] via 192.168.13.3, 00:00:01, Ethernet0/2
O IA    3.3.3.2 [110/11] via 192.168.13.3, 00:00:00, Ethernet0/2
O IA    3.3.3.1 [110/11] via 192.168.13.3, 00:00:00, Ethernet0/2
r1#
r1#

在area 0与area 1的(边界路由器ABR)R2上进行汇总:

r2#
r2(config)#router ospf 100
r2(config-router)#area 1 range 2.2.2.0 255.255.255.0
r2#

在area 0与area 2的(边界路由器ABR)R3上进行汇总:

r3#
r3(config)#router ospf 100
r3(config-router)#area 2 rang 3.3.3.0 255.255.255.0 not-advertise
r3#

此时,查看R1的路由表:

r1#
r1#
r1#show ip route
Codes: C – connected, S – static, R – RIP, M – mobile, B – BGP
      D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
      N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
      E1 – OSPF external type 1, E2 – OSPF external type 2
      i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
      ia – IS-IS inter area, * – candidate default, U – per-user static route
      o – ODR, P – periodic downloaded static route

Gateway of last resort is not set

   192.168.12.0/24 is directly connected, Ethernet0/0
    1.0.0.0/32 is subnetted, 1 subnets
      1.1.1.1 is directly connected, Loopback0
   192.168.13.0/24 is directly connected, Ethernet0/2
    2.0.0.0/24 is subnetted, 1 subnets
O IA    2.2.2.0 [110/11] via 192.168.12.2, 00:00:33, Ethernet0/0
r1#

可以看出area 1的路由已经汇总成O IA    2.2.2.0 [110/11] via 192.168.12.2, 00:00:33, Ethernet0/0。
而area 2的路由却消失了,这是因为在对area 2 进行汇总时,汇总路由后面加了no-advertise。

Notice:

  area rang的命令的缺省行为是通告指定的范围。它也可以用来一直一个地址范围的通过。带有关键字no-advertise的命令area rang将使指定范围的前缀被抑制。它们将不会在LSA中通告。

发布者

小挨踢

一名89年出生的女网络工程师的博客,20180319小挨踢的博客来啦!

发表评论