network
[R1]ospf 1 router-id 6.6.6.6
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 10.16.6.1 0.0.0.0
[R1-ospf-1-area-0.0.0.0]quit
接口下通告
[R1]int LoopBack 0
[R1-LoopBack0]dis this
[V200R003C00]
#
interface LoopBack0
 ip address 6.6.6.6 255.255.255.0 
#
return
[R1-LoopBack0]ospf enable area 0
OSPF虚链路
ospf 1
  area 0
    vlink-peer 3.3.3.3 (3.3.3.3 是对端的router-)
OSPF 路由表
[R2]display ip routing-table protocol ospf 
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : OSPF
         Destinations : 9        Routes : 9        

OSPF routing table status : <Active>
         Destinations : 9        Routes : 9

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        1.1.1.1/32  OSPF    10   1           D   10.1.12.1       GigabitEthernet
0/0/0
        3.3.3.3/32  OSPF    10   2           D   10.1.27.7       GigabitEthernet
0/0/1
        5.5.5.5/32  OSPF    10   1           D   10.1.12.5       GigabitEthernet
0/0/0
        6.6.6.6/32  OSPF    10   49          D   10.1.12.1       GigabitEthernet
0/0/0
        7.7.7.7/32  OSPF    10   1           D   10.1.27.7       GigabitEthernet
0/0/1
        8.8.8.8/32  OSPF    10   1           D   10.1.12.8       GigabitEthernet
0/0/0
        9.9.9.0/24  OSPF    10   2           D   10.1.27.7       GigabitEthernet
0/0/1
      10.1.16.0/24  OSPF    10   49          D   10.1.12.1       GigabitEthernet
0/0/0
      10.1.37.0/24  OSPF    10   2           D   10.1.27.7       GigabitEthernet
0/0/1
查看OSPF 邻居
[R1]dis ospf peer brief 

	 OSPF Process 1 with Router ID 1.1.1.1
		  Peer Statistic Information
 ----------------------------------------------------------------------------
 Area Id          Interface                        Neighbor id      State    
 0.0.0.0          GigabitEthernet0/0/0             2.2.2.2          Full        
 0.0.0.0          GigabitEthernet0/0/0             5.5.5.5          Full        
 0.0.0.0          GigabitEthernet0/0/0             8.8.8.8          Full        
 0.0.0.1          Serial2/0/0                      6.6.6.6          Full        
 ----------------------------------------------------------------------------
[R1]