Router(config-if)#ip ospf dead-interval ?
<1-65535> Seconds
minimal Set to 1 second
Установка субсекундного Hello Interval и секундного Dead Interval
Router(config-if)#ip ospf deal-interval minimal hello-multiplier ?
<3-20> Number of Hellos sent within 1 second
Алгоритм диагностики OSPF
Проверить работоспособность и настройки процесса OSPF
show ip protocols
show ip ospf
Проверить входящие интерфейсы в OSPF
show ip ospf interfaces
Проверить установленные соседства
show ip ospf neighbor
Проверить таблицу маршрутов OSPF и таблицу маршрутизации
show ip ospf route
show ip route ospf
Базовая диагностика OSPF
Убедится, что OSPF включен на интерфейсе
Router#show ip ospf interface brief
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Lo1 1 0 8.8.1.1/32 1 LOOP 0/0
Lo2 1 0 8.8.1.2/32 1 LOOP 0/0
Lo3 1 0 8.8.1.3/32 1 LOOP 0/0
Lo4 1 0 8.8.1.4/32 1 LOOP 0/0
Et0/1 1 0 10.8.12.1/24 10 DR 0/0
Et0/0 1 0 10.101.8.1/24 10 DR 0/0
Et0/2 1 1 10.8.13.1/24 10 DR 0/0
Et0/3 1 1 10.8.113.1/24 10 DR 0/0
Убедится, что установлено соседство
Router#show ip ospf neighbor
R3(config-if)#do sh ip ospf ne
Neighbor ID Pri State Dead Time Address Interface
8.8.1.4 1 FULL/DR 00:00:39 10.8.113.1 Ethernet0/3
8.8.1.4 1 FULL/DR 00:00:39 10.8.13.1 Ethernet0/2
Убедится, что установлены маршруты
Router#show ip route ospf
8.0.0.0/8 is variably subnetted, 20 subnets, 2 masks
O IA 8.8.1.1/32 [110/21] via 10.8.34.3, 00:47:44, Ethernet0/0
[110/21] via 10.8.24.2, 00:47:05, Ethernet0/2
O IA 8.8.1.2/32 [110/21] via 10.8.34.3, 00:47:44, Ethernet0/0
[110/21] via 10.8.24.2, 00:47:05, Ethernet0/2
O IA 8.8.1.3/32 [110/21] via 10.8.34.3, 00:47:44, Ethernet0/0
[110/21] via 10.8.24.2, 00:47:05, Ethernet0/2
O IA 8.8.1.4/32 [110/21] via 10.8.34.3, 00:47:44, Ethernet0/0
[110/21] via 10.8.24.2, 00:47:05, Ethernet0/2
O IA 8.8.2.1/32 [110/11] via 10.8.24.2, 00:47:05, Ethernet0/2
O IA 8.8.2.2/32 [110/11] via 10.8.24.2, 00:47:05, Ethernet0/2
O IA 8.8.2.3/32 [110/11] via 10.8.24.2, 00:47:05, Ethernet0/2
O IA 8.8.2.4/32 [110/11] via 10.8.24.2, 00:47:05, Ethernet0/2
O 8.8.3.1/32 [110/11] via 10.8.34.3, 00:47:44, Ethernet0/0
O 8.8.3.2/32 [110/11] via 10.8.34.3, 00:47:44, Ethernet0/0
O 8.8.3.3/32 [110/11] via 10.8.34.3, 00:47:44, Ethernet0/0
O 8.8.3.4/32 [110/11] via 10.8.34.3, 00:47:44, Ethernet0/0
Детальная диагностика интерфейса
Router#show ip ospf interface e0/0
Ethernet0/0 is up, line protocol is up
Internet Address 10.101.8.1/24, Area 0, Attached via Interface Enable
Process ID 1, Router ID 8.8.1.4, Network Type BROADCAST, Cost: 10
Topology-MTID Cost Disabled Shutdown Topology Name
0 10 no no Base
Enabled by interface config, including secondary ip addresses
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 8.8.1.4, Interface address 10.101.8.1
No backup designated router on this network
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:01
Supports Link-local Signaling (LLS)
Cisco NSF helper support enabled
IETF NSF helper support enabled
Index 1/1/1, flood queue length 0
Next 0x0(0)/0x0(0)/0x0(0)
Last flood scan length is 0, maximum is 0
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 0, Adjacent neighbor count is 0
Suppress hello for 0 neighbor(s)
Детальная информация о соседе
R3(config-if)#do sh ip ospf ne 8.8.1.4
Neighbor 8.8.1.4, interface address 10.8.113.1
In the area 1 via interface Ethernet0/3
Neighbor priority is 1, State is FULL, 6 state changes
DR is 10.8.113.1 BDR is 10.8.113.3
Options is 0x12 in Hello (E-bit, L-bit)
Options is 0x52 in DBD (E-bit, L-bit, O-bit)
LLS Options is 0x1 (LR)
Dead timer due in 00:00:36
Neighbor is up for 00:00:41
Index 1/2/2, retransmission queue length 0, number of retransmission 0
First 0x0(0)/0x0(0)/0x0(0) Next 0x0(0)/0x0(0)/0x0(0)
Last retransmission scan length is 0, maximum is 0
Last retransmission scan time is 0 msec, maximum is 0 msec
Детальная информация о процессе OSPF
R2#sh ip ospf
Routing Process "ospf 1" with ID 8.8.2.4
Start time: 00:25:33.621, Time elapsed: 00:08:40.442
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Link-local Signaling (LLS)
Supports area transit capability
Supports NSSA (compatible with RFC 3101)
Supports Database Exchange Summary List Optimization (RFC 5243)
Event-log enabled, Maximum number of events: 1000, Mode: cyclic
It is an area border router
Router is not originating router-LSAs with maximum metric
Initial SPF schedule delay 5000 msecs
Minimum hold time between two consecutive SPFs 10000 msecs
Maximum wait time between two consecutive SPFs 10000 msecs
Incremental-SPF disabled
Minimum LSA interval 5 secs
Minimum LSA arrival 1000 msecs
LSA group pacing timer 240 secs
Interface flood pacing timer 33 msecs
Retransmission pacing timer 66 msecs
Number of external LSA 0. Checksum Sum 0x000000
Number of opaque AS LSA 0. Checksum Sum 0x000000
Number of DCbitless external and opaque AS LSA 0
Number of DoNotAge external and opaque AS LSA 0
Number of areas in this router is 3. 3 normal 0 stub 0 nssa
Number of areas transit capable is 0
External flood list length 0
IETF NSF helper support enabled
Cisco NSF helper support enabled
Reference bandwidth unit is 100 mbps
Area BACKBONE(0)
Number of interfaces in this area is 6 (4 loopback)
Area has no authentication
SPF algorithm last executed 00:05:36.632 ago
SPF algorithm executed 5 times
Area ranges are
Number of LSA 9. Checksum Sum 0x04BDBA
Number of opaque link LSA 0. Checksum Sum 0x000000
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
Area 1
Number of interfaces in this area is 1
Area has no authentication
SPF algorithm last executed 00:06:16.657 ago
SPF algorithm executed 1 times
Area ranges are
Number of LSA 17. Checksum Sum 0x0904C3
Number of opaque link LSA 0. Checksum Sum 0x000000
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
Area 2
Number of interfaces in this area is 1
Area has no authentication
SPF algorithm last executed 00:06:16.657 ago
SPF algorithm executed 4 times
Area ranges are
Number of LSA 17. Checksum Sum 0x09D9EC
Number of opaque link LSA 0. Checksum Sum 0x000000
Number of DCbitless LSA 0
Number of indication LSA 0
Number of DoNotAge LSA 0
Flood list length 0
Посмотреть RIB внутри процесса OSPF (show ip ospf route покажет еще больше инфо)
R4#sh ip ospf rib
OSPF Router with ID (8.8.44.1) (Process ID 1)
Base Topology (MTID 0)
OSPF local RIB
Codes: * - Best, > - Installed in global RIB
*> 8.8.1.1/32, Inter, cost 21, area 1
via 10.8.24.2, Ethernet0/2
via 10.8.134.3, Ethernet0/1
via 10.8.34.3, Ethernet0/0
*> 8.8.1.2/32, Inter, cost 21, area 1
via 10.8.24.2, Ethernet0/2
via 10.8.134.3, Ethernet0/1
via 10.8.34.3, Ethernet0/0
*> 8.8.1.3/32, Inter, cost 21, area 1
via 10.8.24.2, Ethernet0/2
via 10.8.134.3, Ethernet0/1
via 10.8.34.3, Ethernet0/0
*> 8.8.1.4/32, Inter, cost 21, area 1
via 10.8.24.2, Ethernet0/2
via 10.8.134.3, Ethernet0/1
via 10.8.34.3, Ethernet0/0
*> 8.8.2.1/32, Inter, cost 11, area 1
via 10.8.24.2, Ethernet0/2
*> 8.8.2.2/32, Inter, cost 11, area 1
via 10.8.24.2, Ethernet0/2
*> 8.8.2.3/32, Inter, cost 11, area 1
via 10.8.24.2, Ethernet0/2
*> 8.8.2.4/32, Inter, cost 11, area 1
via 10.8.24.2, Ethernet0/2
Помотреть траффик процесса OSPF
R1#show ip ospf traffic e0/1
Interface Ethernet0/1
Last clearing of interface traffic counters never
OSPF packets received/sent
Type Packets Bytes
RX Invalid 0 0
RX Hello 986 47324
RX DB des 2 84
RX LS req 1 36
RX LS upd 5 624
RX LS ack 4 336
RX Total 998 48404
TX Failed 0 0
TX Hello 987 78956
TX DB des 3 212
TX LS req 1 56
TX LS upd 5 640
TX LS ack 3 412
TX Total 999 80276
OSPF header errors
Length 0, Instance ID 0, Checksum 0, Auth Type 0,
Version 0, Bad Source 0, No Virtual Link 0,
Area Mismatch 0, No Sham Link 0, Self Originated 0,
Duplicate ID 0, Hello 0, MTU Mismatch 0,
Nbr Ignored 0, LLS 0, Unknown Neighbor 0,
Authentication 0, TTL Check Fail 0, Test discard 0
OSPF LSA errors
Type 0, Length 0, Data 0, Checksum 0
Диагностика LSA, LSDB
Просмотр таблицы LSDB
Router#show ip ospf database
OSPF Router with ID (8.8.44.1) (Process ID 1)
Router Link States (Area 1)
Link ID ADV Router Age Seq# Checksum Link count
8.8.1.4 8.8.1.4 251 0x80000002 0x006A2D 2
8.8.2.4 8.8.2.4 65 0x80000002 0x007132 1
8.8.3.4 8.8.3.4 61 0x80000005 0x009F7B 8
8.8.44.1 8.8.44.1 61 0x80000003 0x0031BE 4
Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum
10.8.13.3 8.8.3.4 250 0x80000001 0x0013C1
10.8.24.2 8.8.2.4 65 0x80000001 0x00A8FB
10.8.34.3 8.8.3.4 66 0x80000001 0x003265
10.8.113.3 8.8.3.4 250 0x80000001 0x00C2AD
10.8.134.3 8.8.3.4 65 0x80000001 0x00E151
Summary Net Link States (Area 1)
Link ID ADV Router Age Seq# Checksum
8.8.1.1 8.8.1.4 281 0x80000001 0x000E07
8.8.1.1 8.8.2.4 280 0x80000001 0x006B9E
8.8.1.2 8.8.1.4 281 0x80000001 0x000410
Просмотр отдельной Router LSA в таблице LSDB
Router#show ip ospf database router 8.8.2.4
OSPF Router with ID (8.8.44.1) (Process ID 1)
Router Link States (Area 1)
LS age: 337
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 8.8.2.4
Advertising Router: 8.8.2.4
LS Seq Number: 80000002
Checksum: 0x7132
Length: 36
Area Border Router
Number of Links: 1
Link connected to: a Transit Network
(Link ID) Designated Router address: 10.8.24.2
(Link Data) Router Interface address: 10.8.24.2
Number of MTID metrics: 0
TOS 0 Metrics: 10
Просмотр отдельной Network LSA в таблице LSDB
R4#show ip ospf database network 10.8.124.2
OSPF Router with ID (8.8.44.1) (Process ID 1)
Net Link States (Area 2)
LS age: 898
Options: (No TOS-capability, DC)
LS Type: Network Links
Link State ID: 10.8.124.2 (address of Designated Router)
Advertising Router: 8.8.2.4
LS Seq Number: 80000001
Checksum: 0x58E7
Length: 32
Network Mask: /24
Attached Router: 8.8.2.4
Attached Router: 8.8.44.1
Просмотр отделньой Summary LSA в таблице LSDB
Router#show ip ospf database summary 8.8.1.1
OSPF Router with ID (8.8.44.1) (Process ID 1)
Summary Net Link States (Area 1)
LS age: 1815
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(Network)
Link State ID: 8.8.1.1 (summary Network Number)
Advertising Router: 8.8.1.4
LS Seq Number: 80000001
Checksum: 0xE07
Length: 28
Network Mask: /32
MTID: 0 Metric: 1
Просмотр отдельной External LSA в таблице LSDB
R4#sh ip ospf data external 8.2.3.4
OSPF Router with ID (8.8.44.1) (Process ID 1)
Type-5 AS External Link States
LS age: 24
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 8.2.3.4 (External Network Number )
Advertising Router: 8.8.44.1
LS Seq Number: 80000001
Checksum: 0x5AF7
Length: 36
Network Mask: /32
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 20
Forward Address: 0.0.0.0
External Route Tag: 0
Просмотр отдельной LSA 7 в таблице LSDB
Router#show ip ospf database nssa-external
OSPF Router with ID (8.8.44.1) (Process ID 1)
Type-7 AS External Link States (Area 2)
LS age: 167
Options: (No TOS-capability, No Type 7/5 translation, DC, Upward)
LS Type: AS External Link
Link State ID: 8.2.3.4 (External Network Number )
Advertising Router: 8.8.44.1
LS Seq Number: 80000001
Checksum: 0x3E12
Length: 36
Network Mask: /32
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 20
Forward Address: 0.0.0.0
External Route Tag: 0
Просмотр отдельной ASBR-Summary LSA в таблице LSDB
R1#sh ip ospf database asbr-summary 8.8.44.1
OSPF Router with ID (8.8.1.4) (Process ID 1)
Summary ASB Link States (Area 0)
LS age: 813
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(AS Boundary Router)
Link State ID: 8.8.44.1 (AS Boundary Router address)
Advertising Router: 8.8.1.4
LS Seq Number: 80000001
Checksum: 0xE3F1
Length: 28
Network Mask: /0
MTID: 0 Metric: 20
Дебаггинг
Hello Protocol
Router#debug ip ospf hello
Обмен пакетами
Router#debug ip ospf packet
Построение LSDB и пересчет SPF
Router#debug ip ospf rib
Stub и Totally Stub регионы
Команда area <#> stub помечает регион как тупиковый
Ключ no-summary указывает ABR суммировать и inter-area маршруты