码迷,mamicode.com
首页 > 其他好文 > 详细

ospf 多区域实验

时间:2020-03-02 17:44:15      阅读:76      评论:0      收藏:0      [点我收藏+]

标签:process   enc   区域   ***   save   image   roc   tran   comm   

技术图片
第一步配置ip地址

[Huawei]sys ar1
[ar1]
[ar1]
<ar1>sys
Enter system view, return user view with Ctrl+Z.
[ar1]int g0/0/0
[ar1-GigabitEthernet0/0/0]ip ad 
[ar1-GigabitEthernet0/0/0]ip address 1.1.1.2 24
Mar  2 2020 14:10:05-08:00 ar1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface GigabitEthernet0/0/0 has entered the UP state. 
[ar1-GigabitEthernet0/0/0]ip address 1.1.1.1 24
*************************************************************************************************
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys ar2
[ar2]
[ar2]int g0/0/0
[ar2-GigabitEthernet0/0/0]ip ad 
[ar2-GigabitEthernet0/0/0]ip address 1.1.1.2 24
[ar2-GigabitEthernet0/0/0]quit 
[ar2]int g0/0/1
[ar2-GigabitEthernet0/0/1]ip a  
[ar2-GigabitEthernet0/0/1]ip add    
[ar2-GigabitEthernet0/0/1]ip address 2.2.2.1 24
*************************************************************************************************
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys ar3
[ar3]
[ar3]int g0/0/0
[ar3-GigabitEthernet0/0/0]ip ad 
[ar3-GigabitEthernet0/0/0]ip address 2.2.2.2 24
Mar  2 2020 14:17:36-08:00 ar3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface GigabitEthernet0/0/0 has entered the UP state. 
[ar3-GigabitEthernet0/0/0]quit
[ar3]int g0/0/1
[ar3-GigabitEthernet0/0/1]ip ad 
[ar3-GigabitEthernet0/0/1]ip address 3.3.3.1 24
[ar3-GigabitEthernet0/0/1]
Mar  2 2020 14:18:11-08:00 ar3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
 on the interface GigabitEthernet0/0/1 has entered the UP state. 
*************************************************************************************************
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys ar4

<ar4>sys
Enter system view, return user view with Ctrl+Z.
[ar4]int g0/0/0
[ar4-GigabitEthernet0/0/0]ip ad 
[ar4-GigabitEthernet0/0/0]ip address 3.3.3.2 24

[ar4-GigabitEthernet0/0/0]qui   
[ar4-GigabitEthernet0/0/0]quit 
[ar4]int g0/0/1
[ar4-GigabitEthernet0/0/1]ip ad 
[ar4-GigabitEthernet0/0/1]ip address 4.4.4.1 24
Mar  2 2020 14:19:13-08:00 ar4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface GigabitEthernet0/0/1 has entered the UP state. 

**************************************************************************************
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys ar5
<ar5>sys
Enter system view, return user view with Ctrl+Z.
[ar5]int    
[ar5]interface g    
[ar5]interface GigabitEthernet 0/0/0
[ar5-GigabitEthernet0/0/0]ip ad 
[ar5-GigabitEthernet0/0/0]ip address 4.4.4.2 24
Mar  2 2020 14:19:55-08:00 ar5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface GigabitEthernet0/0/0 has entered the UP state. 
[ar5-GigabitEthernet0/0/0]qui   
[ar5-GigabitEthernet0/0/0]quit 
[ar5]int g  
[ar5]int GigabitEthernet 0/0/1
[ar5-GigabitEthernet0/0/1]ip ad 
[ar5-GigabitEthernet0/0/1]ip address 5.5.5.1 24
Mar  2 2020 14:41:40-08:00 ar5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
 on the interface GigabitEthernet0/0/1 has entered the UP state. 
[ar5-GigabitEthernet0/0/1]
*********************************************************************************************
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys ar8
[ar8]

  Please check whether system data has been changed, and save data in time

  Configuration console time out, please press any key to log on

<ar8>sys
Enter system view, return user view with Ctrl+Z.
[ar8]int    
[ar8]interface g    
[ar8]interface GigabitEthernet 0/0/0
[ar8-GigabitEthernet0/0/0]ip ad 
[ar8-GigabitEthernet0/0/0]ip address 5.5.5.2 24

第二步ospf协议配置

<ar1>sys
Enter system view, return user view with Ctrl+Z.
[ar1]ospf
[ar1-ospf-1]area 0
[ar1-ospf-1-area-0.0.0.0]net 1.1.1.0 0.0.0.255
[ar1-ospf-1-area-0.0.0.0]
上面配置错误 需要重新配置
使用undo 

[ar1-ospf-1-area-0.0.0.0]undo net 1.1.1.0 0.0.0.255
[ar1-ospf-1-area-0.0.0.0]quit
[ar1-ospf-1]undo area 0
[ar1-ospf-1]area 1
[ar1-ospf-1-area-0.0.0.1]
[ar1-ospf-1-area-0.0.0.1]net 1.1.1.0 0.0.0.255

**************************************************************************
<ar2>sys
Enter system view, return user view with Ctrl+Z.
[ar2]ospf
[ar2-ospf-1]area 1
[ar2-ospf-1-area-0.0.0.1]net 1.1.1.0 0.0.0.255
[ar2-ospf-1-area-0.0.0.1]area 0
[ar2-ospf-1-area-0.0.0.0]
[ar2-ospf-1-area-0.0.0.0]net 2.2.2.0 0.0.0.255
[ar2-ospf-1-area-0.0.0.0]
*******************************************************************************************
[ar3]ospf
[ar3-ospf-1]area 0
[ar3-ospf-1-area-0.0.0.0]net 2.0.0.0 0.0.0.255
[ar3-ospf-1-area-0.0.0.0]undo 2.0.0.0 0.0.0.255
                              ^
Error: Unrecognized command found at '^' position.
[ar3-ospf-1-area-0.0.0.0]undo net 2.0.0.0 0.0.0.25
[ar3-ospf-1-area-0.0.0.0]net 2.2.2.0 0.0.0.255
[ar3-ospf-1-area-0.0.0.0]net 3.3.3.0 0.0.0.255
*************************************************************************************************
<ar4>sys
Enter system view, return user view with Ctrl+Z.
[ar4]ospf
[ar4-ospf-1]area 0
[ar4-ospf-1-area-0.0.0.0]net 3.3.3.0 0.0.0.255
[ar4-ospf-1-area-0.0.0.0]area 2
[ar4-ospf-1-area-0.0.0.2]
[ar4-ospf-1-area-0.0.0.2]net 4.4.4.0 0.0.0.255
[ar4-ospf-1-area-0.0.0.2]
***********************************************************************************
<ar5>sys
Enter system view, return user view with Ctrl+Z.
[ar5]ospf
[ar5-ospf-1]area 2
[ar5-ospf-1-area-0.0.0.2]net 4.4.4.0 0.0.0.255
[ar5-ospf-1-area-0.0.0.2]
[ar5-ospf-1-area-0.0.0.2]area 3
[ar5-ospf-1-area-0.0.0.3]net 5.5.5.0 0.0.0.255
[ar5-ospf-1-area-0.0.0.3]
***************************************************************************************
<ar8>sys
Enter system view, return user view with Ctrl+Z.
[ar8]ospf   
[ar8-ospf-1]area 3
[ar8-ospf-1-area-0.0.0.3]net 5.5.5.0 0.0.0.255
[ar8-ospf-1-area-0.0.0.3]
*************************************************************************************

[ar1]dis ospf
              ^
Error:Incomplete command found at '^' position.
[ar1]dis ospf routing

     OSPF Process 1 with Router ID 1.1.1.1
          Routing Tables 

 Routing for Network 
 Destination        Cost  Type       NextHop         AdvRouter       Area
 1.1.1.0/24         1     Transit    1.1.1.1         1.1.1.1         0.0.0.1
 2.2.2.0/24         2     Inter-area 1.1.1.2         1.1.1.2         0.0.0.1
 3.3.3.0/24         3     Inter-area 1.1.1.2         1.1.1.2         0.0.0.1
 4.4.4.0/24         4     Inter-area 1.1.1.2         1.1.1.2         0.0.0.1

 Total Nets: 4  
 Intra Area: 1  Inter Area: 3  ASE: 0  NSSA: 0 
*************************************************************************************************************************************
[ar5-ospf-1]dis ospf pee    
[ar5-ospf-1]dis ospf peer 

     OSPF Process 1 with Router ID 4.4.4.2
         Neighbors 

 Area 0.0.0.2 interface 4.4.4.2(GigabitEthernet0/0/0)'s neighbors
 Router ID: 4.4.4.1          Address: 4.4.4.1         
   State: Full  Mode:Nbr is  Slave  Priority: 1
   DR: 4.4.4.1  BDR: 4.4.4.2  MTU: 0    
   Dead timer due in 35  sec 
   Retrans timer interval: 5 
   Neighbor is up for 00:05:28     
   Authentication Sequence: [ 0 ] 

         Neighbors 

 Area 0.0.0.3 interface 5.5.5.1(GigabitEthernet0/0/1)'s neighbors
 Router ID: 5.5.5.2          Address: 5.5.5.2         
   State: Full  Mode:Nbr is  Master  Priority: 1
   DR: 5.5.5.1  BDR: 5.5.5.2  MTU: 0    
   Dead timer due in 40  sec 
   Retrans timer interval: 5 
   Neighbor is up for 00:03:03     
   Authentication Sequence: [ 0 ] 
<ar4>dis ospf p 
<ar4>dis ospf peer 

     OSPF Process 1 with Router ID 4.4.4.1
         Neighbors 

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

         Neighbors 

 Area 0.0.0.2 interface 4.4.4.1(GigabitEthernet0/0/1)'s neighbors
 Router ID: 4.4.4.2          Address: 4.4.4.2         
   State: Full  Mode:Nbr is  Master  Priority: 1
   DR: 4.4.4.1  BDR: 4.4.4.2  MTU: 0    
   Dead timer due in 27  sec 
   Retrans timer interval: 5 
   Neighbor is up for 00:06:10     
   Authentication Sequence: [ 0 ] 
建立虚连接
[ar4]ospf
[ar4-ospf-1]area 2
[ar4-ospf-1-area-0.0.0.2]vl 
[ar4-ospf-1-area-0.0.0.2]vlink-peer 4.4.4.2
[ar4-ospf-1-area-0.0.0.2]

[ar5-ospf-1]area 2
[ar5-ospf-1-area-0.0.0.2]vl 
[ar5-ospf-1-area-0.0.0.2]vlink-peer 3.3.3.2
[ar5-ospf-1-area-0.0.0.2]

技术图片

技术图片

查看ospf的数据库
技术图片

ospf 多区域实验

标签:process   enc   区域   ***   save   image   roc   tran   comm   

原文地址:https://www.cnblogs.com/simp/p/12396786.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!