OSPF router ID

Hello,

If I’m using OSPF with loopback interface and I want to set an IP address to the loopback interface which one should it be? /30 or /32?

/32

and set interface to p2p passive.
Include ip in the networks tab
verify ospf interface up.

Done.

Hi,
for using loopback in ospf network should i use P2p network type ? I just add loopbackip to ospf network as backbone and its come automatically to ospf interface as dnymic passive.

thanks

The network type won’t matter as it is passive. You may choose to hard code the interface to passive to ensure that it doesn’t try to form a neighbor relationship on it ever just to be safe if you wish though.

Idlemind is right. And I allways think of security/stability in layers. if something can be configured more strict it should, as it tend not to break if someone makes a misstake later on.
The p2p makes sense on a “Loopback” interface and is also a notion to other admins that this is not an ordinary interface ptp on a bridge? (ahhh it’s mikrotik, it has no loopback semantic, wait this is the loopback…) the Passive setting on the interface makes sense in the above statement and one more. The CPU in your poor MT box will not send hellos to this synthetic interface. Making it Passive serves many purposes it minimize cpu cycles taken, it protects you if some nasty bug sneaks into bridge code or an admin connects a port to the “wrong” bridge…
All this is of course not Empirical tested but with the experience of many years of networking one comes to a mindset that is stable and secure by design.