1

In distance vector routing algorithm one router can communicates(shared the routing table) with adjacent router by broadcasting message which are in same subnet. OSPF uses flooding to unicast message (just share the routes ) to neighbor routers. So my questions are

A) How more than one routers uses in same subnet? Because one router is sufficient for one subnet to subtends all the information of the same subnet.

B) In distance vector routing after broadcasting the routing table to router, the router also get to know from the neighbors routers table all the information (all the routes and cost) of that network. But in OSPF also get to know the routes to it's neighbors after flooding and this neighbor also share routes it's neighbors and so on. What is difference between them DVR and OSPF in the sense both get know the routes after broadcasting(in DVR) and flooding(in OSPF).

6
  • Does this answer your question? Cannot see the differende between distance-vector and link-state
    – Ron Trunk
    Sep 15 at 14:26
  • @Ron it isn't not actually difference between DVR and OSPF..
    – Alok Maity
    Sep 15 at 14:39
  • @Ron I have seen your before posted my question.. Your answer isn't intended that I am finding.
    – Alok Maity
    Sep 15 at 14:42
  • Both protocols get the same result: building a routing table. How they get there is very different as the linked answer explains. I really don't understand your first question.
    – Ron Trunk
    Sep 15 at 14:47
  • 1
    IT seems you don't understand either protocol very well. It is common to have multiple routers on one subnet.
    – Ron Trunk
    Sep 15 at 14:57
3

There are a bunch of confusions here. Let's start with the last one.

But in OSPF also get to know the routes to it's neighbors after flooding and this neighbor also share routes it's neighbors and so on.

It does not(!!!!!). In link state routing neighbors do not share routes of its neighbors, their share topology of their neighbors. Link state routing protocol takes this topology, reconstructs a network graph and computes routes. This is fundamentally different from distance vector, where neighbors share their computed routes.

Now about the rest.

OSPF uses flooding to unicast message (just share the routes ) to neighbor routers.

No it does not. (1) flooding is used to reach all routers (2) these messages may use multicast (on a single hop). (2) is not that relevant to understand basic principles.

A) how more than one routers uses in same subnet? Because one router is sufficient for one subnet to subtends all the information of the same subnet.

If there is only one router on the same subnet, then it does not share routing information on the same subnet. It could try, but none else can receive it.

subnet

You are missing the concepts here. On the edge of Internet we usually have organizations that use Layer-2 within their local network. This network is assigned a block of IP addresses and is usually called subnet. In order to be connected to the Internet it does need to have at least one router. This is not the only think subnet can refer to.

In the context of routing protocols we are talking about point-to-point and broadcast links. Point-to-point link is equivalent to a cable between two devices. Broadcast link means that (1) there are more than one device connected to this link (2) the layer 2 has broadcast capabilities, i.e., it is possible to use special broadcast address to deliver packets to all connected devices. The consequence is that it is possible to send a separate packet to each other router, but it is more efficient to send on broadcast packet. There are more consequences coming from the nature of such networks.

This is taken into account in order to answer the question: how to most efficiently transmit routing information over a single hop. It is not related to the question on how to transmit routing information between all routers in the network.

B) In distance vector routing after broadcasting the routing table to router

So, as i said, in theory it can very well send a unicast to each router specifically. Here, by saying broadcast we usually mean that the packet has to reach all neighbors on the same link.

Also it is worth noting, that you can use multicast on point-to-point links connected directly (by a cable). On such a link one device can only send packet to the other device, so addressing does not matter.

From what I know, and I saw this confusion in a number of university courses about RIP, RIP actually does assume that all routers are connected by broadcast links. And the way it works makes sense for broadcast links. I am however not 100% sure about this.

and also

@Ron it isn't not actually difference between DVR and OSPF.

DVR which presumably stands for distance vector routing is a class of protocols which work based on distributed Bellman-Ford algorithm. Everyone teaches RIP, but RIP is not the only DVR and the way RIP uses broadcast does not have to apply to any other distance vector routing protocol. OSPF is an example of link state routing. Again not the only example, there are at least two. You can't compare them together. What you ask in your last question does ask for the difference between distance vector and link state.

If you are trying to understand the basics, i recommend to assume that all routers are connected by direct point-to-point links (i.e., by a cable). In this context, the word broadcast w.r.t. a single hop will be - send message to all direct neighbors.

I would also recommend this open online book. It is written by a university professor with lot of experience.

12
  • could you edit the answer by posting the image of subnet which you posted on chat .
    – Alok Maity
    Sep 15 at 16:09
  • could you elaborate little bit "No it does not. It does not really matter to understand the basics, but it is not true".
    – Alok Maity
    Sep 15 at 17:03
  • if explain OSPFs unicast/broadcast little bit then your answer quality may be raised with all confusion will be cleared in one text "OSPF uses flooding to unicast message (just share the routes ) to neighbor routers. No it does not. It does not really matter to understand the basics, but it is not true."
    – Alok Maity
    Sep 15 at 17:23
  • Explaining all of OSPF's operations takes more space than we have here. There are lots of good explanations and videos that you can find.
    – Ron Trunk
    Sep 15 at 17:25
  • 1
    OSPF messages are usually sent to multicast addresses.
    – Effie
    Sep 15 at 17:37
0

Whether unicast (needs configuration) or broad-/multicast (automatic inclusion of all visible routers) is a matter of definition in a protocol. Either does the job of passing information between adjacent gateways.

Both methods have pros and cons and more-or-less subtle implications on the way the data exchange works, but for that you'd need to ask much more specific questions.

how more than one routers uses in same subnet? Because one router is sufficient for one subnet to subtends all the information of the same subnet.

Since subnets can be used to connect distant networks, such a subnet would need a minimum of two gateways. If you consider a private or public Internet exchange, there may be dozens or even hundreds of routers, in a single subnet.

After all, a single router without any neighbor can't exchange any routes...

In distance vector routing after broadcasting ...

Distance-vector vs link-state (what kind of data you exchange) has no relation to using broadcast, multicast or unicast (how you exchange data). Distance-vector uses a simpler concept and may also use a simpler exchange, but you could create a new routing protocol in either way.

4
  • suppose I have one router which has one subnet which ranges from 200.1.2.128 to 200.1.2.191 and has 64 Ip address. This 64 ip assigned to 64 computer.So here in this subnet how more than one router could be used? Here one router is sufficient to contains all 64 ip address, isn't it?
    – Alok Maity
    Sep 15 at 15:20
  • from 200.1.2.128 to 200.1.2.191 - that subnet has 62 usable addresses (all-zero and all-ones host parts cannot be used). In that subnet, all 62 nodes could be routers (in an internetwork). If you only require connectivity to 'elsewhere', then yes, one router would suffice. Without required connectivity to other networks, you don't need a router at all.
    – Zac67
    Sep 15 at 15:48
  • Without required connectivity to other networks, for my own to connect internet, I require router?
    – Alok Maity
    Sep 15 at 16:00
  • @AlokMaity Yes, you need a router to connect to your ISP. Your questions seem to assume a very simple network. In that case, there isn't much difference between OSPF and RIP. But in larger networks, it makes a big difference.
    – Ron Trunk
    Sep 15 at 16:29

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.