Two sets of commands enable you to monitor OSPF operation on your router: the debug and the show commands. Both sets of commands provide information about your router’s OSPF state and configuration.
The task you are performing with each of these monitoring commands is basically the same for each command; that is, you are requesting information. The results of this request can vary. For instance, the debug commands provide information (some of which is dynamically obtained from router logs) about problems with the network or the router, whereas the show commands provide information about the actual state and configuration of your router.
The debug commands provide information about the following OSPF items:
debug ip ospf
debug ipv6 ospf
- host1#debug ip ospf adj
- host1#debug ipv6 ospf lsa
ospf log-adjacency-changes
- host1(config-router)#ospf log-adjacency-changes
undebug ip ospf
undebug ipv6 ospf
- host1#undebug ip ospf adj
- host1#undebug ipv6 ospf lsa
The show commands provide information about the following OSPFv2 and OSPFv3 items:
You can use the output filtering feature of the show command to include or exclude lines of output based on a text string you specify. See Command-Line Interface in the JUNOSe System Basics Configuration Guide, for details.
show ip ospf
show ipv6 ospf
host1#show ip ospf
Routing Process OSPF 1 with Router ID, 0.0.0.0, Domain ID 0.0.0.0
OSPF administrative state is enabled
OSPF operational state is disabled
Incremental External SPF is ON
Graceful Restart Capability is ON
Time limit to complete graceful restart 180 seconds
Time limit to flush grace LSAs 15 seconds
Graceful Restart Helper Capability is OFF
Graceful Restart Help Not Aborted On Topology Change
Ospf set trap field disabled
OSPF Statistics:
Rcvd: 0 total, 0 checksum errors
0 hello, 0 database desc, 0 link state req
0 link state updates, 0 link state acks
Sent: 0 total, 0 pkts dropped
0 hello, 0 database desc, 0 link state req
0 link state updates, 0 link state acks
LSA discard count: 0
Supports only single TOS(TOS0) routes
SPF schedule delay 0 secs, Hold time between two SPFs 3 secs
Maximum path splits 4
Number of active areas in this router is 0
0 normal, 0 stub, 0 NSSA.
host1#show ip ospf
Routing Process OSPF 4 with Router ID, 10.0.0.1, Domain ID 0.0.0
OSPF administrative state is enabled
OSPF operational state is enabled
Incremental External SPF is ON
Graceful Restart Capability is OFF
Graceful Restart Helper Capability is OFF
Graceful Restart Help Not Aborted On Topology Change
Ospf set trap field disabled
OSPF Statistics:
Rcvd: 0 total, 0 pkts dropped, 0 checksum errors
0 hello, 0 database desc, 0 link state req
0 link state updates, 0 link state acks
Sent: 1 total, 0 pkts dropped
1 hello, 0 database desc, 0 link state req
0 link state updates, 0 link state acks
LSA discard count: 0
Supports only single TOS(TOS0) routes
SPF schedule delay 0 secs, Hold time between two SPFs 3 secs
Maximum path splits 4
Area BACKBONE(0.0.0.0)
SPF algorithm executed 5 times
ABDR count 0
ASBDR count 0
LSA Count 1
Number of interfaces in this area is 1
Area ranges are:
Area 0.0.0.1
Area is a stub area
Type-3 summary is filtered
SPF algorithm executed 5 times
ABDR count 0
ASBDR count 0
LSA Count 0
Number of interfaces in this area is 0
Area ranges are:
Area 0.0.0.2
Area is nssa
Type-3 summary is filtered
SPF algorithm executed 4 times
ABDR count 0
ASBDR count 0
LSA Count 0
Number of interfaces in this area is 0
Area ranges are:
Area 0.0.0.5
Area is nssa
SPF algorithm executed 3 times
ABDR count 0
ASBDR count 0
LSA Count 0
Number of interfaces in this area is 0
Area ranges are:
Number of active areas in this router is 4
1 normal, 1 stub, 2 NSSA.
host1#show ipv6 ospf Routing Process OSPFv3 1 with Router ID 10.1.1.1 OSPFv3 administrative state is enabled OSPFv3 operational state is enabled Incremental External SPF is OFF Graceful Restart capability is OFF Graceful Restart helper capability is OFF Ospf set trap field disabled SPF schedule delay 0 secs, Hold time between two SPFs 3 secs Maximum path splits 4 Area BACKBONE(0.0.0.0) SPF algorithm executed 13 times ABDR count 1 ASBDR count 1 LSA Count 117 Number of interfaces in this area is 3 Area ranges are: Number of active areas in this router is 1 1normal, 0 stub, 0 NSSA.
show ip ospf border-routers
show ipv6 ospf border-routers
host1#show ip ospf border-routers Destination NEXT HOP Interface Router Type Route Type Area 5.5.0.250 5.5.6.250 fastethernet0 ABR/ASBR INTRA 0.0.0.0 5.5.0 250 4.4.4.250 fastethernet0 ABR/ASBR INTRA 0.0.0.1 6.6.6.250 4.4.4.13 fastethernet0 ABR INTRA 0.0.0.1
host1#show ipv6 ospf border-routers
OSPF Area Border Routers
Destination NEXT_HOP Interface RouteType Area
10.0.0.10 FE80::3 ATM4/1.39 INTRA 0.0.0.0
10.0.0.11 FE80::4 ATM4/0.41 INTRA 0.0.0.0
10.0.0.11 FE80::5 ATM4/1.48 INTRA 100.0.0.1
OSPF Autonomous System Border Routers
Destination NEXT_HOP Interface RouteType Area
10.1.1.4 FE80::3 ATM4/1.39 INTER 0.0.0.0
10.1.1.5 FE80::4 ATM4/0.41 INTER 0.0.0.0
show ip ospf database
show ipv6 ospf database
host1#show ip ospf database OSPF Database
Router Link States (Area 0.0.0.0)
Link ID ADV Router Age Seq# Checksum 5.1.101.1 5.1.101.1 932 0x80000069 0x102f 192.168.1.13 192.168.1.13 1763 0x80000099 0xaa4e 192.168.1.10 192.168.1.10 285 0x80000087 0xada6 192.168.1.11 192.168.1.11 401 0x80000087 0xaba5 192.168.24.6 192.168.24.6 622 0x800005bf 0x6087
Network Link States (Area 0.0.0.0)
Link ID ADV Router Age Seq# Checksum 56.56.56.220 5.6.6.1 499 0x80000069 0x26a0 192.168.1.12 192.168.254.6 622 0x8000009e 0xebc2
Summary Link States (Area 0.0.0.0)
Link ID ADV Router Age Seq# Checksum 4.4.4.0 5.5.0.250 497 0x8000005a 0x2ca6 4.4.4.0 192.168.1.13 528 0x80000059 0x 45d
AS Summary Link States (Area 0.0.0.0)
Link ID ADV Router Age Seq# Checksum 5.5.0.250 192.168.1.13 491 0x80000002 0xe9d4
AS External Link States
Link ID ADV Router Age Seq# Checksum 8.8.8.0 5.5.0.250 502 0x8000005f 0x2d67
Router Link States (Area 0.0.0.1)
Link ID ADV Router Age Seq# Checksum 5.5.0.250 5.5.0.250 498 0x80000067 0xdec1 192.168.1.13 192.168.1.13 505 0x800000a5 0x3b32
Network Link States (Area 0.0.0.1)
Link ID ADV Router Age Seq# Checksum 4.4.4.13 192.168.1.13 505 0x80000001 0x410b 5.1.0.0 192.168.1.13 940 0x80000059 0x82c4 5.2.0.0 5.5.0.250 495 0x80000001 0x51bf 5.2.0.0 192.168.1.13 932 0x80000059 0x76cf 5.3.0.0 5.5.0.250 495 0x80000001 0x45ca 5.3.0.0 192.168.1.13 932 0x80000059 0x6ada 56.56.56.0 5.5.0.250 495 0x80000062 0xc469
AS Summary Link States (Area 0.0.0.1)
Link ID ADV Router Age Seq# Checksum 5.5.0.250 5.5.0.250 496 0x800000001 0x51c0
host1#show ipv6 ospf database
OSPF Database
V3 Router Link States (Area 0.0.0.0)
Link ID ADV Router Age Seq# Checksum 0.0.0.0 2.2.2.2 167 0x80000003 0xa9e3 0.0.0.0 3.3.3.3 168 0x80000002 0x2c63
V3 Inter-Area Net Link States (Area 0.0.0.0)
Link ID ADV Router Age Seq# Checksum 0.0.0.1 2.2.2.2 33 0x80000004 0x5288
V3 Inter-Area Router Link States (Area 0.0.0.0)
Link ID ADV Router Age Seq# Checksum 0.0.0.1 2.2.2.2 33 0x80000001 0x a0f
V3 Intra-Area Prefix Link States (Area 0.0.0.0)
Link ID ADV Router Age Seq# Checksum 0.0.0.1 2.2.2.2 167 0x80000003 0xc8ba 0.0.0.1 3.3.3.3 168 0x80000003 0xdc9e
V3 Link Link States (Area 0.0.0.0)
Link ID ADV Router Age Seq# Checksum 50.0.0.10 2.2.2.2 178 0x80000001 0xb51d 50.0.0.13 3.3.3.3 178 0x80000001 0x8c3e
V3 Router Link States (Area 0.0.0.1)
Link ID ADV Router Age Seq# Checksum 0.0.0.0 1.1.1.1 40 0x80000003 0xf7a4 0.0.0.0 2.2.2.2 168 0x80000003 0x7825
V3 Inter-Area Net Link States (Area 0.0.0.1)
Link ID ADV Router Age Seq# Checksum 0.0.0.2 2.2.2.2 33 0x80000004 0x6a4f
V3 Intra-Area Prefix Link States (Area 0.0.0.1)
Link ID ADV Router Age Seq# Checksum 0.0.0.1 1.1.1.1 169 0x80000003 0x911a 0.0.0.1 2.2.2.2 168 0x80000003 0xa5fd
V3 Link Link States (Area 0.0.0.1)
Link ID ADV Router Age Seq# Checksum
50.0.0.6 1.1.1.1 180 0x80000001 0x44b7
50.0.0.9 2.2.2.2 178 0x80000001 0x1bd8
V3 External Link States
Link ID ADV Router Age Seq# Checksum 0.0.0.1 1.1.1.1 40 0x80000001 0xe5a0
host1:v2#show ipv6 ospf database database-summary Area Router Network Intra-Prefix Inter-Prefix Inter-Router ------- ------ ------- ------------ ------------ ------------ 0.0.0.0 2 1 3 0 0 Area MaxAge ------- ------ 0.0.0.0 0
Link LSAs: 2, Max age: 0 Grace LSAs: 1, Max age: 0 External LSAs: 0, Max age: 0
host1#show ipv6 ospf database router
V3 Router Link States (Area 0.0.0.0)
LS age: 433
Options: ( V6-Bit , R-Bit , ExternalRoutingCapability, No Nssa-LSA)
LS Type: Router Links
Link State ID: 0.0.0.0
Advertising Router: 1.1.1.1
LS Seq Number: 0x80000002
Checksum: 0x c90
Length: 40
Bit E set
Link connected to: a Point To Point Network
Neighboring router's Router Id: 2.2.2.2
Neighboring router's Interface Id: 0x3200000a
Local Interface ID : 0x32000006
Metric 1
LS age: 432 Options: ( V6-Bit , R-Bit , ExternalRoutingCapability, No Nssa-LSA) LS Type: Router Links Link State ID: 0.0.0.0 Advertising Router: 2.2.2.2 LS Seq Number: 0x80000002 Checksum: 0x8519 Length: 40
Link connected to: a Point To Point Network
Neighboring router's Router Id: 1.1.1.1
Neighboring router's Interface Id: 0x32000006
Local Interface ID : 0x3200000a
Metric 1
host1#show ipv6 ospf database network
(Area 0.0.0.1)
LS Type: Network LSA
Link State ID: 0.0.0.14
Advertising Router: 3.3.3.3
LS age: 131
LS Seq Number: 0x80000001
Checksum: 0x6c69
Length: 32
Options: V6-bit set, ExternalRoutingCapability, R-bit set
Attached Router: 3.3.3.3
Attached Router: 2.2.2.2
host1#show ipv6 ospf database link V3 Link Link States (Area 0.0.0.0)
Link ID ADV Router Age Seq# Checksum
LS age: 280
LS Type: Link
Link State ID: 0x32000006
Advertising Router: 1.1.1.1
LS Seq Number: 0x80000001
Checksum: 0x44b7
Length: 56
Router Priority 0
Link Local Address fe80::90:1a00:200:670
Prefixes
1:1:1:1000:: / 60 options 0 metric 0
LS age: 282
LS Type: Link
Link State ID: 0x3200000a
Advertising Router: 2.2.2.2
LS Seq Number: 0x80000001
Checksum: 0x11e1
Length: 56
Router Priority 0
Link Local Address fe80::90:1a00:300:670
Prefixes
1:1:1:1000:: / 60 options 0 metric 0
host1#show ipv6 ospf database intra-area-prefix
V3 Intra Area Prefix Link States (Area 0.0.0.0)
LS age: 162
LS Type: Intra Area Prefix Links
Link State ID: 0.0.0.1
Advertising Router: 1.1.1.1
LS Seq Number: 0x80000003
Checksum: 0x911a
Length: 44
Number of Prefixes 1
Referenced LSA Type 0x 2001
Referenced LSA Advertising Router 1.1.1.1
Referenced LSA ID 0
Prefixes
1:1:1:1000:: / 60 options 0 metric 1
LS age: 161
LS Type: Intra Area Prefix Links
Link State ID: 0.0.0.1
Advertising Router: 2.2.2.2
LS Seq Number: 0x80000003
Checksum: 0xa5fd
Length: 44
Number of Prefixes 1
Referenced LSA Type 0x 2001
Referenced LSA Advertising Router 2.2.2.2
Referenced LSA ID 0
Prefixes
1:1:1:1000:: / 60 options 0 metric 1
host1#show ipv6 ospf database inter-area-router
V3 Inter-Area-Router Link States (Area 0.0.0.0)
LS age: 304
LS Type: Inter Area Net Links
Link State ID: 0.0.0.1
Advertising Router: 2.2.2.2
LS Seq Number: 0x80000001
Checksum: 0x a0f
Length: 32
Metric: 1
Options: 19
asbr: 1.1.1.1
host1#show ipv6 ospf database grace
V3 Grace Link States (Area 0.0.0.1)
LS age: 3
LS Type: Grace
Link State ID: 0x00000002
Advertising Router: 2.2.2.2
LS Seq Number: 0x80000001
Checksum: 0x8409
Length: 44
TLVs
Type: 1(Restart duration), length: 4, Value: 150
Type: 2(Restart Reason), length: 1, Value: 2(Software Reload)
Type: 3(Unknown), length: 4, Value: 33686018
show ip ospf database link-local
host1#show ip ospf database link-local Link-Local States
Interface : ATM1/3.80 LS age: 17 LS Type: Link Local Link State ID: 3.0.0.0 Advertising Router: 100.1.1.67 LS Seq Number: 0x80000002 Checksum: 0xac91 Length: 36 Opaque LSA Type : Restart Grace Neighbor 0.0.0.0 Grace Period 90 seconds Restart Reason : Unplanned Restart
show ip ospf database opaque-area
host1#show ip ospf database opaque-area
Opaque-area Link States (Area 0.0.0.0)
LS age: 914 Options: (TOS-capable, No Type7-LSA, ExternalRoutingCapability, No Multicast Capability, No External Attributes LSA) LS Type: Opaque-Area (TE Router Address) Link State ID: 1.0.0.0(Instance) Advertising Router: 100.1.1.1 LS Seq Number: 0x80000003 Checksum: 0xd293 Length: 28 TE Router-ID: 100.1.1.1
LS age: 919 Options: (TOS-capable, No Type7-LSA, ExternalRoutingCapability, No Multicast Capability, No External Attributes LSA) LS Type: Opaque-Area (TE Links) Link State ID: 1.0.0.1(Instance) Advertising Router: 100.1.1.1 LS Seq Number: 0x80000003 Checksum: 0xf66e Length: 124 Link Type: P2P Link ID: 1744896257 Local Address 14.1.1.2 Remote Address 14.1.1.1 TE Metric 0 Max BW 1000 kb/sec (125000 Bps) Max Reservable BW 1000 kb/sec (125000 Bps) Max Unreserved BW : pri 0 1000 kb/sec (125000 Bps) Max Unreserved BW : pri 1 1000 kb/sec (125000 Bps) Max Unreserved BW : pri 2 1000 kb/sec (125000 Bps) Max Unreserved BW : pri 3 1000 kb/sec (125000 Bps) Max Unreserved BW : pri 4 1000 kb/sec (125000 Bps) Max Unreserved BW : pri 5 1000 kb/sec (125000 Bps) Max Unreserved BW : pri 6 1000 kb/sec (125000 Bps) Max Unreserved BW : pri 7 1000 kb/sec (125000 Bps) Color 0
show ip ospf interface
show ipv6 ospf interface
host1#show ip ospf interface FastEthernet0 is up, OSPF line protocol is up OSPF interface configuration: Internet Address 192.168.1.250, Area 0.0.0.0 Network type BROADCAST, No authentication Cost: 1 Transmit Delay is 1 sec, Interface State DROTHER, Priority 1 Designated Router (Interface address) 192.168.1.107 Backup Designated Router (Interface address) 192.168.1.214 Timer intervals configured, Hello 10, Dead 40, Wait 120, Retransmit 5 Neighbor Count is 2, Adjacent neighbor count is 2 Adjacent with neighbor 192.168.1.107 (Designated Router) Adjacent with neighbor 192.168.254.7 (Backup Designated Router) LDP is configured through LDP autoconfig LDP-IGP Synchronization: Achieved
host1#show ipv6 ospf interface ATM4/0.12 is up, OSPFv3 line protocol is up Area 0.0.0.0, Intf ID: 0x320004, Instance ID: 0 Link Local Address: fe80::90:1a00:100:80 Interface is active Network type POINT-TO-POINT Interface State POINT-TO-POINT Cost: 1, Priority 1 No designated router on this network No backup designated router on this network Timer intervals configured: Hello 10, Dead 40, Wait 40 Transmit Delay is 1 sec(s) Retransmit interval is 5 secs Neighbor Count is 1 FULL Adjacent neighbor count is 1 Adjacent with neighbor 11.0.0.2
FastEthernet0/0 is up, OSPFv3 line protocol is up OSPF interface configuration: Interface ID 0.0.1.1 IPv6 link-local address FE80::3/128 IPv6 prefix address 3000::1/64, Area 0.0.0.0 Network type BROADCAST Cost: 1 Transmit Delay is 1 sec, Interface State BACKUPDR, Priority 1 Designated Router's router ID 1.1.1.1 Backup Designated Router's router ID 2.2.2.2 Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Neighbor Count is 1, Adjacent neighbor count is 1 Adjacent with neighbor 3.3.3.3 (Designated Router)
show ip ospf internal-statistics
show ipv6 ospf internal-statistics
host1#show ip ospf internal-statistics
Routing Process OSPF 1 with Router ID 5.72.3.1
Internal OSPF Statistics, bytes allocated/free:
LSA bytes allocated:216
Router LSA bytes allocated:936
Summary bytes allocated:0
Neighbor RTX bytes allocated:0
Timers bytes allocated:352
Ospf total bytes free:824368
Ospf heap total bytes allocated:1048576
Internal OSPF Statistics, allocation failures:
Neighbor allocation failures:0
LSA allocation failures:0
LSA HDR allocation failures:0
DB Request allocation failures:0
RTX allocation failures:0
LS Ack allocation failures:0
DD pkt allocation failures:0
OSPF interface allocation failures:0
OSPF general packet allocation failures:0
host1#show ipv6 ospf internal-statistics
Routing Process OSPFv3 1 with Router ID 1.1.1.1
Internal OSPF Statistics, bytes allocated/free:
LSA bytes allocated: 39
Router LSA bytes allocated: 1314774
Summary bytes allocated: 0
Timers bytes allocated: 96
Ospf total bytes free: 16
Ospf heap total bytes allocated: 1000
Internal OSPF Statistics, allocation failures:
Neighbor allocation failures: 0
LSA allocation failures: 0
LSA HDR allocation failures: 0
DB Request allocation failures: 0
RTX allocation failures: 0
LS Ack allocation failures: 0
DD pkt allocation failures: 0
OSPF interface allocation failures: 0
OSPF general packet allocation failures: 0
show ip ospf neighbors
show ipv6 ospf neighbors
host1# show ip ospf neighbors Neighbor ID Pri State Dead Time Address Interface 10.0.8.1 1 TWO-WAY/DR Other 00:00:39 10.0.76.1 fastEthernet11/0 10.0.71.1 1 FULL/DR 00:00:42 10.0.76.2 fastEthernet11/0 10.0.96.1 1 FULL/BDR 00:00:28 10.0.76.4 fastEthernet11/0
host1# show ipv6 ospf neighbors Neighbor ID Pri State Dead Time Intf ID Interface 1.1.1.1 1 TWO-WAY/DROTHER 00:00:40 0x3200042a FastEthernet13/1.172 3.3.3.3 1 FULL/BDR 00:00:40 0x32000494 FastEthernet13/1.172 4.4.4.4 1 FULL/DR 00:00:40 0x320004c9 FastEthernet13/1.172
host1#show ip ospf neighbors history Transition log for neighbor 10.10.8.2: Interface Event Cause Time ============================================== ATM2/0.8 Seen NA WED DEC 14 07:02:27
Transition log for neighbor 10.10.12.2: Interface Event Cause Time ============================================== ATM2/0.12 Seen NA WED DEC 14 07:09:12 ATM2/0.12 DOWN Interface down WED DEC 14 07:05:47 ATM2/0.12 Seen NA WED DEC 14 07:02:32
show ip ospf remote-neighbor interface
host1#show ip ospf remote-neighbor interface OSPF remote-neighbor 221.221.221.221 interface configuration: Update-source loopback0 Remote-neighbor reachable: yes Area 0.0.0.0 Network type POINT-TO-POINT, No authentication Cost: 1 Transmit Delay is 1 sec, Interface State POINT-TO-POINT, Priority 1 No designated router on this network No backup designated router on this network Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 Neighbor Count is 1, Adjacent neighbor count is 1 Adjacent with neighbor 221.221.221.221
show ip ospf spf-log
host1#show ip ospf spf-log
Intra SPF log When Duration LSA Router Id Triggers 00:04:42 0.000 23.23.23.3 Protocol Off 00:04:38 0.000 23.23.23.3 LSA Add 00:04:34 0.000 12.12.12.2 LSA Add 00:04:30 0.010 23.23.23.3 LSA Update 00:03:51 0.000 23.23.23.3 Protocol Off 00:03:47 0.000 23.23.23.3 LSA Add 00:03:43 0.000 12.12.12.2 LSA Add 00:03:39 0.000 23.23.23.3 LSA Update
Inter SPF log When Duration LSA Router Id Triggers 00:04:46 0.010 23.23.23.3 Protocol Off 00:04:42 0.000 23.23.23.3 LSA Add 00:04:38 0.000 12.12.12.2 LSA Add 00:04:34 0.000 23.23.23.3 LSA Update 00:03:55 0.000 23.23.23.3 Protocol Off 00:03:51 0.000 23.23.23.3 LSA Add 00:03:47 0.000 12.12.12.2 LSA Add 00:03:43 0.000 23.23.23.3 LSA Update
External SPF log When Duration LSA Router Id Triggers 00:04:47 0.000 23.23.23.3 Protocol Off 00:04:43 0.000 23.23.23.3 LSA Add 00:04:39 0.000 12.12.12.2 LSA Add 00:04:35 0.010 23.23.23.3 LSA Update 00:03:56 0.000 23.23.23.3 Protocol Off 00:03:52 0.000 23.23.23.3 LSA Add 00:03:48 0.000 12.12.12.2 LSA Add 00:03:44 0.000 23.23.23.3 LSA Update
show ipv6 ospf summary-prefix
host1#show ipv6 ospf summary-prefix Summary Prefixes 4:: / 64 5:: / 64
show ipv6 ospf traffic
host1#show ipv6 ospf traffic
OSPFv3 Statistics:
Rcvd: 249 total, 0 checksum errors
242 hello, 2 database desc, 1 link state req
4 link state updates, 1 link state acks
Sent: 251 total, 0 pkts dropped
242 hello, 3 database desc, 1 link state req
4 link state updates, 1 link state acks
LSA discard count: 0
show ip ospf virtual-links
host1#show ip ospf virtual-links Virtual link to router 192.168.1.13 in state POINT-TO-POINT Transmit Delay is 1 sec Timer intervals configured, Hello 10 sec, Dead 40 sec, Retransmit 5 sec