"show ip ospf neighbor" is the command used to display the current OSPF neighbors and their RIDs. OSPF is a link-state routing protocol for IP network which uses a link state routing algorithm. By this protocol routers can exchange topology information with their neighbors.