Runbook: Configure an OSPF Neighbour
1 · Prerequisites
Confirm every item is in place before any state change.
- OSPF basics — enabling OSPF, router-id, default route, and area assignment
- OSPF interface configuration — network type, timers, MTU, passive
- OSPF authentication — plaintext, MD5, SHA-256, key chain, virtual links
- commit-confirm — the rollback safety net for remote changes
- Remote change discipline — the operational standard for changes the operator cannot see
- You can reach the far-end owner during the window. Both ends of an OSPF adjacency are one change.
2 · Pre-checks
Read-only diagnostic commands. If any of these don't match expected output, stop and investigate further.
- · Out-of-band access is proven, not assumed: log in over console / serial / IPMI now and leave that session open for the whole change
- · Baseline captured off the router:
show configuration commands | grep ospf,show ip ospf,show ip ospf neighbor,show ip ospf interface,show ip route ospf - ·
show ip ospfreports an explicit router-id that is unique in the domain. If it reports an auto-derived one, setting it is a separate change with its own window - · The must-match fields are agreed with the far end in writing: area id, network type, the hello and dead intervals, interface MTU, and authentication type plus key-id
- · The interfaces the new
networkstatement will match are enumerated. Every interface whose address falls inside that prefix starts sending Hellos on commit - · The intended cost of the new link is decided and compared against the current best path for the prefixes this router already reaches over OSPF
- · If authentication is being added to an interface that already carries a working adjacency, the far end commits its matching key in the same window
- · Change ticket open, window current, named peer reviewer available to read the
compareoutput
3 · Procedure
Execute each step in order. Verify the expected output of a step before moving to the next.
- 1Open the out-of-band console session and confirm you get a prompt on it. Leave it open.
- 2Capture the baseline to a file off the router: OSPF config,
show ip ospf,show ip ospf neighbor,show ip ospf interface,show ip route ospf. - 3Record which prefixes this router currently reaches via OSPF and by which next-hop. This is the list you diff once the adjacency is up.
- 4Enter
configure. Setprotocols ospf router-idexplicitly if the baseline capture showed it was auto-derived and the far end agrees this is the right window for it. - 5Set the per-interface parameters first, while the interface is still outside OSPF:
network-type,hello-interval,dead-interval,cost, andauthentication. - 6Add the
networkstatement that places the interface in the agreed area. This is the line that starts Hello packets; everything before it was inert. - 7Run
compare. Read the diff line by line against the agreed must-match fields. A typo here produces silence, not an error message. - 8Have the peer reviewer read the same
compareoutput before you commit. - 9Apply with
commit-confirm 10, thenexitto operational mode. Do not runconfirmyet. - 10Watch
show ip ospf neighboruntil the peer reachesFull. Anything still inInit,2-Way,ExStartorExchangeafter 60 seconds means a must-match field disagrees. - 11Run
show ip ospf interfaceand confirm exactly the interfaces you intended joined OSPF, in the area you intended, with the cost you set. - 12Diff
show ip route ospfagainst the pre-change record. Every prefix that moved must be a prefix the ticket said would move. - 13Test forwarding on at least one path whose next-hop changed, before you make the change permanent.
- 14If everything matches: re-enter
configure, runconfirm, thensave. - 15If anything does not match: capture the evidence, then either let the timer expire or run
rollback 1andcommit. Do not fix forward under a running timer. - 16Attach the pre-change capture, the
comparediff, the neighbour output and the post-change route diff to the change ticket.
4 · Verification
Confirm the procedure actually fixed the problem.
- ✓
show ip ospf neighborlists the new peer in stateFull, and it is stillFullthree dead intervals later (two minutes at the 40-second default) - ✓
show ip ospf interface eth1reports the area, network type, cost and hello/dead timers you set, not the defaults - ✓
show ip ospf interfacelists exactly the interfaces the change was supposed to add and no others - ✓
show ip ospf neighbor detailshows the same Interface MTU on both ends, ormtu-ignoreset deliberately and recorded in the ticket - ✓
show ip route ospfdiffers from the pre-change capture only in the prefixes named in the ticket - ✓Forwarding tested end-to-end over at least one path that changed next-hop
- ✓The far-end owner reports the same adjacency state from their side
- ✓After
save,show configuration commands | grep ospfmatches whatcompare savedreports as unchanged
5 · Rollback
If verification fails, undo the procedure in reverse order.
- ↶Preferred path: do not run
confirm. Let thecommit-confirmtimer expire and the router restores the pre-change configuration on its own. - ↶Explicit path:
rollback 1thencommitinsideconfigure, when you want the rollback now rather than at the end of the timer. - ↶Expect the adjacency to survive up to one dead interval (40 seconds at the default) after the rollback commits before it leaves
show ip ospf neighbor. - ↶The peer holds this router's LSAs until they are withdrawn or age out. Re-check
show ip route ospfon both routers, not only this one. - ↶Do not use
reset ip ospf processas a rollback. It restarts every adjacency on this router, not just the new one. - ↶If the change added authentication to an interface that already had a working adjacency, confirm after rollback that the pre-existing neighbour also returned to
Full. - ↶Capture
show ip ospf neighbor,show ip ospf neighbor detailandshow ip ospf interfacebefore rolling back. After the rollback that evidence is gone and the next attempt starts blind. - ↶Verify the post-rollback
show ip route ospfmatches the pre-change baseline exactly, prefix for prefix.
6 · Escalation
When the runbook isn't enough, contact:
- · Escalate to the far-end owner when the adjacency will not reach
Fullandshow ip ospf neighbor detailpoints at a field this router does not control: their area, their timers, their MTU, their key. - · Escalate to network engineering before confirming when a prefix moved that the ticket did not name. That is a topology change, not a link addition, and it needs a different review.
- · Escalate to network engineering if
show ip ospfreports a router-id you did not expect, orjournalctl -u frrshows a duplicate-router-id warning. Correcting a router-id needs an OSPF process restart and its own window. - · Escalate to security if the agreed authentication key cannot be exchanged over a channel independent of the link being built.
- · Escalate to the platform team if the router stops answering on both the data and the management path. Recover from the console session opened before the change; do not keep retrying over the network.
- · Holding is a legitimate outcome and not an escalation: let the timer expire, keep the ticket open, and re-run in the next window with the missing information.
Adding an OSPF neighbour is not really a link change. The adjacency is
the visible part; the change is to the link-state database, and the
link-state database is shared. The moment the new peer reaches Full,
this router floods its Type-1 LSAs to a topology that has not seen them
before, imports that topology’s LSAs, and every router in the area
re-runs SPF. Traffic can move before you have tested anything.
That is why the two decisions that matter in this runbook both happen
before the commit: what the link’s cost will be, and which interfaces
the network statement is going to match. Everything after the commit
is verification.
When this runbook applies
- A new physical or logical link is being added between two routers that are already in the same OSPF domain.
- An existing link is being brought into OSPF for the first time.
- An interface is moving from passive to active because a second OSPF speaker has appeared on that segment.
When it does not apply
- An adjacency that used to work and stopped. That is a diagnosis, not a change. Use the OSPF adjacency troubleshooting runbook; do not start editing configuration on a router whose LSDB you have not read.
- Enabling OSPF on a router that has never run it. That change also decides where the default route comes from and which interfaces are passive by default. It is a build, not a link addition.
- Changing the router-id. The router-id is the OSPF identity: it is
the
Advertising Routeron every LSA this router originates and the tie-break in DR election on every multi-access segment it touches. Changing it requires an OSPF process restart, which tears down every adjacency on the box. Separate ticket, separate window. - An adjacency over a tunnel (WireGuard, GRE, IPsec VTI). The shape
is the same but the network type must be
point-to-pointand the MTU question is not optional. Readvyos-xix-02-ospf-interface-configfirst.
Blast radius
One adjacency, one area, and every prefix whose best path this router currently advertises or receives.
The number to write on the ticket is not “one link”. It is the count of
prefixes in show ip route ospf before the change, because that is the
set that can move. On a router with two upstream paths and a default
learned by OSPF, adding a third adjacency can silently make the new link
the preferred path for all of them.
The fields that must match
Every one of these has to agree at both ends of the link, and all but
one of them fail identically when they do not: no adjacency, no log
line, an empty neighbour list. The area, network type, timers and
authentication are compared from the Hello packet itself; the MTU is
compared later, during the database exchange, which is why it fails
differently. Agree all of them with the far end in writing before anyone
types set.
| Field | Set with | What a mismatch looks like |
|---|---|---|
| Area id | protocols ospf area 0 network 10.0.0.0/24 | No neighbour entry at all |
| Network type | protocols ospf interface eth1 network-type point-to-point | No neighbour entry at all |
| Hello and dead intervals | protocols ospf interface eth1 hello-interval 10 and dead-interval 40 | No neighbour entry at all |
| Interface MTU | interface configuration, not OSPF | Neighbour stuck in ExStart |
| Authentication | protocols ospf interface eth1 authentication ... | No neighbour entry at all |
The MTU case is the one that is diagnosable at a glance, because it is
the only mismatch that produces a neighbour entry rather than silence:
the two ends exchange Hellos, agree to build an adjacency, and then fail
the Database Description negotiation. ExStart after 60 seconds means
MTU until proven otherwise.
Prove the way back in
# On the console / serial / IPMI path, not over the link you are about to change:
show version
show interfacesAn out-of-band path that exists on a wiring diagram is not an out-of-band path. Log into it, get a prompt, and leave the session open until the change is confirmed. This costs a minute and is the difference between a rollback and a site visit.
Capture the baseline you will diff against
show configuration commands | grep ospf
show ip ospf
show ip ospf neighbor
show ip ospf interface
show ip route ospfSave the output somewhere that is not this router. A baseline stored on the box you are about to change is a baseline you may not be able to read when you need it.
show ip route ospf is the one that matters most and the one people
skip. It is the only artefact that lets you answer, twenty minutes
later, the question the change ticket will actually be judged on: did
anything move that was not supposed to move?
Decide the cost, then look at what it competes with
Read the pre-change show ip route ospf and find the prefixes this
router reaches over OSPF today. For each, note the cost. The new link
will win any prefix where its cost is lower, and will share any prefix
where its cost is equal.
If the new link is intended as a backup, its cost must be higher than the primary’s — deliberately higher, by a margin you chose, not by whatever auto-cost happens to produce.
Build the candidate, parameters first
Order matters here for a reason that is easy to miss: the per-interface
block is inert until the network statement matches the interface. Set
the parameters first and the interface joins OSPF already configured
correctly. Set the network statement first and the interface joins
with defaults, sends Hellos with the wrong timers, and — if the far end
is already up — forms nothing while you are still typing.
configure
# 1. Per-interface parameters, while eth1 is still outside OSPF
set protocols ospf interface eth1 network-type point-to-point
set protocols ospf interface eth1 hello-interval 10
set protocols ospf interface eth1 dead-interval 40
set protocols ospf interface eth1 cost 20
set protocols ospf interface eth1 authentication md5 key-id 1 md5-key SHARED-KEY-HERE
# 2. The line that starts Hello packets
set protocols ospf area 0 network 10.0.0.0/30On authentication: MD5 is the form shown here because it is the one the
course’s authentication lesson configures directly on the interface. If
your estate standard is HMAC-SHA-256, the key chain has to exist on
both routers and be in its send lifetime before either interface
references it — read vyos-xix-05-ospf-authentication and treat the key
distribution as its own step, over a channel that is not the link you
are building.
Adding authentication to an interface that already carries a working adjacency drops that adjacency the moment one side commits. That is expected, it is not a fault, and it is why both ends belong in the same window.
Read the diff before you commit
compareRead it against the agreed must-match fields, one line at a time, and have the peer reviewer read the same output. This is the last point where a typo costs nothing. After the commit, a wrong hello-interval is indistinguishable from a cable in the wrong port: both present as an empty neighbour list.
VyOS helps here in a way worth naming. A configuration path that does
not exist is rejected at the set, not at the commit — so a command
that is wrong for your image fails before any state changes. A command
that is valid but wrong for your intent commits happily. compare is
the only defence against the second kind.
Commit behind a timer
commit-confirm 10
exitPoint of no return, with a leash. From here the adjacency can form and traffic can move. The ten-minute timer is what makes it reversible: if you do nothing, the router restores the previous configuration by itself.
Leave configure mode. Verification runs from the operational shell, and
an operator sitting in configure mode is an operator who is one absent
confirm away from an unplanned rollback in the middle of a test.
Watch the adjacency, then the routing table
show ip ospf neighbor
show ip ospf neighbor detail
show ip ospf interface
show ip route ospfIn that order, because each answers a different question:
- Did it come up?
Fullwithin a dead interval.Initor2-Waymeans the Hellos disagree.ExStartorExchangemeans MTU. - Did it come up the way we agreed?
neighbor detailcarries the timers, the network type and the interface MTU each side is using. - Did anything else join?
show ip ospf interfaceis where an over-broadnetworkstatement becomes visible. Count the interfaces and compare against the ones you named. - Did anything move? Diff against the baseline capture.
An adjacency that reaches Full and then flaps back is not a slow
adjacency. It is usually a duplicate router-id or an MTU mismatch that
only bites during the first full database exchange; check
journalctl -u frr before re-committing anything.
Confirm, or hold
configure
confirm
save
exitconfirm cancels the timer. save writes the active configuration to
disk — without it, the next reboot silently reverts everything you just
did.
Holding is a first-class outcome. If the adjacency is up but the route diff shows something you did not expect, you do not have to decide under time pressure. Let the timer run out. The cost is one change window; the cost of confirming a topology change you do not understand is measured in whatever traffic took the new path. The change owner makes that call, and makes it before T+8 on a 10-minute timer, so there is room to capture evidence first.
Rollback
The rollback is the timer, and the timer is only useful if you have not already confirmed. That is the whole argument for committing behind one.
configure
rollback 1
commit
save
exitTwo things about an OSPF rollback that catch people out:
- It is not instant. The adjacency persists until the dead interval
expires — 40 seconds at the default. A
show ip ospf neighborrun five seconds after the rollback commit will still show the peer, and that is not a failed rollback. - It is not local. The peer holds this router’s LSAs until they are
withdrawn or age out, and every router in the area re-runs SPF again
on the way back. Check
show ip route ospfon both ends before declaring the estate restored.
reset ip ospf process is not a rollback. It restarts the whole OSPF
process on this router, tearing down every adjacency the router has and
re-flooding every LSA it originated. It is a recovery tool for a
router-id collision, used in a window, with the far ends warned.
Common patterns
| Symptom | Likely cause | Next check |
|---|---|---|
| No neighbour entry at all | Area, network type, timers or auth disagree | show ip ospf interface eth1 on both ends, field by field |
Neighbour stuck in ExStart | Interface MTU mismatch | show ip ospf neighbor detail, read the Interface MTU line |
Neighbour reaches Full then drops | Duplicate router-id, or MTU that only bites on the full DB exchange | show ip ospf on both, then journalctl -u frr |
| Adjacency is up but no routes arrive | Interface joined the wrong area | show ip ospf interface eth1, compare the area to the ticket |
| Adjacency up, and prefixes moved that nobody expected | Cost too low, or auto-cost tied the new link with the primary | show ip route ospf diff, then show ip ospf interface cost column |
| Interfaces you did not name are now in OSPF | network statement prefix too broad | show ip ospf interface, count entries against the ones you named |
| A previously working adjacency died during this change | Authentication added on one side only | Confirm the far end committed its matching key-id and key |
Provenance
This runbook has not been executed end to end against a live pair of
routers, which is why last_verified reads pending rather than
carrying a date. Its command set is taken from the course’s own OSPF
lessons — vyos-xix-01-ospf-basics,
vyos-xix-02-ospf-interface-config and
vyos-xix-05-ospf-authentication — and from the commit discipline in
vyos-vi-02-commit-confirm and vyos-vi-06-remote-change-discipline.
No output is reproduced here, because none of it was captured.