ospf路由汇总

 

 AR1配置

ospf 1 router-id 1.1.1.1 
 area 0.0.0.1 
  network 1.1.1.1 0.0.0.0 
  network 12.1.1.0 0.0.0.3 
  network 20.1.1.1 0.0.0.0 
  network 20.1.1.2 0.0.0.0 

AR2配置

ospf 1 router-id 2.2.2.2 
 area 0.0.0.0 
  network 23.1.1.0 0.0.0.255 
 area 0.0.0.1 
  abr-summary 20.1.1.0 255.255.255.252
  network 2.2.2.2 0.0.0.0 
  network 12.1.1.0 0.0.0.3 

AR3配置

ospf 1 router-id 3.3.3.3 
 area 0.0.0.0 
  network 3.3.3.3 0.0.0.0 
  network 23.1.1.0 0.0.0.255

AR3上查看汇总以后的路由

<AR3>dis ip routing-table protocol os
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : OSPF
         Destinations : 4        Routes : 4        

OSPF routing table status : <Active>
         Destinations : 4        Routes : 4

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        1.1.1.1/32  OSPF    10   2           D   23.1.1.2        GigabitEthernet
0/0/1
        2.2.2.2/32  OSPF    10   1           D   23.1.1.2        GigabitEthernet
0/0/1
       12.1.1.0/30  OSPF    10   2           D   23.1.1.2        GigabitEthernet
0/0/1
       20.1.1.0/30  OSPF    10   2           D   23.1.1.2        GigabitEthernet
0/0/1

OSPF routing table status : <Inactive>
         Destinations : 0        Routes : 0

 

posted @ 2020-05-27 20:52  星火撩原  阅读(343)  评论(0编辑  收藏  举报