首页 > 其他分享 >ospf静态路由基础教程

ospf静态路由基础教程

时间:2024-11-11 16:50:29浏览次数:6  
标签:15 area 0.0 Huawei 基础教程 10.10 ospf 路由

 需要准备的设备如下(这边推荐把地址标出来防止敲的中途忘记)

  我们这边给PC1和PC2顺便配置好

 

第一步,我们需配置端口,这边我给需要配置的端口地址圈起来

我们已经清楚了每个路由器端口需要配置的地址,我们就可以开始配了 

!!!第一台路由器是需要配置4个端口不要忘了!!!

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip ad 10.10.12.1 24
Nov  8 2024 15:27:19-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocol
 IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[Huawei-GigabitEthernet0/0/0]int g0/0/2
[Huawei-GigabitEthernet0/0/2]ip ad 10.10.14.1 24
Nov  8 2024 15:28:26-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[1]:The line protocol
 IP on the interface GigabitEthernet0/0/2 has entered the UP state. 
[Huawei-GigabitEthernet0/0/2]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip ad 10.10.13.1 24
Nov  8 2024 15:28:54-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[2]:The line protocol
 IP on the interface GigabitEthernet0/0/1 has entered the UP state. 
[Huawei-GigabitEthernet0/0/1]int g4/0/0
[Huawei-GigabitEthernet4/0/0]ip ad 192.168.1.254 24
Nov  8 2024 15:30:47-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[3]:The line protocol
 IP on the interface GigabitEthernet4/0/0 has entered the UP state. 

 配置好了我们可以查看接口地址

[Huawei-GigabitEthernet4/0/0]di ip int b
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 5
The number of interface that is DOWN in Physical is 3
The number of interface that is UP in Protocol is 5
The number of interface that is DOWN in Protocol is 3

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              10.10.12.1/24        up         up        
GigabitEthernet0/0/1              10.10.13.1/24        up         up        
GigabitEthernet0/0/2              10.10.14.1/24        up         up        
GigabitEthernet4/0/0              192.168.1.254/24     up         up        
GigabitEthernet4/0/1              unassigned           down       down      
GigabitEthernet4/0/2              unassigned           down       down      
GigabitEthernet4/0/3              unassigned           down       down      
NULL0                             unassigned           up         up(s)     
[Huawei-GigabitEthernet4/0/0]

 接下来我们配置第二台

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip ad 10.10.12.2 24
Nov  8 2024 15:32:56-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocol
 IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[Huawei-GigabitEthernet0/0/0]int g0/0/2
[Huawei-GigabitEthernet0/0/2]ip ad 10.10.23.2 24
Nov  8 2024 15:33:19-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[1]:The line protocol
 IP on the interface GigabitEthernet0/0/2 has entered the UP state. 
[Huawei-GigabitEthernet0/0/2]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip ad 10.10.24.2 24
Nov  8 2024 15:33:53-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[2]:The line protocol
 IP on the interface GigabitEthernet0/0/1 has entered the UP state. 

看看配置的端口地址 

[Huawei-GigabitEthernet0/0/1]di ip int b
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 4
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 4

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              10.10.12.2/24        up         up        
GigabitEthernet0/0/1              10.10.24.2/24        up         up        
GigabitEthernet0/0/2              10.10.23.2/24        up         up        
GigabitEthernet4/0/0              unassigned           down       down      
GigabitEthernet4/0/1              unassigned           down       down      
GigabitEthernet4/0/2              unassigned           down       down      
GigabitEthernet4/0/3              unassigned           down       down      
NULL0                             unassigned           up         up(s)     
[Huawei-GigabitEthernet0/0/1]

 接下来第三台

<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip ad 10.10.13.3 24
Nov  8 2024 15:34:32-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocol
 IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[Huawei-GigabitEthernet0/0/0]int g0/0/2
[Huawei-GigabitEthernet0/0/2]ip ad 10.10.23.3 24
Nov  8 2024 15:35:32-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[1]:The line protocol
 IP on the interface GigabitEthernet0/0/2 has entered the UP state. 
[Huawei-GigabitEthernet0/0/2]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip ad 10.10.34.3 24
Nov  8 2024 15:37:05-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[2]:The line protocol
 IP on the interface GigabitEthernet0/0/1 has entered the UP state. 

看看端口配置地址情况

<Huawei>di ip int b
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 0
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 0

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              10.10.13.3/24        up         up        
GigabitEthernet0/0/1              10.10.34.3/24        up         up        
GigabitEthernet0/0/2              10.10.23.3/24        up         up        
NULL0                             unassigned           up         up(s)     
<Huawei>

 第四台我们也是需要配置4个端口不要忘了!!!

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip ad 10.10.34.4 24
[Huawei-GigabitEthernet0/0/1]
Nov  8 2024 15:40:37-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocol
 IP on the interface GigabitEthernet0/0/1 has entered the UP state. 
[Huawei-GigabitEthernet0/0/1]
[Huawei-GigabitEthernet0/0/1]int g0/0/2
[Huawei-GigabitEthernet0/0/2]ip ad 10.10.14.4 24
Nov  8 2024 15:41:56-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[1]:The line protocol
 IP on the interface GigabitEthernet0/0/2 has entered the UP state. 
[Huawei-GigabitEthernet0/0/2]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip ad 10.10.24.4 24
Nov  8 2024 15:42:18-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[2]:The line protocol
 IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[Huawei-GigabitEthernet0/0/0]int g4/0/0
[Huawei-GigabitEthernet4/0/0]ip ad 192.168.2.254 24
Nov  8 2024 15:42:45-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[3]:The line protocol
 IP on the interface GigabitEthernet4/0/0 has entered the UP state. 

 我们在看看端口配置地址有没有问题,每个路由器配置好记得检查一遍有没有配错

<Huawei>di ip int b
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 5
The number of interface that is DOWN in Physical is 3
The number of interface that is UP in Protocol is 5
The number of interface that is DOWN in Protocol is 3

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              10.10.24.4/24        up         up        
GigabitEthernet0/0/1              10.10.34.4/24        up         up        
GigabitEthernet0/0/2              10.10.14.4/24        up         up        
GigabitEthernet4/0/0              192.168.2.254/24     up         up        
GigabitEthernet4/0/1              unassigned           down       down      
GigabitEthernet4/0/2              unassigned           down       down      
GigabitEthernet4/0/3              unassigned           down       down      
NULL0                             unassigned           up         up(s)     
<Huawei>

 端口地址我们配好了,接下来我们就需要让线路通畅

第一台:

[Huawei-ospf-1-area-0.0.0.0]  n 10.10.12.0   0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]  n 10.10.13.0   0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]  n 10.10.14.0   0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]  n 192.168.1.0  0.0.0.255

[Huawei]o   r 1.1.1.1
[Huawei-ospf-1]a	
[Huawei-ospf-1]area 0
[Huawei-ospf-1-area-0.0.0.0]n 10.10.12.0   0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]n 10.10.13.0   0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]n 10.10.14.0   0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]n 192.168.1.0  0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]
Nov  8 2024 15:45:43-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[0]:Neighbor changes
 event: neighbor status changed. (ProcessId=256, NeighborAddress=2.12.10.10, Nei
ghborEvent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init)
 
[Huawei-ospf-1-area-0.0.0.0]
Nov  8 2024 15:45:53-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[1]:Neighbor changes
 event: neighbor status changed. (ProcessId=256, NeighborAddress=2.12.10.10, Nei
ghborEvent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=ExStar
t) 
[Huawei-ospf-1-area-0.0.0.0]
Nov  8 2024 15:45:53-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[2]:Neighbor changes
 event: neighbor status changed. (ProcessId=256, NeighborAddress=2.12.10.10, Nei
ghborEvent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=
Exchange) 
[Huawei-ospf-1-area-0.0.0.0]
Nov  8 2024 15:45:53-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[3]:Neighbor changes
 event: neighbor status changed. (ProcessId=256, NeighborAddress=2.12.10.10, Nei
ghborEvent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Lo
ading) 
[Huawei-ospf-1-area-0.0.0.0]
Nov  8 2024 15:45:53-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[4]:Neighbor changes
 event: neighbor status changed. (ProcessId=256, NeighborAddress=2.12.10.10, Nei
ghborEvent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full
) 
[Huawei-ospf-1-area-0.0.0.0]
Nov  8 2024 15:46:53-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[5]:Neighbor changes
 event: neighbor status changed. (ProcessId=256, NeighborAddress=3.13.10.10, Nei
ghborEvent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init)
 
[Huawei-ospf-1-area-0.0.0.0]
Nov  8 2024 15:46:54-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[6]:Neighbor changes
 event: neighbor status changed. (ProcessId=256, NeighborAddress=3.13.10.10, Nei
ghborEvent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=ExStar
t) 
[Huawei-ospf-1-area-0.0.0.0]
Nov  8 2024 15:46:54-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[7]:Neighbor changes
 event: neighbor status changed. (ProcessId=256, NeighborAddress=3.13.10.10, Nei
ghborEvent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=
Exchange) 
[Huawei-ospf-1-area-0.0.0.0]
Nov  8 2024 15:46:55-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[8]:Neighbor changes
 event: neighbor status changed. (ProcessId=256, NeighborAddress=3.13.10.10, Nei
ghborEvent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Lo
ading) 
[Huawei-ospf-1-area-0.0.0.0]
Nov  8 2024 15:46:55-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[9]:Neighbor changes
 event: neighbor status changed. (ProcessId=256, NeighborAddress=3.13.10.10, Nei
ghborEvent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full
) 
[Huawei-ospf-1-area-0.0.0.0]
Nov  8 2024 15:48:16-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[10]:Neighbor change
s event: neighbor status changed. (ProcessId=256, NeighborAddress=4.14.10.10, Ne
ighborEvent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init
) 
[Huawei-ospf-1-area-0.0.0.0]
Nov  8 2024 15:48:20-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[11]:Neighbor change
s event: neighbor status changed. (ProcessId=256, NeighborAddress=4.14.10.10, Ne
ighborEvent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=ExSta
rt) 
[Huawei-ospf-1-area-0.0.0.0]
Nov  8 2024 15:48:20-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[12]:Neighbor change
s event: neighbor status changed. (ProcessId=256, NeighborAddress=4.14.10.10, Ne
ighborEvent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState
=Exchange) 
[Huawei-ospf-1-area-0.0.0.0]
Nov  8 2024 15:48:20-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[13]:Neighbor change
s event: neighbor status changed. (ProcessId=256, NeighborAddress=4.14.10.10, Ne
ighborEvent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=L
oading) 
[Huawei-ospf-1-area-0.0.0.0]
Nov  8 2024 15:48:20-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[14]:Neighbor change
s event: neighbor status changed. (ProcessId=256, NeighborAddress=4.14.10.10, Ne
ighborEvent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Ful
l) 

我们配置好第一台路由器接下来就需要让剩下的路由器的配置好 

 第二台:
[Huawei-ospf-1-area-0.0.0.0]  n  10.10.23.0   0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]  n  10.10.24.0   0.0.0.255

[Huawei-ospf-1-area-0.0.0.0]  n  10.10.12.0   0.0.0.255

第二台路由器:


[Huawei]o   r  2.2.2.2
[Huawei-ospf-1]a	
[Huawei-ospf-1]area 0
[Huawei-ospf-1-area-0.0.0.0]n  10.10.12.0   0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]n  10.10.23.0   
Nov  8 2024 15:45:52-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[0]:Neighbor changes
 event: neighbor status changed. (ProcessId=256, NeighborAddress=1.12.10.10, Nei
ghborEvent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init)
 
[Huawei-ospf-1-area-0.0.0.0]n  10.10.23.0   
Nov  8 2024 15:45:52-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[1]:Neighbor changes
 event: neighbor status changed. (ProcessId=256, NeighborAddress=1.12.10.10, Nei
ghborEvent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=2Way) 

[Huawei-ospf-1-area-0.0.0.0]n  10.10.23.0   
Nov  8 2024 15:45:52-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[2]:Neighbor changes
 event: neighbor status changed. (ProcessId=256, NeighborAddress=1.12.10.10, Nei
ghborEvent=AdjOk?, NeighborPreviousState=2Way, NeighborCurrentState=ExStart) 
[Huawei-ospf-1-area-0.0.0.0]n  10.10.23.0   0
Nov  8 2024 15:45:52-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[3]:Neighbor changes
 event: neighbor status changed. (ProcessId=256, NeighborAddress=1.12.10.10, Nei
ghborEvent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=
Exchange) 
[Huawei-ospf-1-area-0.0.0.0]n  10.10.23.0   0
Nov  8 2024 15:45:53-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[4]:Neighbor changes
 event: neighbor status changed. (ProcessId=256, NeighborAddress=1.12.10.10, Nei
ghborEvent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Lo
ading) 
[Huawei-ospf-1-area-0.0.0.0]n  10.10.23.0   0
Nov  8 2024 15:45:53-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[5]:Neighbor changes
 event: neighbor status changed. (ProcessId=256, NeighborAddress=1.12.10.10, Nei
ghborEvent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full
) 
[Huawei-ospf-1-area-0.0.0.0]n  10.10.23.0   0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]n  10.10.24.0   0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]
Nov  8 2024 15:48:05-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[6]:Neighbor changes
 event: neighbor status changed. (ProcessId=256, NeighborAddress=4.24.10.10, Nei
ghborEvent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init)
 
[Huawei-ospf-1-area-0.0.0.0]
Nov  8 2024 15:48:06-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[7]:Neighbor changes
 event: neighbor status changed. (ProcessId=256, NeighborAddress=4.24.10.10, Nei
ghborEvent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=ExStar
t) 
[Huawei-ospf-1-area-0.0.0.0]
Nov  8 2024 15:48:06-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[8]:Neighbor changes
 event: neighbor status changed. (ProcessId=256, NeighborAddress=4.24.10.10, Nei
ghborEvent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=
Exchange) 
[Huawei-ospf-1-area-0.0.0.0]
Nov  8 2024 15:48:06-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[9]:Neighbor changes
 event: neighbor status changed. (ProcessId=256, NeighborAddress=4.24.10.10, Nei
ghborEvent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Lo
ading) 
[Huawei-ospf-1-area-0.0.0.0]
Nov  8 2024 15:48:07-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[10]:Neighbor change
s event: neighbor status changed. (ProcessId=256, NeighborAddress=4.24.10.10, Ne
ighborEvent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Ful
l) 
[Huawei-ospf-1-area-0.0.0.0]

 第三台:

[Huawei-ospf-1-area-0.0.0.0]  n  10.10.14.0   0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]  n  10.10.34.0  0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]  n  10.10.13.0   0.0.0.255

第三台路由器:


<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]o   r  3.3.3.3
[Huawei-ospf-1]a 0
[Huawei-ospf-1-area-0.0.0.0]n  10.10.13.0   0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]n 
Nov  8 2024 15:46:54-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[0]:Neighbor changes
 event: neighbor status changed. (ProcessId=256, NeighborAddress=1.13.10.10, Nei
ghborEvent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init)
 
[Huawei-ospf-1-area-0.0.0.0]n 
Nov  8 2024 15:46:54-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[1]:Neighbor changes
 event: neighbor status changed. (ProcessId=256, NeighborAddress=1.13.10.10, Nei
ghborEvent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=2Way) 

[Huawei-ospf-1-area-0.0.0.0]n  
Nov  8 2024 15:46:54-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[2]:Neighbor changes
 event: neighbor status changed. (ProcessId=256, NeighborAddress=1.13.10.10, Nei
ghborEvent=AdjOk?, NeighborPreviousState=2Way, NeighborCurrentState=ExStart) 
[Huawei-ospf-1-area-0.0.0.0]n  
Nov  8 2024 15:46:54-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[3]:Neighbor changes
 event: neighbor status changed. (ProcessId=256, NeighborAddress=1.13.10.10, Nei
ghborEvent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=
Exchange) 
[Huawei-ospf-1-area-0.0.0.0]n  
Nov  8 2024 15:46:55-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[4]:Neighbor changes
 event: neighbor status changed. (ProcessId=256, NeighborAddress=1.13.10.10, Nei
ghborEvent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Lo
ading) 
[Huawei-ospf-1-area-0.0.0.0]n  
Nov  8 2024 15:46:55-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[5]:Neighbor changes
 event: neighbor status changed. (ProcessId=256, NeighborAddress=1.13.10.10, Nei
ghborEvent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full
) 
[Huawei-ospf-1-area-0.0.0.0]n  10.10.14.0   0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]n  10.10.34.0  0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]
Nov  8 2024 15:48:31-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[6]:Neighbor changes
 event: neighbor status changed. (ProcessId=256, NeighborAddress=4.34.10.10, Nei
ghborEvent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init)
 
[Huawei-ospf-1-area-0.0.0.0]
Nov  8 2024 15:48:36-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[7]:Neighbor changes
 event: neighbor status changed. (ProcessId=256, NeighborAddress=4.34.10.10, Nei
ghborEvent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=ExStar
t) 
[Huawei-ospf-1-area-0.0.0.0]
Nov  8 2024 15:48:36-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[8]:Neighbor changes
 event: neighbor status changed. (ProcessId=256, NeighborAddress=4.34.10.10, Nei
ghborEvent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=
Exchange) 
[Huawei-ospf-1-area-0.0.0.0]
Nov  8 2024 15:48:36-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[9]:Neighbor changes
 event: neighbor status changed. (ProcessId=256, NeighborAddress=4.34.10.10, Nei
ghborEvent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Lo
ading) 
[Huawei-ospf-1-area-0.0.0.0]
Nov  8 2024 15:48:36-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[10]:Neighbor change
s event: neighbor status changed. (ProcessId=256, NeighborAddress=4.34.10.10, Ne
ighborEvent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Ful
l) 
[Huawei-ospf-1-area-0.0.0.0]

第四台路由器:

 [Huawei-ospf-1-area-0.0.0.0]  n 10.10.24.0   0.0.0.255

[Huawei-ospf-1-area-0.0.0.0]  n 10.10.14.0  0.0.0.255

[Huawei-ospf-1-area-0.0.0.0]  n 10.10.34.0   0.0.0.255

[Huawei-ospf-1-area-0.0.0.0  ]n  192.168.2.0    0.0.0.255

第四台路由器:


[Huawei]o   r  4.4.4.4
[Huawei-ospf-1]a 0
[Huawei-ospf-1-area-0.0.0.0]n 10.10.24.0   0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]
Nov  8 2024 15:48:05-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[4]:Neighbor changes
 event: neighbor status changed. (ProcessId=256, NeighborAddress=2.24.10.10, Nei
ghborEvent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init)
 
[Huawei-ospf-1-area-0.0.0.0]
Nov  8 2024 15:48:05-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[5]:Neighbor changes
 event: neighbor status changed. (ProcessId=256, NeighborAddress=2.24.10.10, Nei
ghborEvent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=2Way) 

[Huawei-ospf-1-area-0.0.0.0]
Nov  8 2024 15:48:05-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[6]:Neighbor changes
 event: neighbor status changed. (ProcessId=256, NeighborAddress=2.24.10.10, Nei
ghborEvent=AdjOk?, NeighborPreviousState=2Way, NeighborCurrentState=ExStart) 
[Huawei-ospf-1-area-0.0.0.0]
Nov  8 2024 15:48:06-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[7]:Neighbor changes
 event: neighbor status changed. (ProcessId=256, NeighborAddress=2.24.10.10, Nei
ghborEvent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=
Exchange) 
[Huawei-ospf-1-area-0.0.0.0]
Nov  8 2024 15:48:06-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[8]:Neighbor changes
 event: neighbor status changed. (ProcessId=256, NeighborAddress=2.24.10.10, Nei
ghborEvent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Lo
ading) 
[Huawei-ospf-1-area-0.0.0.0]
Nov  8 2024 15:48:06-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[9]:Neighbor changes
 event: neighbor status changed. (ProcessId=256, NeighborAddress=2.24.10.10, Nei
ghborEvent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full
) 
[Huawei-ospf-1-area-0.0.0.0]n 10.10.14.0  0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]n 
Nov  8 2024 15:48:18-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[10]:Neighbor change
s event: neighbor status changed. (ProcessId=256, NeighborAddress=1.14.10.10, Ne
ighborEvent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init
) 
[Huawei-ospf-1-area-0.0.0.0]n 
Nov  8 2024 15:48:18-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[11]:Neighbor change
s event: neighbor status changed. (ProcessId=256, NeighborAddress=1.14.10.10, Ne
ighborEvent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=2Way)
 
[Huawei-ospf-1-area-0.0.0.0]n 
Nov  8 2024 15:48:18-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[12]:Neighbor change
s event: neighbor status changed. (ProcessId=256, NeighborAddress=1.14.10.10, Ne
ighborEvent=AdjOk?, NeighborPreviousState=2Way, NeighborCurrentState=ExStart) 
[Huawei-ospf-1-area-0.0.0.0]n 
Nov  8 2024 15:48:19-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[13]:Neighbor change
s event: neighbor status changed. (ProcessId=256, NeighborAddress=1.14.10.10, Ne
ighborEvent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState
=Exchange) 
[Huawei-ospf-1-area-0.0.0.0]n 
Nov  8 2024 15:48:19-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[14]:Neighbor change
s event: neighbor status changed. (ProcessId=256, NeighborAddress=1.14.10.10, Ne
ighborEvent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=L
oading) 
[Huawei-ospf-1-area-0.0.0.0]n 
Nov  8 2024 15:48:19-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[15]:Neighbor change
s event: neighbor status changed. (ProcessId=256, NeighborAddress=1.14.10.10, Ne
ighborEvent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Ful
l) 
[Huawei-ospf-1-area-0.0.0.0]n 10.10.34.0   0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]n  192.16
Nov  8 2024 15:48:35-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[16]:Neighbor change
s event: neighbor status changed. (ProcessId=256, NeighborAddress=3.34.10.10, Ne
ighborEvent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init
) 
[Huawei-ospf-1-area-0.0.0.0]n  192.16
Nov  8 2024 15:48:35-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[17]:Neighbor change
s event: neighbor status changed. (ProcessId=256, NeighborAddress=3.34.10.10, Ne
ighborEvent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=2Way)
 
[Huawei-ospf-1-area-0.0.0.0]n  192.16
Nov  8 2024 15:48:35-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[18]:Neighbor change
s event: neighbor status changed. (ProcessId=256, NeighborAddress=3.34.10.10, Ne
ighborEvent=AdjOk?, NeighborPreviousState=2Way, NeighborCurrentState=ExStart) 
[Huawei-ospf-1-area-0.0.0.0]n  192.168
Nov  8 2024 15:48:35-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[19]:Neighbor change
s event: neighbor status changed. (ProcessId=256, NeighborAddress=3.34.10.10, Ne
ighborEvent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState
=Exchange) 
[Huawei-ospf-1-area-0.0.0.0]n  192.168
Nov  8 2024 15:48:35-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[20]:Neighbor change
s event: neighbor status changed. (ProcessId=256, NeighborAddress=3.34.10.10, Ne
ighborEvent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=L
oading) .
[Huawei-ospf-1-area-0.0.0.0]n  192.168
Nov  8 2024 15:48:35-08:00 Huawei %%01OSPF/4/NBR_CHANGE_E(l)[21]:Neighbor change
s event: neighbor status changed. (ProcessId=256, NeighborAddress=3.34.10.10, Ne
ighborEvent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Ful
l) 
[Huawei-ospf-1-area-0.0.0.0]n  192.168.2.0    0.0.0.255
[Huawei-ospf-1-area-0.0.0.0]

 配置好了让我们来看看两台PC有没有互通

 PC1

PC>ping 192.168.2.1

Ping 192.168.2.1: 32 data bytes, Press Ctrl_C to break
Request timeout!
From 192.168.2.1: bytes=32 seq=2 ttl=126 time=47 ms
From 192.168.2.1: bytes=32 seq=3 ttl=126 time=31 ms
From 192.168.2.1: bytes=32 seq=4 ttl=126 time=78 ms
From 192.168.2.1: bytes=32 seq=5 ttl=126 time=16 ms

--- 192.168.2.1 ping statistics ---
  5 packet(s) transmitted
  4 packet(s) received
  20.00% packet loss
  round-trip min/avg/max = 0/43/78 ms

PC>

PC2

PC>ping 192.168.1.1

Ping 192.168.1.1: 32 data bytes, Press Ctrl_C to break
Request timeout!
From 192.168.1.1: bytes=32 seq=2 ttl=126 time=31 ms
From 192.168.1.1: bytes=32 seq=3 ttl=126 time=78 ms
From 192.168.1.1: bytes=32 seq=4 ttl=126 time=31 ms
From 192.168.1.1: bytes=32 seq=5 ttl=126 time=31 ms

--- 192.168.1.1 ping statistics ---
  5 packet(s) transmitted
  4 packet(s) received
  20.00% packet loss
  round-trip min/avg/max = 0/42/78 ms

PC>

 这样两台PC就通了

标签:15,area,0.0,Huawei,基础教程,10.10,ospf,路由
From: https://blog.csdn.net/2401_87324718/article/details/143628976

相关文章

  • 路由器
    路由器:从源主机到目标主机的转发过程工作原理:路由选择和数据传输路由选择:根据路由表选择最佳的路径数据传输:路由器将一个数据包从一个网络路由器接收数据包,提取目标IP地址及子网掩码计算目标网络地址,根据目标玩过地址查找路由表,如果找到目标网络地址,就按照相应的出口发送到......
  • vue3中利用路由信息渲染菜单栏
    1.创建路由时将路由信息对象进行抽离将路由信息对象单独抽离到router/routes.ts文件关键:利用路由元信息meta,定义3个属性hidden:控制当前路由是否显示在菜单栏中title:菜单拦名称icon:对应菜单名称前面的图标//对外暴露配置路由(常量路由)exportconstconstantRout=[{......
  • 在vue项目中如何实现权限控制,菜单权限,按钮权限,接口权限,路由权限,操作权限,数据权限如何
    在实际项目开发中,权限管理是一个关键功能,用于控制不同用户对系统资源的访问。权限是对特定资源的访问许可,权限控制的目的是确保用户只能访问到被分配的资源。例如,网站管理员可以对网站数据进行增删改查,而普通用户只能浏览。权限管理的分类根据功能的不同,权限控制可以分为......
  • 1. Python基础教程
    1.1Python简介与安装Python简介Python是一种广泛使用的高级编程语言,由GuidovanRossum于1991年开发,设计之初注重代码的可读性和简洁性。Python被广泛用于Web开发、数据分析、人工智能、自动化、科学计算等领域。Python支持多种编程范式,包括面向对象编程、过程化编程和函数......
  • Ensp静态路由配置
    Ensp静态配置详解一、基本概念静态路由 是一种通过手动配置路由表来指导数据包转发的方式。在网络中,管理员需要手动添加路由条目,指定目标网络的下一跳地址。静态路由具有配置简单、资源消耗少、安全性高等优点,但也存在无法动态适应网络变化、维护困难等问题。 eNSP 是华......
  • NETCONF 是由 IETF (Internet Engineering Task Force) 提出的一个标准化协议,目标是
    WindowsNetConf(NetworkConfiguration)是Windows操作系统中用于网络配置管理的框架,通常涉及自动化网络配置、管理网络接口和相关网络设置。它提供了一组API和命令行工具,允许管理员和应用程序配置、查询和管理网络设置。什么:NetConf是Windows中用于网络接口配置的功能,可以......
  • 第三十四章 Vue路由进阶之声明式导航(导航高亮)
    目录一、导航高亮1.1.基于语法1.2.主要代码 二、声明式导航的两个类名2.1.声明式导航类名匹配方式2.2.声明式导航类名样式自定义 ​2.3.核心代码一、导航高亮1.1.基于语法在Vue中通过VueRouter插件,我们可以非常简单的实现实现导航高亮效果VueRouter提......
  • 笔记--(网络5)、VRRP虚拟路由
    VRRP概述通过把几台路由设备联合组成一台虚拟的“路由设备”,使用一定的机制保证当主机的下一跳路由设备出现故障时,及时将业务切换到备份路由设备,从而保持通讯的连续性和可靠性。VRRP术语VRRP路由器运行VRRP协议的路由器,如R1和R2。VRRP是配置在路由器的接口上的,而且也是......
  • Java面试系列-SpringCloud面试题20道,服务注册与发现,断路器,智能路由,熔断,追踪,网关,调用,限
    文章目录1.SpringCloud是什么?2.SpringCloud中的服务注册与发现是如何工作的?3.SpringCloud中的配置管理是如何工作的?4.SpringCloud中的断路器(Hystrix)是如何工作的?5.SpringCloud中的智能路由(Zuul)是如何工作的?6.SpringCloud中的服务熔断(Resilience4j)......
  • 思科设备配置静态路由
    1.环境搭建2.基础配置 地址从左到右分别为192.168.1.0/24,192.168.2.0/24 ,192.168.3.0/24 ,192.168.4.0/24PC0路由器0路由器1路由2PC23.配置路由分析:静态路由每一跳都需要你手写,所以在路由器上0要配置去往192.168.3.0192.168.4.0的地址,环回口地址是单独......