Configure OSPF-Specific Options
Purpose
When unexpected events or problems occur, or if you want to diagnose OSPF neighbor establishment issues, you can view more detailed information by configuring options specific to OSPF.
To configure OSPF options, follow these steps:
Diagnose OSPF Session Establishment Problems
Action
To trace OSPF messages in detail, follow these steps:
- In configuration mode, go to the following hierarchy level:[edit]user@host# edit protocols ospf traceoptions
- Configure OSPF hello messages:[edit protocols ospf traceoptions]user@host# set flag hello detail
- Verify the configuration:user@host# show
For example:
[edit protocols ospf traceoptions]
user@host# show
file ospf size 5m world-readable;
flag hello detail; - Commit the configuration:user@host# commit
- View the contents of the file containing the detailed
messages:user@host# run show log filename
For example:
user@host# run show log ospfDec 2 16:14:24 Version 2, length 44, ID 10.0.0.6, area 1.0.0.0
Dec 2 16:14:24 checksum 0xf01a, authtype 0
Dec 2 16:14:24 mask 0.0.0.0, hello_ivl 10, opts 0x2, prio 128
Dec 2 16:14:24 dead_ivl 40, DR 0.0.0.0, BDR 0.0.0.0
Dec 2 16:14:24 OSPF sent Hello (1) -> 224.0.0.5 (so-1/1/2.0)
Dec 2 16:14:24 Version 2, length 44, ID 10.0.0.6, area 1.0.0.0
Dec 2 16:14:24 checksum 0xf01a, authtype 0
Dec 2 16:14:24 mask 0.0.0.0, hello_ivl 10, opts 0x2, prio 128
Dec 2 16:14:24 dead_ivl 40, DR 0.0.0.0, BDR 0.0.0.0
Dec 2 16:14:26 OSPF rcvd Hello 10.10.10.33 -> 224.0.0.5 (so-1/1/1.0)
Dec 2 16:14:26 Version 2, length 48, ID 10.10.134.12, area 0.0.0.0
Dec 2 16:14:26 checksum 0x99b8, authtype 0Dec 2 16:14:26 mask 255.255.255.252, hello_ivl 10, opts 0x2, prio 1
ec 2 16:14:26 dead_ivl 40, DR 0.0.0.0, BDR 0.0.0.0
Dec 2 16:14:29 OSPF rcvd Hello 10.10.10.29 -> 224.0.0.5 (so-1/1/0.0)
Dec 2 16:14:29 Version 2, length 48, ID 10.108.134.11, area 0.0.0.0
Dec 2 16:14:29 checksum 0x99b9, authtype 0Dec 2 16:14:29 mask 255.255.255.252, hello_ivl 10, opts 0x2, prio 1
Dec 2 16:14:29 dead_ivl 40, DR 0.0.0.0, BDR 0.0.0.0
Meaning
Table 1 lists OSPF tracing flags and presents example output for some of the flags.
Table 1: OSPF Protocol Tracing Flags
Tracing Flags | Description | Example Output |
---|---|---|
database-descripttion | All database description packets | Dec 2 15:44:51 RPD_OSPF_NBRDOWN: OSPF neighbor 10.10.10.29 (so-1/1/0.0) state changed from Full to Down |
error | OSPF errored packets | Dec 2 15:49:34 OSPF packet ignored: no matching interface from 172.16.120.29 |
event | OSPF state transitions | Dec 2 15:52:35 OSPF interface ge-2/2/0.0 state changed from DR to DR |
flooding | Link-state flooding packets | Dec 2 15:55:21 OSPF LSA Summary 10.218.0.0 10.0.0.6 flooding on so-1/1/0.0 Dec 2 15:55:21 OSPF LSA Summary 10.245.0.1 10.0.0.6 on no so-1/1/2.0 rexmit lists, no flood |
hello | Hello packets | Dec 2 15:57:25 OSPF sent Hello (1) -> 224.0.0.5 (ge-3/1/0.0) |
lsa-ack | Link-state acknowledgment packets | Dec 2 16:00:11 OSPF rcvd LSAck 10.10.10.29 -> 224.0.0.5 (so-1/1/0.0) |
lsa-request | Link-state request packets | Dec 2 16:01:38 OSPF rcvd LSReq 10.10.10.29 -> 224.0.0.5 (so-1/1/0.0) |
lsa-update | Link-state update packets | Dec 2 16:09:12 OSPF built router LSA, area 0.0.0.0 |
packets | All OSPF packets | Not available. |
packet-dump | Dump the contents of selected packet types | Not available. |
spf | SPF calculations | Dec 2 16:08:03 OSPF full SPF refresh scheduled |
Analyze OSPF Link-State Advertisement Packets in Detail
Action
To analyze OSPF link-state advertisement packets in detail, follow these steps:
- In configuration mode, go to the following hierarchy level:[edit]user@host# edit protocols ospf traceoptions
- Configure OSPF link-state packages:[edit protocols ospf traceoptions]user@host# set flag lsa-update detail
- Verify the configuration:user@host# show
For example:
[edit protocols ospf traceoptions]
user@host# show
file ospf size 5m world-readable;
flag hello detail;
flag lsa-update detail; - Commit the configuration:user@host# commit
- View the contents of the file containing the detailed
messages:user@host# run show log filename
For example:
user@host# run show log ospfDec 2 16:23:47 OSPF sent LSUpdate (4) -> 224.0.0.5 (so-1/1/0.0) ec 2 16:23:47 Version 2, length 196, ID 10.0.0.6, area 0.0.0.0
Dec 2 16:23:47 checksum 0xcc46, authtype 0
Dec 2 16:23:47 adv count 6 Dec 2 16:23:47 OSPF sent LSUpdate (4) -> 224.0.0.5 (so-1/1/1.0)
Dec 2 16:23:47 Version 2, length 196, ID 10.0.0.6, area 0.0.0.0 Dec 2 16:23:47 checksum 0xcc46, authtype 0
Dec 2 16:23:47 adv count 6