Course contents

Module 5: PracticeLesson 5.4 (4 of 5 in this module)20 of 29 in the OSPF course

OSPF cheat sheet

Which setting or output should you check next? Use this reference beside your OSPF lab, then return to the linked lessons when a result needs more explanation.

Intermediate · 6 min read

This is a revision aid for the course's Cisco IOS/IOS XE examples, not a replacement for the explanations. OSPFv2 carries IPv4 routes. OSPFv3 is used for IPv6 in this course. Defaults and command availability can differ by platform and release, so verify the running values on your lab image.

Defaults and numbers

Defaults and numbers
Defaults and numbersItem; Value. IP protocol number: 89 (not TCP or UDP) Multicast addresses: 224.0.0.5 all OSPF routers · 224.0.0.6 DR and BDR Administrative distance: 110 Hello / dead, broadcast and point-to-point: 10 s / 40 s Hello / dead, non-broadcast and point-to-multipoint: 30 s / 120 s Wait timer (DR election): Equal to the dead interval Reference bandwidth: 100 Mbps (auto-cost reference-bandwidth, in Mbps) Interface cost: Reference ÷ bandwidth, rounded down, 1 to 65 535 Interface priority: 1 (range 0 to 255; 0 = never DR or BDR) Equal-cost path limit: Platform/release dependent; inspect show ip protocols and maximum-paths. Four is a common classic IOS setting, not a universal default. LSA refresh / MaxAge: 30 minutes / 60 minutes Default route (default-information originate): Normal-area example: type 5, E2, metric 1. Other area types use different mechanisms.ItemValueIP protocol number89 (not TCP or UDP)Multicast addresses224.0.0.5 all OSPF routers · 224.0.0.6 DR and BDRAdministrative distance110Hello / dead, broadcast andpoint-to-point10 s / 40 sHello / dead, non-broadcastand point-to-multipoint30 s / 120 sWait timer (DR election)Equal to the dead intervalReference bandwidth100 Mbps (auto-cost reference-bandwidth, in Mbps)Interface costReference ÷ bandwidth, rounded down, 1 to 65 535Interface priority1 (range 0 to 255; 0 = never DR or BDR)Equal-cost path limitPlatform/release dependent; inspect show ip protocols and maximum-paths.Four is a common classic IOS setting, not a universal default.LSA refresh / MaxAge30 minutes / 60 minutesDefault route(default-informationoriginate)Normal-area example: type 5, E2, metric 1. Other area types use differentmechanisms.

On small screens, swipe sideways or focus the diagram and use the arrow keys.

Each item on the left, with what it means on the right.

Router ID

  1. router-id under router ospf,
  2. otherwise the highest IPv4 address on an up loopback,
  3. otherwise the highest IPv4 address on any other up interface.

A router ID identifies the OSPF process in routing messages; it is not necessarily a port address. Set it before enabling OSPF interfaces. A running process may need a planned restart to adopt a changed ID. Check the active value with show ip ospf rather than assuming the saved command has already taken effect.

Neighbours

Neighbours
NeighboursMust match (in the hello); Must also be right; Doesn't need to match. Area ID · subnet and mask (mask not checked on point-to-point) · hello and dead intervals · authentication · stub area flag: Unique router IDs · compatible IP MTU (checked in database descriptions) · interface not passive · compatible network types. A type mismatch can reach Full yet break route calculation. Process ID · priority · costMust match (in thehello)Must also be rightDoesn't need to matchArea ID · subnet andmask (mask not checkedon point-to-point) ·hello and deadintervals ·authentication · stubarea flagUnique router IDs · compatible IP MTU(checked in database descriptions) ·interface not passive · compatiblenetwork types. A type mismatch canreach Full yet break routecalculation.Process ID · priority · cost

On small screens, swipe sideways or focus the diagram and use the arrow keys.

Read each row across: the left box names the item, the others describe it.
Neighbours
NeighboursState; Meaning; Stuck here usually means. Down: Nothing heard Not in OSPF, passive, area or timer or auth mismatch, ACL Attempt: Polling a configured neighbour (NBMA only) Neighbour unreachable Init: Hello heard, my RID not in it Hellos only arrive one way 2-Way: Each router sees its own ID in the peer's Hello Normal between two DROthers on a shared LAN; no DR election on point-to-point links ExStart: Choosing master (higher RID) MTU mismatch, duplicate RID Exchange: Swapping database description (DBD) packets containing LSA headers Inspect MTU, loss, filtering and exchange logs; state alone is not a diagnosis Loading: Requesting and receiving missing or newer LSAs Check requests, retransmissions, loss and logs Full: Database synchronisation for this adjacency completed Still check the destination prefix, selected route and user trafficStateMeaningStuck here usually meansDownNothing heardNot in OSPF, passive, area or timeror auth mismatch, ACLAttemptPolling a configured neighbour (NBMAonly)Neighbour unreachableInitHello heard, my RID not in itHellos only arrive one way2-WayEach router sees its own ID in thepeer's HelloNormal between two DROthers on ashared LAN; no DR election onpoint-to-point linksExStartChoosing master (higher RID)MTU mismatch, duplicate RIDExchangeSwapping database description (DBD)packets containing LSA headersInspect MTU, loss, filtering andexchange logs; state alone is not adiagnosisLoadingRequesting and receiving missing ornewer LSAsCheck requests, retransmissions, lossand logsFullDatabase synchronisation for thisadjacency completedStill check the destination prefix,selected route and user traffic

On small screens, swipe sideways or focus the diagram and use the arrow keys.

Read each row across: the left box names the item, the others describe it.

Packets and LSAs

A packet is the message travelling between routers. An LSA is a record carried inside an update. The designated router (DR) coordinates flooding on a shared segment; the backup designated router (BDR) is ready to take over after DR failure is detected. A DROther is neither of those elected roles.

Packets and LSAs
Packets and LSAsPacket; Job. 1 Hello: Find and keep neighbours, elect DR/BDR 2 DBD: List of LSA headers (the table of contents) 3 LSR: Request missing LSAs 4 LSU: Carry full LSAs 5 LSAck: Acknowledge individual LSA instances using their headersPacketJob1 HelloFind and keep neighbours, elect DR/BDR2 DBDList of LSA headers (the table of contents)3 LSRRequest missing LSAs4 LSUCarry full LSAs5 LSAckAcknowledge individual LSA instances using their headers

On small screens, swipe sideways or focus the diagram and use the arrow keys.

Each item on the left, with what it means on the right.

An area border router (ABR) connects areas. An autonomous system boundary router (ASBR) introduces external routes. These roles differ from the DR role on a particular shared link.

LSACreated byScopeRoute code
1 RouterEvery routerIts areaO
2 NetworkDR of a multi-access segmentIts areaO
3 SummaryABRInto other areasO IA
5 ExternalASBRWhole OSPF domain (normal areas)O E1 / O E2

Network types

TypeDefault onDRTimers
BroadcastEthernetYes10/40
Point-to-pointHDLC/PPP serial links and some tunnel designs; inspect actual outputNo10/40 in this IOS example
Non-broadcastFrame RelayYes30/120
Point-to-multipointConfigured onlyNo30/120
LoopbackLoopbacksNoAdvertised as /32

Configuration

These are reference commands, not one block to paste into every router. In the three-router lab, R1 Gi0/1 uses 10.0.12.1/30 towards R2 10.0.12.2/30. The wildcard selects that interface; it does not change its subnet mask. Start the examples in global configuration mode.

router ospf 1 router-id 1.1.1.1 auto-cost reference-bandwidth 10000 network 10.0.12.0 0.0.0.3 area 0 passive-interface default no passive-interface GigabitEthernet0/1 default-information originate maximum-paths 4

Process-level commands. The process ID is local; the router ID must be unique.

interface GigabitEthernet0/1 ip ospf 1 area 0 ip ospf network point-to-point ip ospf cost 10 ip ospf priority 0 ip ospf hello-interval 10 ip ospf dead-interval 40 bandwidth 100000

Independent interface settings for recognition. The explicit OSPF cost overrides the bandwidth calculation; bandwidth does not change physical speed. Priority has no election effect with point-to-point OSPF. You do not need to set default timers explicitly.

Verification

CommandLook for
show ip protocolsRouter ID, networks, passive interfaces, sources
show ip ospfRouter ID, reference bandwidth, areas, ASBR/ABR, SPF runs
show ip ospf interface briefInterfaces in OSPF, area, cost, state, neighbours F/C
show ip ospf interface <if>Network type, priority, DR/BDR, timers, passive
show ip ospf neighborNeighbour RIDs, state, role, dead time
show ip ospf databaseArea-scoped records agree after convergence; ages can differ and ABRs also hold other areas
show ip route ospfO, O IA, O E1/E2 routes with [110/cost]
clear ip ospf processDisruptive process restart; planned work only. A returning high-priority router does not pre-empt an existing DR.
debug ip ospf adj / helloWhy adjacencies fail: mismatches, MTU, authentication

Route codes

Route codes
Route codesCode; Meaning. O: Intra-area: from type 1 and 2 LSAs in the router's own area O IA: Inter-area: from a type 3 LSA created by an ABR O E2: External metric is compared first; internal cost can break a tie between otherwise comparable paths O E1: External metric plus internal cost to the forwarding address, or the ASBR when that address is zero O*E2: External default route (candidate default)CodeMeaningOIntra-area: from type 1 and 2 LSAs in the router's own areaO IAInter-area: from a type 3 LSA created by an ABRO E2External metric is compared first; internal cost can break a tie betweenotherwise comparable pathsO E1External metric plus internal cost to the forwarding address, or the ASBRwhen that address is zeroO*E2External default route (candidate default)

On small screens, swipe sideways or focus the diagram and use the arrow keys.

Each item on the left, with what it means on the right.

OSPFv3 for IPv6

This table uses the classic ipv6 router ospf syntax taught in the IPv6 lab. OSPFv3 address-family configuration is a separate command style; do not mix fragments from the two styles as though they were a complete configuration.

OSPFv3 for IPv6
OSPFv3 for IPv6Item; OSPFv3. Before the process: ipv6 unicast-routing Process and router ID: ipv6 router ospf 1, router-id 1.1.1.1 (required with no IPv4 address) Enable on an interface: ipv6 ospf 1 area 0 (no network command) Hellos: From the link-local address to FF02::5; DR/BDR also use FF02::6 Next hop: Neighbour's link-local address plus exit interface Verify: show ipv6 ospf neighbor, show ipv6 ospf interface brief, show ipv6 route ospf Route codes: O, OI (inter-area), OE1, OE2ItemOSPFv3Before the processipv6 unicast-routingProcess and router IDipv6 router ospf 1, router-id 1.1.1.1 (required with no IPv4 address)Enable on an interfaceipv6 ospf 1 area 0 (no network command)HellosFrom the link-local address to FF02::5; DR/BDR also use FF02::6Next hopNeighbour's link-local address plus exit interfaceVerifyshow ipv6 ospf neighbor, show ipv6 ospf interface brief, show ipv6 routeospfRoute codesO, OI (inter-area), OE1, OE2

On small screens, swipe sideways or focus the diagram and use the arrow keys.

Each item on the left, with what it means on the right.

Use the reference in a five-minute check

On R2, inspect the interface, neighbour, database and route to 192.168.3.0/24 in that order. Explain what each command proves. On a router link, Full means synchronisation completed; the LAN prefix and route still need checking. If the route is correct but the user test fails, inspect host gateways, the return route and filtering rather than restarting OSPF.

Continue with the troubleshooting explanation, the three-router lab or the course test.

References: RFC 2328 and Cisco IOS XE OSPF configuration guide. This is a scoped reference, not a claim of router-image validation.