Could someone please explain me the importance of the interface loopback address on ospf.. i really dont understand this.. thanks..
I agree with everything that Mohammed said. The loopback interface is useful in setting up a RID. One reminder though, is that if your RID is already set, then you set up a loopback interface, the RID will not change unless you reload the router. This, trust me, can be the cause of some frustration if you don't remember it. Best of luck!
The importance of the loopback address with OSPF comes from its role in the RID derivation:
If the Router ID has been manually configured using the router-id command, that Router ID is used.
If no Router ID has been manually configured, the router chooses the numerically highest IP address on any of its loopback interfaces. If no loopback interfaces are configured with IP addresses, the router chooses the numerically highest IP address on any of its UP/UP physical interfaces.
RID should be unique in the OSPF domain for OSPF to perform adjacency.
NOTE The interface from which the Router ID is taken does not have to be running OSPF or even advertised in OSPF - it is as if a router name (ID).
NOTE The loopback interface is more stable than any physical interface. It is active when the router boots up, and it only fails if the entire router fails.
NOTE Each OSPF process on a single router must have a unique router ID, they won't share the same router ID.