Originally published at series.
This post is part of Protocol in Code, a free series that reads network protocols as logic — inputs, state, branches — rather than as configuration examples. The full source lives at series and come back here.
The question
What has to match before an OSPF Hello can even start a neighbor relationship?
That's the whole module. Not "how does SPF work," not "what's in an LSA" — just the gate that runs before any of that is on the table. Most OSPF material introduces the Hello packet as a keepalive: routers shout on the wire every 10 seconds, and if you stop hearing one for 40 seconds you tear the neighbor down. That's true, and it's also the least interesting thing about Hello.
The interesting thing is that Hello is a filter. Before OSPF will consider two routers to be on speaking terms, a set of fields in the received packet has to agree with the local interface's configuration. If they don't, nothing happens — no adjacency, no database exchange, no error to the sender, usually no log line you'll notice. The relationship simply never begins.
If you've ever stared at two routers that are unmistakably on the same broadcast segment, both configured for OSPF, both sending Hellos, and neither one forming an adjacency — you've been on the wrong side of this filter. The code below is where that lives.
The source
The file this module reads is — OSPF Version 2. Section 9.5 covers sending Hello packets; Section 10.5 covers receiving them and is the direct analogue of evaluate_hello().
SOCIAL SHARE CARD GENERATOR