部署单区域OSPF网络
[AR1]ospf 1
[AR1-ospf-1]area 0
[AR1-ospf-1-area-0.0.0.0]network 172.16.10.0 0.0.0.255
[AR1-ospf-1-area-0.0.0.0]network 172.16.20.0 0.0.0.255
[AR1-ospf-1-area-0.0.0.0]network 172.16.1.0 0.0.0.255
[AR2]ospf 1
[AR2-ospf-1]area 0
[AR2-ospf-1-area-0.0.0.0]network 172.16.10.0 0.0.0.255
[AR2-ospf-1-area-0.0.0.0]network 172.16.30.0 0.0.0.255
[AR2-ospf-1-area-0.0.0.0]network 172.16.2.0 0.0.0.255
[AR3]ospf 1
[AR3-ospf-1]area 0
[AR3-ospf-1-area-0.0.0.0]network 172.16.20.0 0.0.0.255
[AR3-ospf-1-area-0.0.0.0]network 172.16.30.0 0.0.0.255
[AR3-ospf-1-area-0.0.0.0]network 172.16.3.0 0.0.0.255
查看OSPF的邻居状态
[AR1]display ospf peer
OSPF Process 1 with Router ID 172.16.1.254
Neighbors
Area 0.0.0.0 interface 172.16.20.1(GigabitEthernet0/0/1)'s neighbors
Router ID: 172.16.20.3 Address: 172.16.20.3
State: Full Mode:Nbr is Master Priority: 1
DR: 172.16.20.1 BDR: 172.16.20.3 MTU: 0
Dead timer due in 30 sec
Retrans timer interval: 5
Neighbor is up for 00:02:44
Authentication Sequence: [ 0 ]
Neighbors
Area 0.0.0.0 interface 172.16.10.1(GigabitEthernet0/0/0)'s neighbors
Router ID: 172.16.30.2 Address: 172.16.10.2
State: Full Mode:Nbr is Master Priority: 1
DR: 172.16.10.1 BDR: 172.16.10.2 MTU: 0
Dead timer due in 33 sec
Retrans timer interval: 5
Neighbor is up for 00:04:12
Authentication Sequence: [ 0 ]
查看OSPF路由表
[AR1]display ip routing-table protocol ospf
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : OSPF
Destinations : 3 Routes : 4
OSPF routing table status : <Active>
Destinations : 3 Routes : 4
Destination/Mask Proto Pre Cost Flags NextHop Interface
172.16.2.0/24 OSPF 10 2 D 172.16.10.2 GigabitEthernet
0/0/0
172.16.3.0/24 OSPF 10 2 D 172.16.20.3 GigabitEthernet
0/0/1
172.16.30.0/24 OSPF 10 2 D 172.16.10.2 GigabitEthernet
0/0/0
OSPF 10 2 D 172.16.20.3 GigabitEthernet
0/0/1
OSPF routing table status : <Inactive>
Destinations : 0 Routes : 0
多区域,还没做完。。。。。。。。。。。。。。