Whenever we talk about OSPF, flooding means "send the data the any router learned form one neighbor to all other adjacent routers. "
Actually flooding means a little more then that. Flooding is an algorithm to forward packet through a network which works by having each network node on the path send a packet received from one neighbor to all other neighbors.
First I need to understand multicasting little bit. Before entering into main answer. One class D address use as multicast address and treated as one group. For example , a institution may have an internal video system that sends multicast video streams. The video application on a host would be configured to subscribe to a "channel" on a particular multicast group through by neighbor routers. Whenever channel sends any video the then all group members get it know.
This is correct. Multicast however is used to describe that a network is capable of doing it, it does not specify how a network does it. IP multicast (or at least approaches that I know) does rely on network having calculated routes. Thus OSPF, a protocol that calculates these routes, cannot use that kind of multicast.
Same thing is happening here in OSPF routers using multicast. When any OSPF router using multicast address then it's all neighbor router treated as multicast group restricted by one hop distance and flooding needed to deliver information to whole network.
I would say that OSPF router uses multicast address. This multicast address is link-local. In this case multicast will be done by layer 2, not layer 3. This IP multicast address maps to layer 2 multicast address. On multipoint links (e.g., Ethernet) routers will use layer 2 multicast capabilities to deliver packets to all other routers on this link. I would abstract from this case before you understand the basics.
When an OSPF router receives a multicast packet, it does not forward the packet. That is what we mean by one hop.
well, this is kinda not the case. OSPF floods so called LSAs (link state advertisements). These packets are forwarded. In a sense there is an outer OSPF header that is used hop by hop. A router receives a packet, processes outer header, then creates a new packet with a new outer header, where it puts the original LSA. Then it forwards the packet.
The router does not forward the same packet it receives. The router puts the information into its table and then sends a new packet with its new information to its neighbors.
this is what distance-vector algorithm does. OSPF routers do not modify LSAs they forward.
So the information (LSP) gets flooded, using a new multicast packet at each hop.This addreses my first question.
well, yes
Now coming to second question, if OSPF uses unicast then any router have to discover each of it's neighbors and keep track of them. It's harder to do with unicast. So multicasting is using here.
OSPF router needs to discover each of it's neighbors and keep track of them. It uses this information to construct an LSA. This is done by HELLO packets. These packets are not flooded.
However, OSPF does use multicast addresses. You can assume that this is done for convenience and doesn't really matter at this point.