OSPF原理、配置
R1
The device is running!
sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sys R1
[R1]int g0/0/2
[R1-GigabitEthernet0/0/2]ip address 192.168.1.254 24
[R1-GigabitEthernet0/0/2]int g0/0/0
[R1-GigabitEthernet0/0/0]ip address 192.168.12.1 24
[R1-GigabitEthernet0/0/0]ospf
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 192.168.1.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0]network 192.168.12.0 0.0.0.255
[R1]dis ospf peer brief
OSPF Process 1 with Router ID 192.168.1.254
Peer Statistic Information
Area Id Interface Neighbor id State
0.0.0.0 GigabitEthernet0/0/0 192.168.12.2 Full
R2
The device is running!
sys
[Huawei]sys R2
[R2]int g0/0/1
[R2-GigabitEthernet0/0/1]ip address 192.168.12.2 24
[R2-GigabitEthernet0/0/1]int g0/0/0
[R2-GigabitEthernet0/0/0]ip address 192.168.23.2 24
[R2-GigabitEthernet0/0/0]q
[R2] ospf
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]net
[R2-ospf-1-area-0.0.0.0]network 192.168.12.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]network 192.168.23.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]q
[R2-ospf-1]q
[R2]dis ospf peer br
OSPF Process 1 with Router ID 192.168.12.2
Peer Statistic Information