1

So I have to simulate the original flooding algorithm for a course project and I wanted to clarify and confirm some thinks because it seems to be really difficult to find what I want on the Internet (so I must be doing something wrong)...

Anyway as far as I know the flooding algorithm is when a node wanting to send a sequence of packet to a destination sends EVERY packet to EVERY connected node. Then, those receiving nodes repeat the process by sending a duplicate of the packet they received to all the connected nodes EXCEPT the one that send the original. And so on until the packets reach the destination. So basically this algorithm ensures that the packets will reach the destination while flooding the network; thus the name. So this is what I clarified with my professor:

1) I assumed that the packets generated will have a hop counter that the value of it will be the same for every packet, will be decreasing on every visited node and when it reaches 0 the packet will be dropped. I also assumed that the value will depend on the size of the network and he agreed but didn't say how the size of the network affects it. Do you take the diameter of it? Can anyone help me here?

2) A node keeps a copy of the packet they received on themselves (why? to resend if the one node they dent it on didn't send an acknowledgement back?) and the packet drops off the network when the hop counter reaches 0 but when a packet reaches a node that already has a copy of it what happens? I assume that the node drops it since it has a copy and logically already sent it to all it's neighbors but I am not sure. Can someone clarify this?

3) All nodes have a maximum capacity of packets they can hold. So when a node reaches maximum capacity 'stops' working and doesn't accept further packets or drops in a FIFO style? I assume the first since one of the objectives of the project is to estimate which nodes will be flooded first. But what actually happens? The connected nodes to it keep sending packets and just don't get an acknowledgment since it drops them or sends a signal that doesn't receive any more packets and, I don't know, change the cost in their routing table to a value that means no connection/or infinity cost so they don't send anything anymore.

4) Also I forgot to ask, what about the source node that generates the packets? Does it also keep copies? I think it does but then won't it be the most possible node to flood first since it will keep a copy of every packet the moment is generated? I am probably over thinking it...

Andreas Andreou
  • 818
  • 10
  • 31
  • For the 2) : If the packet is already copied on a node, and it receives the same packet, he must drop it. If it doesn't, it's an infinite loop, you will never get out of here. (I followed the same logical reflexion as you I think). (That is not very constructive, but it confirms what you thought at first) – Depado May 11 '12 at 10:31
  • @Depado: there can not be an infinite loop because the packets have a limited number of hops. It does relieve pressure from the network though. – Matthieu M. May 11 '12 at 18:24

1 Answers1

2

1) [hop counter value]

It needs to be large enough to traverse the network. It is basically the number of intermediate nodes the packet will encounter on the longest path through the network.

2) when a packet reaches a node that already has a copy of it what happens?

It is dropped.

3) All nodes have a maximum capacity of packets they can hold. So when a node reaches maximum capacity 'stops' working and doesn't accept further packets or drops in a FIFO style?

Doesn't accept new packets. Nowhere to put them: it still has unprocessed packets queued up. It's not a FIFO.

4) Also I forgot to ask, what about the source node that generates the packets? Does it also keep copies? I think it does but then won't it be the most possible node to flood first since it will keep a copy of every packet the moment is generated? I am probably over thinking it...

If the source node is collecting acknowledgements, it will retain each packet until it has been acknowledged, so it can implement a retry algorithm.

It would help a lot to know whether you are talking about IP, UDP, or TCP, or just the datalink layer.

user207421
  • 305,947
  • 44
  • 307
  • 483
  • Thanks a lot. Well actually it didn't come up, it was just a project to simulate the flooding algorithm in an OOP language (JAVA)... And I generally tend to overthink things so I try to paint a clear picture of what I have to do... More likely he was talking about TCP because it was after that lecture that it was announced and we deal with packets but he didn't really say anything about acknowledgments or such... – Andreas Andreou May 12 '12 at 02:34
  • About the maximum capacity? The node stores copies of the packets it receives and then propagates but when does it drop those copies that it stored? – Andreas Andreou May 12 '12 at 02:36
  • @AndreasAndreou When they have been read into an application they are removed from the socket receive buffer. – user207421 May 12 '12 at 07:21