4

We know that flooding is only possible in layer2 switch. But in OSPF router in layer3 uses flooding with multicasting. Suppose we have one router in OSPF uses multicast address 225.0.0.9. If router sends a message, every router get the message belongs to same group using class D address 225.0.0.9. But my questions are

A) If I using multicast address so why flooding is necessary because by multicasting everyone get message?

B) If I use unicast instead of multicast what's problem will be happen ?

3
4

Why OSPF uses flooding instead of using multicast?

Those are two very different concepts. OSPF on a broadcast network uses multicast to exchange routes. It floods by telling ever other OSPF router to which it is connected in the same area about all the routes it knows.

We know that flooding is only possible in layer2 switch.

That is a completely different thing than OSPF flooding. The word is the same, but it is a very different meaning.

Suppose we have one router in OSPF uses multicast address 225.0.0.9.

That would not work. That multicast group is used by RIPv2, not OSPF.

If router sends a message, every router get the message belongs to same group using class D address 225.0.0.9.

No, because an OSPF router does not listen to that multicast group, and the multicast packets will be dropped at the interface.

If I using multicast address so why flooding is necessary because by multicasting everyone get message?

You are confusing the flooding term. An OSPF router can have neighbors on multiple interfaces. The OSPF flooding term means it tell all its connected OSPF neighbors in the same area about the routes it has. OSPF on a broadcast network does use multicast, but it is a link-local multicast that cannot be sent to a different network. The OSPF router needs to send routes to all the OSPF routers in its area that are connected to all its interfaces that are participating in the OSPF process. Some of the interfaces may be using a broadcast medium, and some may be using a non-broadcast medium where multicast is not supported.

If I use unicast instead of multicast what's problem will be happen ?

You need to understand the differences between OSPF on a broadcast medium (elects DR and BDR and uses multicast) and on a non-broadcast medium (must have neighbor addresses configured and exchange routes with each neighbor individually).

11
  • Comments are not for extended discussion; this conversation has been moved to chat.
    – Ron Maupin
    Sep 16 at 13:12
  • could define two terms "link-local multicast" and "broadcast network".
    – Alok Maity
    Sep 16 at 16:41
  • Link-local multicast means it cannot leave the link on which it originated. You need to learn to look up stuff on RFCs. RFC 5771 explains different multicast ranges for IPv4. For example: "4. Local Network Control Block (224.0.0/24) Addresses in the Local Network Control Block are used for protocol control traffic that is not forwarded off link. Examples of this type of use include OSPFIGP All Routers (224.0.0.5) [RFC2328]."
    – Ron Maupin
    Sep 18 at 0:34
  • RFC 2328 defines what OSPF means for broadcast networks: "Networks supporting many (more than two) attached routers, together with the capability to address a single physical message to all of the attached routers (broadcast)."
    – Ron Maupin
    Sep 18 at 0:38
  • your statement "OSPF on a broadcast network uses multicast to exchange routes. " means OSPF never use broadcasting, always use multicast? OSPF can use all of multicast , unicast, broadcast depends upon configuration?
    – Alok Maity
    Sep 24 at 10:54
3

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.

17
  • 1
    "Actually flooding means a little more then that. Flooding is an algorithm to forward packet through a network which works by having each router on the path send a packet received from one neighbor to all other neighbors." No. Routers do not flood packets. Routing protocols flood routing information. You keep confusing the flooding term with the way switches flood.
    – Ron Maupin
    Sep 16 at 14:35
  • 2
    "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." That is completely wrong. IP multicast is simply sending to an IP multicast group address. OSPF can multicast on a broadcast medium.
    – Ron Maupin
    Sep 16 at 14:39
  • 2
    "I would say that OSPF router uses multicast address, it does not use multicast." That makes no sense. Sending to a multicast group is using multicast.
    – Ron Maupin
    Sep 16 at 14:41
  • 2
    "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." Yes, that is the case. The link-local multicast cannot be forwarded, so it is a single hop.
    – Ron Maupin
    Sep 16 at 14:43
  • 1
    "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." You are confusing the router and the routing protocol. Routing protocols do not route, and the router only forwards a routing protocol packet to the routing protocol process, not beyond the router. It is up to the routing protocol process to decide if it will advertise routing information to another interface.
    – Ron Maupin
    Sep 16 at 14:47
1

"Flooding" means LSA is sent to all routers in the area (not just the given network), whereas multicasting means the OSPF pkt (with LSA in it) is listened to by all OSPF routers on the given network (not the the whole area).

Unicasting would require more packets, so it would be less efficient. (224.0.0.9 is for RIPv2 BTW, not OSPF; "all OSPF routers" is 224.0.0.5, the acks will be to 224.0.0.6, BDRs and DRs)

1
  • how exactly do you understand network here? And the part about 224.0.0.6 is actually incorrect. It is more complicated than use one addr for LSAs and one addr for ACKs.
    – Effie
    Oct 7 at 8:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.