3.4 OSPF配置详解

3.OSPF多区域配置

图片[1]-3.4 OSPF配置详解-大赛人网
图3-45 OSPF 多区域网络拓扑

1)基本配置

[R1]ospf 1 router-id 1.1.1.1
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0
[R1-ospf-1-area-0.0.0.0]network 13.1.1.0 0.255.255.255
[R1-ospf-1]area 1
[R1-ospf-1-area-0.0.0.1]network 192.168.1.0 0.0.0.255
[R1-ospf-1-area-0.0.0.1]network 192.168.2.0 0.0.0.255

[R2]ospf 1 router-id 2.2.2.2
[R2-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[R2-ospf-1-area-0.0.0.0]network 23.1.1.0 0.255.255.255
[R2-ospf-1]area 2
[R2-ospf-1-area-0.0.0.2]network 192.168.3.0 0.0.0.255
[R2-ospf-1-area-0.0.0.2]network 192.168.4.0 0.0.0.255

[R3]ospf 1 router-id 3.3.3.3
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0
[R3-ospf-1-area-0.0.0.0]network 13.1.1.0 0.255.255.255
[R3-ospf-1-area-0.0.0.0]network 23.1.1.0 0.255.255.255

2)R3查看邻居表

[R3]display ospf peer 
         OSPF Process 1 with Router ID 3.3.3.3
                 Neighbors 

 Area 0.0.0.0 interface 13.1.1.3(GigabitEthernet0/0/0)'s neighbors
 Router ID: 1.1.1.1          Address: 13.1.1.1        
   State: Full  Mode:Nbr is  Slave  Priority: 1
   DR: 13.1.1.1  BDR: 13.1.1.3  MTU: 0    
   Dead timer due in 35  sec 
   Retrans timer interval: 5 
   Neighbor is up for 00:02:36     
   Authentication Sequence: [ 0 ] 

                 Neighbors 

 Area 0.0.0.0 interface 23.1.1.3(GigabitEthernet0/0/1)'s neighbors
 Router ID: 2.2.2.2          Address: 23.1.1.2        
   State: Full  Mode:Nbr is  Slave  Priority: 1
   DR: 23.1.1.2  BDR: 23.1.1.3  MTU: 0    
   Dead timer due in 37  sec 
   Retrans timer interval: 5 
   Neighbor is up for 00:02:24     
   Authentication Sequence: [ 0 ] 

3)R3查看OSPF路由表

[R3]display ip routing-table protocol ospf 
Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface
1.1.1.1/32  OSPF    10   1           D   13.1.1.1        GigabitEthernet0/0/0
2.2.2.2/32  OSPF    10   1           D   23.1.1.2        GigabitEthernet0/0/1
192.168.1.0/24  OSPF    10   2           D   13.1.1.1        GigabitEthernet0/0/0
192.168.2.0/24  OSPF    10   2           D   13.1.1.1        GigabitEthernet0/0/0
192.168.3.0/24  OSPF    10   2           D   23.1.1.2        GigabitEthernet0/0/1
192.168.4.0/24  OSPF    10   2           D   23.1.1.2        GigabitEthernet0/0/1

4)R3查看ABR和ASBR信息

[R3]display ospf abr-asbr 
         OSPF Process 1 with Router ID 3.3.3.3
                 Routing Table to ABR and ASBR 
RtType      Destination       Area       Cost  Nexthop         Type
Intra-area  1.1.1.1           0.0.0.0    1     13.1.1.1        ABR 
Intra-area  2.2.2.2           0.0.0.0    1     23.1.1.2        ABR 

1 2 3 4 5 6 7 8

© 版权声明
THE END
喜欢就支持一下吧
点赞11 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称

    请登录后查看评论内容