Cisco IOS

What is show ip ospf neighbor in Linux?

Linux has no built-in OSPF. The protocol runs in a userspace routing daemon — BIRD2, FRR or similar — so the equivalent of show ip ospf neighbor is that daemon's own client. With BIRD2 it is birdc show ospf neighbors. The kernel routing table only ever sees the finished result, so ip route show will not tell you anything about adjacencies.
Try it in a live lab

Free interactive lab. No signup. Runs in your browser.

Command by command

Cisco IOSLinuxWhat it gives you
show ip ospf neighborbirdc show ospf neighborsAdjacencies and their states
show ip ospf interfacebirdc show ospf interfacePer-interface OSPF settings
show ip ospf databasebirdc show ospf lsadbLink-state database
show ip route ospfbirdc show route protocol ospf1Routes learned via OSPF
show ip protocolsbirdc show protocolsEvery protocol and whether it is up

What the output looks like

$ birdc show ospf neighbors
BIRD 2.0.12 ready.
ospf1:
Router ID       Pri   State      DTime   Interface  Router IP
10.0.12.2       1     Full/DR    00:17   ge1        10.0.12.2
10.0.13.2       1     Full/DR    00:16   ge2        10.0.13.2

Why the two differ

On IOS, OSPF is part of the operating system, so one command shows both the protocol state and the resulting routes. On Linux there are two distinct layers. The daemon holds the link-state database, runs the SPF calculation and decides on best paths; the kernel holds only the routes the daemon chose to export. This is why a route can be perfectly correct inside BIRD and still absent from ip route show — an export filter blocked it. Checking both layers is the standard Linux routing workflow, and it has no IOS equivalent.

The trap

A neighbour stuck in Init means hellos are arriving in one direction only — the far side is not seeing yours. Stuck in ExStart most often means an MTU mismatch between the two interfaces, because OSPF exchanges database description packets sized to the interface MTU and refuses to proceed if they disagree. Both look like a generic "OSPF is not working" and have completely different causes.

Common questions

Why is birdc saying it cannot connect to the control socket?

The daemon is not running, or it exited on a config error. BIRD writes its control socket only after it has parsed the configuration successfully, so "connection refused" usually means a config problem rather than a networking one. Check the daemon's own log.

Does FRR use the same commands?

No. FRR deliberately implements IOS-style syntax, so on FRR you would run vtysh -c "show ip ospf neighbor" and get output close to Cisco's. BIRD uses its own vocabulary. Which one you use depends on which daemon is installed.

Stop reading, start running

Open the lab, go live, and run birdc show ospf neighbors against real Linux networking in your browser. No install, no signup.

Launch the lab →