I have two routers connected via a pt to pt link, thus with /30 mask.
What's the difference between using 0.0.0.0 and 0.0.0.3 in the network statement to enable OSPF only on those interfaces ?
When you specify let's say 192.168.1.1 0.0.0.0 , then the given ip address should be matched with the interface ip address, all the 32 bits. The result is that you specify the only interface that this ip address belongs to.
When you specify 192.168.1.1 0.0.0.3, then only the 1st 30 bits need to exactly match.
The last 2 bits can be anything:
00, 01, 10 or 11.
So this will match ip addresses 188.8.131.52 through 192.168.1.3. This defines a range of addresses.
But anyway, it will select the same interface on the router, if you correctly granted the ip addresses across the interfaces.